XY graph : Plot point by point

hi my intention is to plot in a XY graph point by point. Meaning for eg: I want to plot a scatter plot.
First I check if the array element satisfies a certain condition (let's say if it lies between 1 to 5) if So I want to plot in red color, else I want to check another condition (let's say lies between 5 to 10) and then plot in blue color and so on.
First I check for the condition and link it to a case structure such that each case structure will contain the  corresponding plot color but it doesnt seem to be working.
Kindly guide me with this.
thanks!!
Solved!
Go to Solution.

Hi Chathuri,
If you want to plot a scatter plot, you can do this by editing the properties of the XY graph.  Righ-click on the X-Y Graph object and click on Properties.This will bring up the property viewer. If you then go to the Plots tab, you should see a screen similar to the one shown as an attachement. The fourth column from the left sets the display type and if you click the top diagram, you will display individual data points. I have circled this in the attached diagram. You will also need to set the tick markers to display.  You can do this if you set the third column from the left. 
Hope this helps,
Andrew McLennan
Applications Engineer
National Instruments
Attachments:
XYProperties.JPG ‏45 KB

Similar Messages

  • How do I make an XY-Graph plot points over time?

    I am building a program to plot and take data of a relationship between two voltages.  One is voltage is uniquely dependent on the other.  So far I have successfully built an XY-Graph to plot the voltages against each other (Voltage1 along the x-axis and Voltage2 along the y-axis).  However, the XY-Graph only diplays the point (V1, V2) at the instantaneous time I am looking at it, and does not continuously plot different points as I vary the independent voltage.  I need the graph to display all the points that occur as I vary the independent voltage.  As of right now, all I see is one little cursor that moves all over the graph as I vary it.  My program consists of a While Loop that contains all of the following:  two seperate data anolog input functions that take both voltage separately from my board.  The the output samples from each 'AI Sample' function are then bundled into one cluster using the 'bundle' function.  The cluster output from the 'bundle' function is then wired to a 'build array' function.  The 1-D array output from the 'build array' function is then wired to my 'XY-Graph'.  How do I get the XY-Graph to plot a point every millisecond or so?

    Bundling and then using the Build Array is not correct. Yuo can see the correct method in the help for an XY Graph below. In order to use the normal XY Grpah, you would have two shif registers. One for the X array and one for the Y. Bundle the two arrays and then wire to the graph.
    The other way is to use the Express XY Graph. With that, you can just wire your scalars to the X and Y inputs and set the Reset input to false.
    Message Edited by Dennis Knutson on 11-12-2007 06:32 PM
    Attachments:
    XY Graph 1.PNG ‏21 KB
    XY Graph 2.PNG ‏6 KB

  • Xy graph in PDA module does not plot points or update

    The XY Graph for PDA does not plot points or update. Input data is simple cluster of floating point data (x,y)in while structure. The axes scale properly with Configure PDA XY Scales.vi. Cursor legend also OK. Checked line and point attributes-OK. Running 7.0F1 and pocketPC2003. Please help.

    Garret,
    Can you attach the VI so that we can see it? If you think it is a bug in the toolkit, rather than a programing thing I would suggest sending an e-mail to NI. In addition are you using eVT 3 or 4 or both?

  • Annotation​'s "D1","D2",​... to be added to graph when points are added to graph....

    hi ...
    Good morning...
    Text labels "p1","p2" , & so on ... should be named for points added to the graph for plot 1 only not all plots...  .
    As in the graph when a particular point is ploted we can right click on graph & add annotation ... to mark tht point ...
    but if we dont want user to do it manually.. & as the points will be  ploted in graph tht  points should be labeled  p1,p2,.respectively..... then how to go about it ...
    I tried checking in property node .. annotation list is thr ... but all i want is just the point name to b changed for each point not other properties...
    I am Using LABview 8.0
    Waiting in anticipation ...
    Regards
    Yogan

    Hi yogan,
    In order to do this you can read the AnntList property which will output an array of clusters. You can then modify just the Name value in a cluster and write it back to the AnntList property.  There is an example that ships with LabVIEW that demonstrates programmatically editing annotations.  You can find this in LabVIEW by going to the Help menu, and clicking on Find Examples.  Then browse to Fundamentals >> Graphs and Charts >> Programmatically Annotate a Graph.vi.  Specifically, pay attention to the "Avg" Value Change event in the Event Structure.  This shows how to modify the name of an annotation.
    I hope this helps!
    Brian A.
    National Instruments
    Applications Engineer

  • Help plotting points in a java Applet using Bresens Algorithm

    Hi,
    I am trying to compile my code and it doesn't like POINT. I am guesing I am using the wrong thing.
    Point.point(Math.round(x), Math.round(y)); and I tried just Point.
    How do I plot points so that it forms a line. What internal function do I use?
    Here is my code.
    import java.applet.*;
    import java.awt.*;
    import java.lang.Math;
    import java.awt.Point;
    import java.awt.Graphics;
    public class DDASimple extends Applet
         int   dx, dy, steps, k, absolutex, absolutey;
         float xinc, yinc, x, y;
       public void init()
    public void paint(Graphics g)
    DDASMPL(50,50,100,150);
    public void DDASMPL(int x1, int y1, int x2, int y2)
      repaint();
      dx = (x2-x1);
      dy = (y2-y1);
    //absolutex =
      if( Math.abs(dx) > Math.abs(dy))
         steps = Math.abs(dx);
      else
         steps = Math.abs(dy);
         xinc = dx / steps;
         yinc = dy / steps;
         x = x1;
         y = y1;
    Point.point(x1, y1);
          for (k = 1; k < steps; k++)
              x = x+ xinc;
              y = y + yinc;
    Point.point(Math.round(x), Math.round(y));
    //g.drawOval(Math.round(x), Math.round(y));
         }//end else
    }//end function dda
    }//end class ddda applet

    I took out the repaint(). and below is the updated version
    I am not getting anything now, no line
    import java.applet.*;
    import java.awt.*;
    import java.lang.Math;
    import java.awt.Point;
    import java.awt.Graphics;
    public class DDASimple extends Applet
         int   dx, dy, steps, k, absolutex, absolutey;
         float xinc, yinc, x, y;
       public void init()
    public void paint(Graphics g)
    DDASMPL(160, 140, 220, 140, g);
    public void DDASMPL(int x1, int y1, int x2, int y2, Graphics g)
      dx = (x2-x1);
      dy = (y2-y1);
    //absolutex =
      if( Math.abs(dx) > Math.abs(dy))
         steps = Math.abs(dx);
      else
         steps = Math.abs(dy);
         xinc = dx / steps;
         yinc = dy / steps;
         x = x1;
         y = y1;
    //Point xxx = new Point(x1, y1);
    g.fillRect(x1, y1, 1, 1);
          for (k = 1; k < steps; k++)
              x = x+ xinc;
              y = y + yinc;
    //Point.point(Math.round(x), Math.round(y));
    g.fillRect(Math.round(x), Math.round(y),1 ,1);
         }//end else
    }//end function dda
    }//end class ddda applet

  • 3D graph plot properties - cannot be changed

    Hi all,
    I still cannot change the plot properties of the 3D graph.  I open the Plot Properties tab up and it gets stuck on the first page.
    This means that I cannot release any VIs which use the 3D graph - a big problem.
    Has anyone else experience this?  What do you suggest to fix it.
    Thanks,
    Battler.

    I have experienced exactly the same behavior (can not change 3D graph plot properties) with 3D plots (scatter and surface) in LabVIEW 2011.  The 3D plot properties page works correctly at first but then fails to switch pages after larger data sets have been loaded to the graph.  For example, my scatter graph contains 13 plots, each with 320 points of data.  Once the page "gets stuck" it is stuck for all 3D graphs until the offending graph is deleted and re-created.  To reproduce this issue create at least one 3D plot with a large number of plots in it.
    On a related note, if there was a programmatic method for deleting plots from a 3D graph then it's possible that this issue could be worked around.

  • Change order of wpf graph plots

    I'm trying to solve following issue. Let's say I'm sampling data once per second and showing it on the graph. I want to show history of the data, say last 20 plots using the same color with fading. What I do now:
    - create 21 plots, say Plots[0]..Plots[20] 
    - at meas 1, set Data[0] = data
    - set Plots[0] opacity to 1
    - at meas 2, set Data[1] = data
    - set Plots[1] opacity to 1, Plots[0] opacity to 0.5
    - at meas 3, set Data[2] = data
    - set Plots[2] opacity to 1, Plots[1] opacity to 0.6, Plots[0] opacity to 0.3
    - at meas 21, set Data[20] = data
    - set opacity to 0.1..1
    // we're fine as of now, here comes the tricky part
    - at meas 22 I need to remove the data of meas 0 (stored at Data[0]) and replace it with the new data
    - so I set Data[0] = data
    - set Plots[0] opacity to 1 (it's the newest result)
    - set other plots opacity 0.1..0.9
    // and here is the problem: Plots[0] is now at the bottom of the plot stack and is covered by 20 other plots, thus is barely visible
    so I somehow need to move Plots[0] to the top of the stack
    I've tried removing Plot and Data of the farthest plot and adding creating plot with the most recent data, but it leads to incorrect indices (Plot.Index grows all the time, but Data array stays the same)
    Another option would be to fix plots order and opacity in advance, and change data for all plots all the time. But I assume this would be very slow (think of 20-50 copies of the plot with say 1000 points).
    So, any bright ideas here?

    Idea 1) Pre-allocate all of the fade plots, use BeginInit/EndInit when updating the Data collection, and always apply the newest data to the last plot. In pseudo-code:
        // initial setup
        for( opacity = 0..1 )
            var renderer = new Renderer( opacity )
            graph.Plots.Add( new Plot { Renderer = renderer } )
        // on data update
        graph.BeginInit()
        for( i = 1..graph.Data.Count )
            graph.Data[i - 1] = graph.Data[i] /* shift old data down */
        graph.Data[20] = /* assign new data to the last plot */
        graph.EndInit()
    Idea 2) If you just want the historic data visible in the graph (i.e. you do not need to query or interact with the old data through the graph), and if your range is stable, then you could have one plot in the graph and use a PhosphorColorRamp to get the visual fade effect. In pseudo-code:
        // initial setup
        var brush = new SolidColorBrush( C )
        Graph.SetPhosphorMode( brush, Immediate )
        graph.Plots.Add( new Plot { Renderer = new Renderer( brush ) } )
        graph.RenderMode = Raster
        graph.PhosphorColorRamp = new FadeRamp { Color = C, Duration = 20, DurationKind = Frames }
        // on data update
        graph.Data[0] = /* assign new data to first plot */
    (Note that the phosphor effect is one of the areas being updated, so the syntax will be changing in the next release of Measurement Studio.)
    ~ Paul H

  • Iam using a table in numbers to plot daily graph lines. If I fill a cell with a text box  at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is tho

    I am using a table in Numbers to plot daily graph lines. Mood swings of how I am on the day, i"m a depressive.
    If I fill a cell with a step box at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is there a work around. so thatbgraph only plots on the day?

    The answer is (sort of) in your subject, but edited out of the problem statement in the body of your message.
    When you use a stepper or a slider, the value in the cell is always numeric, and is always placed on the chart if that cell is included in the range graphed by the chart.
    But if you use a pop-up menu cell, you can specify numeric or text values in the list of choices for in the menu. Numeric values will be shown on the chart. Text values will not.
    For the example, the values list for the pop-up menu was:
    5
    3
    1
    Choose
    -1
    -3
    -5
    The first pop-up was set to display Choose, then the cell was filled down the rest of the column. Any text value (including a single space, if you want the cell to appear blank) may be used instead of Choose.
    For charts with negative Y values, the X axis will not automatically appear at Y=0. If your value set will include negative values, I would suggest setting the Y axis maximum and minimum to the maximum and minimum values on your menu list, rather than letting Numbers decide what range to include on the chart. Place a line shape across the chart at the zero level, and choose to NOT show the X axis.
    Regards,
    Barry

  • How can i remember array, a using after next time in graph plot

    Hello i have a two graph , first graph case 'AF' consist with 3 arrays a second graph case 'BF' consist with 3 arrays + i need arrays of case 'AF', how can i do it? I have attached example.
    Thanks
    Attachments:
    0408 (16A) v jednom CASE.vi ‏398 KB

    Hi,
    If i have understood you right, you want to save the AF graph plots.
    am i right? if not plz correct me.
    If i got u right, the simplest is to build a 2 D array by merging your 1D arrays and write to spreadsheeet file.
    Now, you can read it whenever u want and display on the XY graph.
    hope this help, if not, plz eloberate on what you are looking for.
    Regards
    Dev

  • Changing Graph Plot Legend

    I have no problem changing a normal graphs plot legend with a property node, but I'm trying to display three different sets of data on one graph.  I tried doing it using a plot reference with the Plot Legend and using Caption Text.  They should be settable when the VI is running, but the way I was trying to do it I got a reference error (1055 Reference Invalid).  Setting either the Plot Legend or Caption Text would be acceptable if I could just figure it out.
    I'm trying to display 32 spectrums, but only use 8 graphs and have the name of the particular channel change.  Doing this without doing an FFT the channel name gets brought into the graph, but when I use the Power Spectrum VI I don't have the Spectrum Info wired into anything.  So, I'm bringing my original channel name array over and trying to do an iteration to pick the correct plot reference and channel name.
    I've extracted only the part of my code for this question, so hopefully it is easy to look at what I'm doing.
    The first VI and SubVI are functional.  The second SubVI is where I was attempting to change the Caption Text.  I've tried other things too, but I just wanted to show one way I was attempting to do it.
    Solved!
    Go to Solution.
    Attachments:
    Part of Analyzer - Displaying Graph Legend.vi ‏1432 KB
    Calc Channel Indices 1_35.vi ‏27 KB

    I don't have the SV add on so I can't check out your main program. I looked at your sub vi and you're doing more code than you need to. Take a look at my example, I've put your 8 graphs into a cluster then used an array of references along with arrays for your chanel indecies. Maybe it can give you some ideas for your program.
    Attachments:
    Calc Channel Indices 1_35 mod.vi ‏766 KB

  • Printing graph plot only no background graph

    Hi
    I can able to print total graph ok.
    But i want to print graph plot only no backgroung.
    how can i do it.
    Regards,
    hari

    Check the attached example (created in LabVIEW 9.0f3).
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    Example.vi ‏13 KB

  • Bode plot instrument reading differs when compared to grapher plot

    Good Day,
    Need some help to understand why the bode plot instrument plot (clicking the instrument to see plot) is different from the grapher plot when run in "simulate >>> analysis >>> AC analysis >>> vertical scale (db) >>> simulate.
    Problem happens if the AC source AC analysis magnitude is changed from 1(default) to another value. i.e 6.
    Please help advise, it seems the bode plotter is only considering the default AC analysis default magnitude value of 1?.
    Appreciate comment on this. Thank you
    The circuit being simulated is AC source connected to an RLC circuit and Vo is accross C. L and C assume some small series resistances.

    Hi educ,
    In the AC Analysis I set the stop frequency to 100 KHz which is the stop frequency of the Bode Plotter instrument. When I ran the analysis after doing this and compared it to the bode plotter, it was a nearly identical output. Try to configure the start and stop frequency to match in the AC Analysis and in the Bode Plotter and you should see much better results.
    Regards,
    Tayyab R,
    National Instruments.

  • Urgent ! help ! Pop-up panel invalidates graph cursor to snap to plot point.

    I used PlotXY in the graph control with cursor attribute of '"sanp to point" and produced a plot. Everything is OK before popup a pop-up panel. After the pop-up panel removed, the cursor can't snap to any point of the plot. I tried "SetPlotAttribute (... ATTR_PLOT_SNAPPABLE, 1)","SetPlotAttribute (..., ATTR_PLOT_ZPLANE_POSITION, 0)", they don't work.  I don't know how to solve this problem. I need your help! Thanks!

    You are using an undocumented data structure for the multiplot. (one x,  two y, e.g. as seen here).
    Each plot needs it's own x!
    If you do the following, things work just fine. (same if you use bundle, of course)
    ... and please add a wait to that while loop. It is actually not even needed. Cursors lock even back in edit mode, of course.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    XYLock.png ‏4 KB

  • Plotting point in XY Graph only

    Hey guys,
       I am new to labview and I'm wondering if it's possible to plot only one point in a XY Graph, and if it is, how can I do this? I see that when I select XY Graph in block diagram, it only has one place to wire, it doesn't have a place where I can put my X and Y coord's to that specific point... I'm lost here!
    Thanks for any help, guys!

    Pedro_ wrote:
    Thanks for your help!
    Just insert a "built array" of height=1 between the bundle and the graph terminal.
    Also place a small wait inside the loop.
    Also turn off autoscaling for the axes.
    I would do the math explicit, not with express VIs. (I don't htink the math is correct yet).
    I would also graph the four points of the wheel contacts to verify correct scaling.
    LabVIEW Champion . Do more with less code and in less time .

  • Is there a limitation of 1024 points graph plotted using for Trend Tags.vi (DSC)

    I am using LabVIEW 6.1 and DSC 6.1. When I display a Trend graph captured using 'Trend Tag.vi' the graph with more than 1024 points, the X-scale max reverts back to 1023. I am not using any autoscale.

    The Real-Time Trend control from the DSC control palette is a "regular" LabVIEW Waveform Chart with a chart history length of 1024 values.
    Right click on the Real-Time Trend and go to "Chart History Length..." and increase the number as you wish.
    Currently, there is no way to programmatically change this history length. But (I think) National Instruments is aware of this suggestion.
    Hope this helps
    Roland

Maybe you are looking for