Hiding plots programatically in XY graphs

My data acquisition plots five y values along a time axis. There are occasions when the number of plots is less than this due to user set-up of the test. The problem that I have is that the XY graph continues to plot all five values with the empty values drawn on the zero line of the y-axis. Whenever I try to disable the visible property of the plots it doesn't seem to recognise them as active plots and delivers an error code saying 'Invalid property...."etc. The plots can be made invisible only if the user choose to acquire 5 sets of data. Can you help?

Make sure you are using the order: Set Active Plot -> Set Active Plot's Property
As in the attached LV 6.1 example
2006 Ultimate LabVIEW G-eek.
Attachments:
Vis_Graph.vi ‏45 KB

Similar Messages

  • How to Generate Event on change in Plot Legend for XY Graph

    Hi,
    I have two XY graphs on the front panel and would like to maintain a common plot legend such that any change in the plot legend affects both graphs.
    Objective: I would like any value change in plot legend to fire an event.
    How do I program that?
    I know of value change event for the graph but am unable to find something specific to the plot legend. Other option is to have the user press a "refresh" button that will fire the event.
    Feel free to share thoughts on other elegant methods to achieve the same objective.
    Thanks,
    Gurdas
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu

    Hi Sarah,
    Looks like you are talking of exactly what I want!
    I have attached a sample VI to try achieve what I want. But it still has some issues which are:
    1) I am unable to configure a Plot Attribute Change Event. I have used a mouse leave event instead. How does one configure a Plot Attribute Change Event?
    2) Is there no single property which will transfer all the settings of plot legend from one graph to plot legend of another graph? In my sample VI, I have to read each property of the master graph and feed it into the slave graph.
    Kindly note I am using LV FDS 7.1 on Win2000
    Thanks,
    Gurdas
    Message Edited by Gurdas on 03-27-2006 11:51 PM
    Gurdas Singh
    PhD. Candidate | Civil Engineering | NCSU.edu
    Attachments:
    Graph_PlotLegend_Event.vi ‏45 KB

  • Multi plot cursor in Mixed Graph

    If Digital waveform and normal waveform graph is plotted in a mixed graph, and if I choose watch all plots(multi plot) in cursor, LabVIEW closes immediately with an error popup dialog
    I have attached the print screen image of that error popup
    Attachments:
    error.JPG ‏188 KB

    Hi Stephen,
               I found a considerable solution to overcome that error.
               Build all the array data at first and then generate digtal
    waveform in single instance.
               ie., With number of numerical array data, build a 2D array of
    numerical data and make a transpose and then generate a waveform.
               It generates number of digital waveform equal to that of the
    column size of 2D Array.
               Do not build generated digital waveforms. This creates an error
    while using multi plot cursor--> watch--> All plots.
               I have attached the modified, bug removed Vi with this message for
    your reference.
    Regards,
    Raja
    Project Engineer
    Soliton Technologies
    www.solitontech.com
    Attachments:
    Mixed Graph Modified without Error.vi ‏25 KB

  • How do I determine the number of plots on a waveform graph?

    How do I determine the number of plots that have previously been plotted on a waveform graph? I am loading dynamic data from a file. If I convert to an array and size it and there is only one plot, I get the number of data points and I don't know how to tell the difference.

    Usually by reading the graph terminal or a local of it and determining the first or second dimension (not sure which at the moment) size of the resulting 2 dimensional array. If it is a 1 dimensional array you have either only one plot or an array of clusters each representing one plot. But as these data types are determined by compile time, there shouldn't be a problem with this causing ambiguity.
    Rolf K
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Best way to programatically re-size graphs?

    I have a window that pops up, containing X-Y graphs, that are say, 600 pixels wide.
    Under some circumstances, I want to reduce this to say, 400 pixels, and uncover a cluster of numeric displays occupying the other space.
    I would like to set the BOUNDS.WIDTH of the graph so that it extends right up to the POSITION.LEFT of the cluster.
    But I can't adjust the BOUNDS.WIDTH of the graph itself (that property is read-only).
    I can adjust the PLOT AREA.SIZE.WIDTH of the graph, which will affect the BOUNDS.WIDTH.
    But I can't use that for calculations, because I don't know the margin between the plot area and the graph bounds.
    I want it to work when the user re-sizes the window (All objects are scaled when window re-siz
    es). He may resize the window, close it, open it again and the size remains as he left it. That means I can't use absolute pixel values to move things around.
    I have thought of using decorations: a hidden rectangle that's the size of the small plot area, and another one that's the size of the large plot area. Then set the plot area's SIZE.WIDTH to the width of the small or large decoration. They decorations would scale along with everything else, and all would be OK.
    1... Does anyone have a better / different idea?
    2... If not, how should I get the reference to the decorations? They can't be named. Using the VI reference, I would have to pick out decorations #3 and #4 or something (there are other decorations already present). That just seems a bit fragile. How can I move these new ones to be #0, and #1 ??
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    Hi,
    Here's what I've used to do this;
    1) Get the DesiredSize (bottom-top, right-left). The origin can be set, so
    that should be easy...
    2) Calculate the "Bounds" - DesiredSize.
    3) Add the "PlotAreaSize" to the result.
    4) Put it in the "PlotAreaSize".
    The quoted names are property values of the graph. Just a tip: put it all in
    a subvi that uses a refernce to the control.
    The logic behind this is that the difference between the total bounds, and
    the plot area is constant.
    Regards,
    Wiebe.
    "CoastalMaineBird" wrote in message
    news:[email protected]...
    > I have a window that pops up, containing X-Y graphs, that are say, 600
    > pixels wide.
    >
    > Under some circumstances, I want to reduce this to say, 400 pixels,
    > and uncover a cluster of numeric displays occupying the other space.
    >
    > I would like to set the BOUNDS.WIDTH of the graph so that it extends
    > right up to the POSITION.LEFT of the cluster.
    >
    > But I can't adjust the BOUNDS.WIDTH of the graph itself (that property
    > is read-only).
    >
    > I can adjust the PLOT AREA.SIZE.WIDTH of the graph, which will affect
    > the BOUNDS.WIDTH.
    >
    > But I can't use that for calculations, because I don't know the margin
    > between the plot area and the graph bounds.
    >
    > I want it to work when the user re-sizes the window (All objects are
    > scaled when window re-sizes). He may resize the window, close it,
    > open it again and the size remains as he left it. That means I can't
    > use absolute pixel values to move things around.
    >
    > I have thought of using decorations: a hidden rectangle that's the
    > size of the small plot area, and another one that's the size of the
    > large plot area. Then set the plot area's SIZE.WIDTH to the width of
    > the small or large decoration. They decorations would scale along
    > with everything else, and all would be OK.
    >
    >
    > 1... Does anyone have a better / different idea?
    >
    > 2... If not, how should I get the reference to the decorations? They
    > can't be named. Using the VI reference, I would have to pick out
    > decorations #3 and #4 or something (there are other decorations
    > already present). That just seems a bit fragile. How can I move
    > these new ones to be #0, and #1 ??

  • How can i make a plot in a 3d graph invisible

    hello all,
    attached is a half-way completed vi which shows how i would make the plot/plots in the 3d graph invisible. unfortunatly i do not know how "item" can refer to the plot i want to make invisible.
    any ideas?
    Solved!
    Go to Solution.
    Attachments:
    remove plot in 3d graph.vi ‏27 KB

    You are almost correct.
    The Item input is a string whose value is the name of the target plot. You can view all the plots names from shortcut menu->"CWGraph3D" group->"Properties" item->"Plots" tab ->"Plots" list.
    Attachments:
    remove plot in 3d graph.vi ‏20 KB

  • How to Stack 16 Plots in an 8-Graph Chart

    Here's a good one:
    I have a stacked chart with 8 graphs. I'd like to display 16 plots on the 8 graphs with each 2 plots overlaid (in different colors). Is there a way to do that?
    Fataneh

    Hi Fataneh,
          Using the "transparent" color you could make one of two charts "see-through"...
     - what do you think?
    When they give imbeciles handicap-parking, I won't have so far to walk!
    Attachments:
    overlay.GIF ‏61 KB

  • How can I draw two differenct plots at the same graph?

    [I am beginner]
    I have two different set of data which have differenct x-axis values. How can I draw two data at the same plot?
    For example, one data set is
    x y
    1 3.5
    3 2.3
    5 1.3
    8 3.2
    The other
    1 2.3
    2.5 5.4
    4 2.5
    If I use m_graph.plotXvsY two times. But it draw only one graph at the same time.
    Please let me know. Thank you in advance.

    Do you really need the two sets of data on the same plot or is what you really care about is that the two sets of data are in the same graph? If it's the former, then there's not much that you can do since a plot can only contain one set of data. You can append to an existing set of data by calling the corresponding Chart (for example, ChartXvsY) method, but the result is that the plot's data will appear continuous.
    If it's the latter, the way to do this is to add multiple plots to the graph and plot each set of data in a separate plot. For example, go to the Plots tab in the graph's property pages, add another plot, then here's some sample code that demonstrates how to plot the sets of data from your example above:
    double xData1[] = { 1, 3, 5, 8 };
    double yData1[] = { 3.5, 2.3, 1.3, 3.2 };
    CNiReal64Vector xDataSet1(4, xData1), yDataSet1(4, yData1);
    m_graph.Plots.Item(1).PlotXvsY(xDataSet1, yDataSet1);
    double xData2[] = { 1, 2.5, 4 };
    double yData2[] = { 2.3, 5.4, 2.5 };
    CNiReal64Vector xDataSet2(3, xData2), yDataSet2(3, yData2);
    m_graph.Plots.Item(2).PlotXvsY(xDataSet2, yDataSet2);
    Hope this helps.
    - Elton

  • Is apple allow core plot framework to draw graph in iPhone app?

    is apple allow core plot framework to draw graph in iPhone app?

    Wrong forum. Ask in the developer's forum.

  • I need to graph data and stack the plots to create 3 graphs, how do I plot more than 1 data line on each graph

    I currently use a code heavy solution thats clunky and need to refine the graphing part. For simplicity I want to use the waveform chart and its "Stack Plots" option. However I cannot see how to collect 2 or 3 data streams and display them on 1 of the stacked plots.
    The final verson will have 3 stacked plots, the top plots needs 3 data streams, The middle & bottom plots require 2 data streams.
    Help Appreciated

    Hi,
    Sometimes the Synchronous Display option makes a difference (right
    mouse>advanced>Synchronous Display). Or while running, right click>Smooth
    Updates. Fiddle around with them, sometimes unexpected settings has the best
    performance (only four combinations anyway).
    Regards,
    Wiebe.
    "CB" wrote in message
    news:50650000000500000005810100-1079395200000@exch​ange.ni.com...
    > Dennis,
    > Thanks for that, I had tried your solution earlier while developing
    > the package. A bit dissapointing the stacked plots wont work. it'd
    > save lots of code and simplify the whole graphing part of my package.
    > I am reluctant to overlay transparent graphs etc on top of others
    > because I am aware it could hinder performance, I am doing a lot in my
    > pac
    kage and need to get the most out of the machine. My current
    > solution is nearly ok and consists of 3 waveform charts contained in a
    > cluster. I need the 3 charts to line up accurately and be of identical
    > size which involved plugging into the various sizing/xy line up params
    > which was a bit fiddly. The main problem is the bottom graph seems to
    > end up lagging at some point which gives doesnt look too good. When
    > the PC gets loaded up with too much work its best effort means the
    > bottom graph get missed out (or something like that) occasionally. I
    > have noticed this on all the machines it has run on even my new 3Ghz
    > machine.
    > I am sure this could work ok but I cannot figure how to force the
    > graphs to only continue once all 3 have their data.
    > Thanks in advance, Regards, Chris

  • Can I add a second plot to an XY graph without having to re-draw the first?

    Hi,
    I'm trying to figure out a way to add a second plot (a linear fit between 2 cursors) to an XY graph without having to redraw the first plot (the underlying data). The reason this is important is that the first plot is typically hundreds of thousands of data points (or more), and it is slow to redraw. I would like the user to be able to move cursors around and dynamically do a linear fit to the underlying data in the range between the two cursors, with the line being drawn as the second plot.
    My current program just wires both plots to the graph and re-draws both. This ends up being quite slow.
    Ken

    Here's a quick draft how you could draw the regression line (LabVIEW 8.2). Modify as needed.
    Message Edited by altenbach on 10-28-2007 12:51 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    DrawRegression.png ‏28 KB
    PlotLine.vi ‏46 KB

  • Hiding plots in legend

    Hello,
    I am currently producing a XY graph based on a set of points.  Along with this, I plot three trendlines that the user then will select from.  When he/she selects one of the trendlines, I wish for the other two to disappear.  Currently, I am able to use the Property "Plots"->"Visible" to cause the actual trendline to disappear.  However, the name of the plot is still shown in the legend (although the sample of how the curve looks is blank as desired).  I am wondering if there is a way to cause the name in the legend to also disappear. 
     I know that it is possible to use "Legend" -> "Number of Rows", but this seems to limit the plots shown in the legend based on their order.  For example, if I have plots "Curve", "Trendline 1", "Trendline 2", "Trendline 3", and desire to select Trendline 3 only, setting Number  of Rows to 2 will show "Curve" and "Trendline 1".  I believe it is possible to take the data and reformat it so that the second plot becomes the desired trendline, but I was hoping to avoid this if possible. 
    I attached a small VI to show what I am doing so far.
    Thanks
    Attachments:
    VisiblePlot.vi ‏18 KB

    Hello Guruthilak,
    Thank you for the reply and sample VI.  While the VI that you attached was certainly better than my original, there is still the issue of the blank space existing where the trendline used to be.  I also programmed the attached VI based on your first approach.  The issue is that when I rename the plots to the legends, it just renames the existing trendlines.  For example, if I want "Curve" and "Trendline2", the Legend will read
    "Curve - <white line>"
    "Trendline2 - <blank space>"
    Is there an additional step that must be taken? 
    Thank you again for the help
    Attachments:
    VisiblePlot[1]_Mod[2].vi ‏23 KB

  • How to obtain plot list from xy graph

    Hi!
    I have a XY Graph and I wnat to get the number of Plots in that Graph. There is no Property for this.
    Anyone knows how to do this?
    Bya
    hmann

    hi
    i don't know, but try it with the "array size" function... a xy-graph is a 1d-array of clusters. in these clusters there are two 1d-array which represent x and y coords. the "array size" function should return the number of plots (clusters) of the xy-graph.... try it and let me know if it works..
    ciao

  • Multiple plots in Express XY graph

    Hello,
    I'm trying to have several plots in an Express XY graph and use it without clearing data on each call - like a chart.
    On the Y Input, I'm inserting an array with 2 values (1 for each plot) and in the convert to dinamic data I choose 1D array of scalars - multiple channels. The problem is that there's only one plot in the graph.
    See attached example test.vi
    Can anyone help?
    Thanks.
    Attachments:
    XYtest.vi ‏117 KB

    Hi Paulo
    You need as many x arrays of values as y arrays of values.
    See attached doc
    Cheers
    Alipio
    "Qod natura non dat, Salmantica non praestat"
    Attachments:
    XYpairs.doc ‏46 KB

  • Multi-plot cursor in xy graph

    I am using an XY graph with 5 curves which belong to one of two y axes each. All curves share the same array of x values. I do not like the cursor legend so I want to read out the values of the one cursor programmatically. I can create a multi-plot cursor which watches all the 5 curves but I cannot find how I can read out the 5 corresponding y values of my cursor. Any help?
    Thanks,
       LX (using LV2014)

    Use the cursor index property value and wire that to an index array function for each y array.

Maybe you are looking for