Move line on graph with mouse

I have what I believe to be a unique application where I need to draw a line on a graph which can be moved by simply clicking in predefined boxes attached to the line. Boxes above and below the line in the upper right and lower left will be used to rotate the line relative to the axes while boxes above and below the line at the center of the line will be used to adjust the position of the line at a given angle. The attached file shows an example of how the line should look from a similar project programmed in C.
As you might imagine, what I am trying to do is set a threshold line. Therefore, I need to be able to read the line position for use in thresholding.
I know that this can be accomplished in a roundabout way by placin
g a transparent picture control over the graph, but I was wondering if someone knew of a more robust way of doing this.
I am using LabVIEW 6.1 FDS.
Attachments:
Example_Plot.jpg ‏21 KB

Hello John,
Please take a look at the program I attached. It makes use of VI references and property nodes to programmatically modify the appearance of the decoration. You could easily modify this for your needs.
I hope this helps! Please let me know if I can be of further assistance.
Liz Fausak
National Instruments
Attachments:
MoveDeco.vi ‏42 KB

Similar Messages

  • Formating Line thickness for lines in graphs with more than 6 lines.

    I have a line graph with more than 6 lines on it and I'm trying to make them all 1px.
    I can specify a line thickness for the first 6 lines but after that, the lines go back to the default thickness.
    Is it possible to change the default line thickness for a graph or format the line thickness for the 7th line and more?

    Good news! I found out how to format more than 6 lines of data and it's really simple to do!
    In the bottom left hand corner of the Format Chart Data, next to the Clear All button, is a button marked ADD.
    If you click this button, another row is added allowing you to format the 7th line of data.
    Click again and you get a row for the 8th line and keep clicking to add more lines.
    I'm making a note of it here in case it is useful to someone out there who searches on this problem in the future.
    Edited by: user2052587 on Jan 6, 2010 2:45 PM

  • Can't move items in Indesign with Mouse anymore

    Regarding Indesign CS5.5 I have the problem I have seen posted about suddenly not being able to move selections/objects/text boxes/pictures or even slide pictures from Bridge to pasteboard with the mouse.  I have already reset preferences with key stroke reboot, and it did not help. Running Windows 7 but I cannot find the file to manually trash or rename as my data tree does not match your instructions.  Said I do not have admin rights, but I do. I had a Java upgrade this morning could that be it?

    I have the same problem with my inDesign at work. I am using a mac. I already reset the preferences (many times), I did restart my computer also several times.
    Everytime after the restart of the computer (and before resetting the preferences) it worked for some minutes. But then again it suddenly stopped while working in an InDesign file (I tested different files).
    At the end I uninstalled InDesign and installed it again. Directly after the new install it doesn't work.
    So I have no idea anymore what to do now. I could restart my computer and work for 10 minutes and restart it again, but that needs way too much time.
    any idea?

  • Moving event with mouse in iCal gives me problems on Nokia N96

    When I move an item (event) with mouse in iCal, and then iSync to my Nokia N96, I get multiple events in the Nokia Calendar. As if I copy-pasted the item too many times.
    The multiple events are on the hours, on which I have dragged around the event.
    Somebody having similar issues?

    i've been having the same prob as u with my N96 however after i reverted back to factory settings and it's behaving for the time being (touchwood) i've read on posts here that people r having the same prob with their 2nd even 3rd phones so unless u r planning to change ur's for a diff model i'm not sure how helpful replacing the phone will be. I along with many others 'am sure r waiting for the new firmware to come out which hopefully will sort out most of the stability issues. i contacted Nokia and they advised me to wait till the firmware update as well.
    i hope this helps.
    BE THE CHANGE YOU WISH TO SEE IN THE WORLD - MAHATMA GANDHI
    N96-1, Ver. 12.043, Unbranded, Made in Finland.

  • How to draw a graph with fixed Y-axis and varying X-axis....Is it Possible?

    i am trying to draw a Line 2d graph with a dataset which contains four values like(x,y)(x1,y1)...(x4,y4)
    So when i plot the points i couldn't get the (x,y) values since they are very low when compared to other values...
    So,is there any way to scale down the graph to the max value of (x,y)
    I am using JFreeChart..

    I can draw graph with given dataset.But theScaling
    of the graph is high when a single value ishigh.So
    is there any solution to scale down the graph to a
    particular value.This sounds very much like you are using JFreeChart.
    If so, you might be better off asking in the
    JFreeChart forum
    http://www.jfree.org/phpBB2/viewforum.php?f=3 ...
    I read this as not using JFreeChart! If using JFreeChart than one can just set the range of values to be plotted!

  • Looking up the values in a waveform graph with a mouse click

    Hi,
    Does anyone know how to look up the values in a waveform graph with a mouse
    click but... without the cursor legend on, if i press in the waveform graph
    nothing happens, i must search my cursors and only then i can see the values
    of my signal data?! Isn't there any other way?
    Best regards,
    Thijs Boerée

    Dear Chad,
    I know of the function "bring cursor to center". I also figured out that
    when i use a property node of the cursor array of clusters, that i can see
    that some values change when i move the cursor (i can see the X and Y scale
    value change of the graph and also the values of the mouse pointer (in
    points due to screen resolution)) But in this cluster i can't set the mouse
    position. I allready made a VI where i can see the bounds of my
    waveformgraph and I have the Xscale (min and max) and the Yscale (min and
    max), with a linear fit i can translate my mouse position to X an Y scale
    values and when i click on my waveform graph the cursor go's to that
    position (property node of the cursor position), only disadvantage is that i
    only have the bounds of my plot area and not the position, i do have the
    position of my waveform graph but the plot area isn't allways in the center,
    if i could extract the position of the plot area i may find a solution to
    solve this problem.
    And to file a product question:
    I would like to see the function that with a mouse click a little menu
    appears and that there are options to for example set a marker on that data
    and when you right click on it, that there are options to remove it or to
    add comment, a 2D array could make a list of the different channels with
    it's markers (time stamps and comments).
    Best regards,
    And thank you for your help.
    Thijs Boer�e
    "Chad AE" schreef in bericht
    news:[email protected]...
    > Dear Thijs,
    >
    > Thank you for contacting National Instruments.
    >
    > To address your question, there is no direct VI, command, or property
    > node that will allow the cursor snap-to-mouse functionality.
    >
    > I notice a problem you may be occuring is trying to find where the
    > cursor is on the graph. If this is an issue, you can select Bring to
    > Center from the Formatting Ring on the Cursor Legend to move the
    > cursor to the center of the graph.
    >
    > Let me know if you have any further questions or if this does not
    > resolve your issue, as I would be happy to file a product suggestion
    > so that LabVIEW is improved in future versions.
    >
    > Thanks again and have a great day!
    >
    > Chad AE
    > Applications Engineer - National Instruments

  • I used to open many tabs in the same page and i move from one to other by mouse but since3 two days the tabs open in the same page normaly but i can't move from one to other when i clik with mouse on any tab it don't open/ do u have any solve for this?

    i used to open many tabs in the same page and i move from one to other by mouse but since3 two days the tabs open in the same page normaly but i can't move from one to other when i clik with mouse on any tab it don't open/ do u have any solve for this

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Scrolling with mouse on pages create black and white lines,

    When scrolling with mouse, periodically the whole screen turns into black and white lines. Sometimes whole page, sometimes just pictures/side ads. If you continue to scroll it does go away but then you need to scroll back to where the lines started, its hard to explain, i have taken 1 photo of the problem but will take more photos as i can, i really enjoy how Firefox runs on my computer, it has always been the best browser for my needs. I did recently buy a new desktop, but it did it then also, so i removed it and tried running explorer and Google and i just don't like them, so i am hoping we can get this fixed.

    Try to disable hardware acceleration in Firefox.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/
    If there is a problem with scrolling on web pages then try to disable smooth scrolling.
    *Tools > Options > Advanced > General: Browsing: "Use smooth scrolling"

  • On my Cinema Display the screen is blurry and shifts with mouse movement.

    I have had this screen for a year and a half and only use it once a week in my remote office. This morning I noticed blurring on the screen and the whole screen shifts up/down, left/right with mouse movement. Please help. I am getting a headache.
    Thanks In Advance,
    Rob

    Press Command-Option-8 once or twice.
    You have Zoom on. It is controlled in "Seeing" in "Universal Access" system preference, and by Control-Scrollwheel.

  • I cannot play the m4v movie (Linear)  I downloaded with the U2 album "No line on the horizon". I have the latest versions of itunes and quicktime. I have a windows 7 computer. Can you help.

    I cannot play the m4v movie (Linear)  I downloaded with the U2 album "No line on the horizon". I have the latest versions of itunes and quicktime. I have a windows 7 computer. Can you help.

    Hi whatisitagain, 
    Thank you for participating in the Apple Support Communities. 
    If the movie you downloaded from the iTunes Store is not playing in iTunes for Windows, start with the troubleshooting tips in this article:
    Troubleshooting iTunes for Windows Vista or Windows 7 video playback performance issues - Apple Support
    All the best,
    Jeremy 

  • Exporting from a 2D line graph with .jpeg extension

    Is there any way to export from an ordinary 2D line graph with .jpeg extension so that with using this image i will improve my result of exporting excel.
    e.g. i have found and example and added a button as you will see when you run this code.I will click this button and it will export this line graph with extension .jpeg so that i will see it as an ordinary image at my home directory.
    Thanks for any helpful comment
    Regars,
    Serhat
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    * @author led1433
    import java.awt.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import javax.swing.*;
    public class LineGraph
        public static void main(String[] args)
            int x1 = 1000,y1 = 0;
            JFrame f = new JFrame();
            JButton exportToJPegButton = new JButton("EXPORT WITH JPEG");
            exportToJPegButton.setToolTipText("Exports Graph with extension *jpeg");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            exportToJPegButton.setSize(200,25);
            f.add(exportToJPegButton).setLocation(x1, y1);
            f.getContentPane().add(new GraphPanel());
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
    class GraphPanel extends JPanel
        final int
            HPAD = 60,
            VPAD = 40;
        int[] data;
        Font font;
        public GraphPanel()
            data = new int[] {
                120, 190, 211, 75, 30, 290, 182, 65, 85, 120, 100, 101
            font = new Font("lucida sans regular", Font.PLAIN, 16);
            setBackground(Color.white);
        protected void paintComponent(Graphics g)
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D)g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                                RenderingHints.VALUE_ANTIALIAS_ON);
            g2.setFont(font);
            FontRenderContext frc = g2.getFontRenderContext();
            int w = getWidth();
            int h = getHeight();
            // scales
            float xInc = (w - HPAD - VPAD) / 11f;
            float yInc = (h - 2*VPAD) / 10f;
            int[] dataVals = getDataVals();
            float yScale = dataVals[2] / 10f;
            // ordinate
            g2.draw(new Line2D.Double(HPAD, VPAD, HPAD, h - VPAD));
            // tic marks
            float x1 = HPAD, y1 = VPAD, x2 = HPAD - 3, y2;
            for(int j = 0; j < 10; j++)
                g2.draw(new Line2D.Double(x1, y1, x2, y1));
                y1 += yInc;
            // labels
            String text; LineMetrics lm;
            float xs, ys, textWidth, height;
            for(int j = 0; j <= 10; j++)
                text = String.valueOf(dataVals[1] - (int)(j * yScale));
                textWidth = (float)font.getStringBounds(text, frc).getWidth();
                lm = font.getLineMetrics(text, frc);
                height = lm.getAscent();
                xs = HPAD - textWidth - 7;
                ys = VPAD + (j * yInc) + height/2;
                g2.drawString(text, xs, ys);
            // abcissa
            g2.draw(new Line2D.Double(HPAD, h - VPAD, w - VPAD, h - VPAD));
            // tic marks
            x1 = HPAD; y1 = h - VPAD; y2 = y1 + 3;
            for(int j = 0; j < 12; j++)
                g2.draw(new Line2D.Double(x1, y1, x1, y2));
                x1 += xInc;
            // labels
            ys = h - VPAD;
            for(int j = 0; j < 12; j++)
                text = String.valueOf(j + 1);
                textWidth = (float)font.getStringBounds(text, frc).getWidth();
                lm = font.getLineMetrics(text, frc);
                height = lm.getHeight();
                xs = HPAD + j * xInc - textWidth/2;
                g2.drawString(text, xs, ys + height);
            // plot data
            x1 = HPAD;
            yScale = (float)(h - 2*VPAD) / dataVals[2];
            for(int j = 0; j < data.length; j++)
                y1 = VPAD + (h - 2*VPAD) - (data[j] - dataVals[0]) * yScale;
                if(j > 0)
                    g2.draw(new Line2D.Double(x1, y1, x2, y2));
                x2 = x1;
                y2 = y1;
                x1 += xInc;
        private int[] getDataVals()
            int max = Integer.MIN_VALUE;
            int min = Integer.MAX_VALUE;
            for(int j = 0; j < data.length; j++)
                if(data[j] < min)
                    min = data[j];
                if(data[j] > max)
                    max = data[j];
            int span = max - min;
            return new int[] { min, max, span };
    }

    GraphPanel stays the same.
    public class JpegExport {
        public static void main(String[] args) {
            final GraphPanel graphPanel = new GraphPanel();
            JButton exportToJPegButton = new JButton("EXPORT WITH JPEG");
            exportToJPegButton.setToolTipText("Exports Graph with extension *jpeg");
            exportToJPegButton.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    exportToJpeg(graphPanel);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(exportToJPegButton, BorderLayout.NORTH);
            f.getContentPane().add(graphPanel, BorderLayout.CENTER);
            f.setSize(400, 400);
            f.setLocationRelativeTo(null);
            f.setVisible(true);
        private static void exportToJpeg(GraphPanel graphPanel) {
            try {
                int w = graphPanel.getWidth();
                int h = graphPanel.getHeight();
                BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                graphPanel.paint(g2);
                g2.dispose();
                ImageIO.write(image, "jpeg", new File("export.jpg"));
            } catch (IOException e) {
                e.printStackTrace();
    }

  • Stacked Bar Graph with a line plotting count

    Hi everyone
    I am facing a problem with plotting a stacked bar graph with a line or dot for count.
    I have 2 y axes and one x-axes.
    Can anyone help out with suggestions as to how to do this in 9i Reports.
    Thanks
    Neelima

    The graph wizard in Reports 9i allows you to create a dual Y combination graph - is this not sufficient for your needs, or am I missing something?
    Danny

  • Combine a Bar Graph with a Line Graph!

    Is it possible to combine a Bar Graph with a Line Graph because occasionally we wish to use both bars and lines on the same plot.
    If yes, could you please give us a sample rtf file?
    Thanks,
    -Ritu

    Hi Tim,
    To be more clear, I need to superimpose the two graphs.
    For example,the first one shows the budget for each month along with the actual expenditures as a bar graph. The other shows the cumulative budget, forecast and costs for the entire project as a series of lines. The first graph uses the scale on the left side of the graph and the second graph uses the scale on the right side.
    Thanks,
    -Ritu

  • Unwanted Mission control openings with mouse movement

    Many times Mission Control will open when I make a fast movement up or down with Magic Mouse. It's happening more and more, and very annoying.
    ais there any way to turn it off? I can't figure out what iscausing it.  Thanks - Rick

    It's caused by a double-tap with two fingers on top of the Mouse.
    You can turn it off in System Preferences > Mouse > More Gestures tab > uncheck Mission Control.
    Regards,
    Captfred

  • Camera moves with mouse

    Hi guys,
    Just a quick post with HOPEFULLY a quick and helpful answer.
    See
    the background effect on this game which moves the background
    when the mouse is moved, I would love to know how to make something
    similar to that. Can you either, Direct me to a tutorial that will
    teach me how to do this OR do you know the script to do this?
    All help is appriciated!
    Thankyou!

    well, if you really want to duplicate the effect of your
    link, just use a scrolling movieclip whose scrolling is a function
    of the mouse position.
    the class below sets up the scrolling for a member of the
    class. usually a mask is used to display the scrolling movieclip
    and this class requires one. just use a mask movieclip the same
    dimensions as your stage:

Maybe you are looking for

  • Login to portal from a 3rdParty Web site without logon promt??

    Hi Experts,     We have developed a new WD ABAP Application thats available via IVIEW on the portal. Client wants to access this application via a Link in a website. Since he already validates user login to this Website, we need a seamless connection

  • Email Template

    Hi, I have a new requirement that the standard text mail should be sent out as an HTML Email. I was thinking of a HTML template which would have "customized tags" which I can replace at run time based on the data from some datasource. The Email Templ

  • Toggle pen pressure in flash cc

    Hello, I feel quite foolish, but I cannot find the "pen pressure" or "pen sensitivity" or any setting enabling use of a tablet in Flash CC. I have scoured forums for the past few hours and noticed a lot of issues with tablets not functioning... but I

  • Will my music and playlist be there if Itunes is deleted from my computer and I reinstall it

    Will my music and playlist be there if Itunes is deleted from my computer and I reinstall it*

  • Error message trying to update apps

    I am getting message "an error has occurred" every time I try to update my apps.  My iPad updates work fine and nothing else seems to be affected.  What's going on??  Please help.