05-29-2012 05:04 PM
Is it possible to plot any number of curves on different XY Graphs?
In my case, sometimes I need to plot 3 curves, sometimes 4, sometimes 6, etc. Generally, it is between 2 to 6 plots on different XY Graphs.
How can I go about doing this?
What I am thinking so far is to have six XY graphs on the front panel, but somehow programmatically activate the first 2, 3, 4, 5 or however many plots I need to make.
I am really at a loss here.
05-29-2012 05:39 PM - edited 05-29-2012 05:40 PM
YIKES! Don't make 6 graphs. Just make one graph, and the graph can take an array of clusters, where each cluster element is an array.
For example, cluster element 1 is the x data array, cluster element 2 is the y data array. Then you build an array of these clusters. See below:
05-29-2012 06:15 PM
Thanks for the reply. But I must have my plots on different XY graphs. That is the whole point 😞
05-30-2012 09:50 AM
Hi Murchak,
If you really need 6 graphs, but don't necessarily want to use them all the time, you may just want to use the 'Visible' property node and set the graphs not in use to be invisible. You can see the attached vi for a short example.
Cheers,
05-30-2012 10:06 AM
Sorry, my misunderstanding. Cole's solution is best for what you're trying to do. Although, it can make your front panel look somewhat funny when you have a bunch of blank space because graphs are hidden. Would subpanels be another option, albeit not necessarily any easier or more efficient? I don't know enough about your problem to say yes or no, but that might be another thing you want to look into.
05-30-2012 11:43 AM
Thank you Cole and for(imstuck).
For my application, I have a file dialog box that opens up when I run my VI, and depending on how many samples have been tested, I plot them.
Sometimes we have 3 samples tested, sometimes 4, sometimes 6, and so on. These samples must be plotted on different XY Graphs.
What I have right now is six XY Graphs on the front panel, and if we have only tested 3 samples, I choose the three files, which will be plotted on
the first 3 XY Graphs, and the file dialog pop up opens up again and again and again until I have selected six files. Basically, the last 3 XY Graphs
will be repeat of the first 3.
I'll think more about what can be done.