02-21-2018 10:49 AM
Dear all,
I want to display uncertain number lines on a XY graph, and the number of lines is typed by the user. How to do this?
Thanks,
Mei
02-21-2018 11:22 AM
The graph will display as many plots as you put into the array you wire to it, that number doesn't have to be fixed. You can change properties of the graph to adjust the number of plots shown on the legend, and the style and color of each plot drawn on the graph, on the fly.
02-21-2018 11:30 AM - edited 02-21-2018 11:31 AM
What is a "uncertain number line"?
Do you just want to display multiple plots? Are the x-values evenly spaced?
Is the number of plots fixed and you want to select/view a subset? Look at the visibility checkbox.
It would probably help if you could attach a simple VI.
02-21-2018 02:53 PM
@arteitle wrote:
The graph will display as many plots as you put into the array you wire to it, that number doesn't have to be fixed. You can change properties of the graph to adjust the number of plots shown on the legend, and the style and color of each plot drawn on the graph, on the fly.
While I am not sure abou the currnet version of LV but at one time, we would get errors if we presented more plots to a graph at run than there had been plots in the plot legend.... Something about invalid some such.
Ben
02-21-2018 03:02 PM - edited 02-21-2018 03:07 PM
The oldest version I have installed is 2015, but in it and 2017 you can create a brand new XY Graph with only one plot shown in the legend and feed it an array of 100 plots, and it'll graph them all using assorted default colors.
02-21-2018 04:23 PM - edited 02-21-2018 04:24 PM
@arteitle wrote:
The oldest version I have installed is 2015, but in it and 2017 you can create a brand new XY Graph with only one plot shown in the legend and feed it an array of 100 plots, and it'll graph them all using assorted default colors.
You got an error if trying to set an "active plot" property for a plot that does not exist yet. (e.g. if you have 100 plots and try to set the color of plot # 102 via a property node).
You can wire more plots than legends and that worked always.
02-22-2018 04:33 PM
Thanks, I can change the display number by your method, but I still do not know how to write the input. I got an array(the dimension is typed by users ) as output from an instrument, now I want to display these lines (the first dimension is the x value, and y values respond the remaining dimension). How to write these? Can I explain clearly?
02-22-2018 04:39 PM
Thanks. "uncertain number line" means I do not know the number of lines displayed as the number is typed by the user. The x value is from the instrument and the number of plots is not fixed. I got an array(the dimension is typed by users ) as output from an instrument, now I want to display these lines (the first dimension is the x value, and y values respond the remaining dimension). I am very sorry I still do not know how to begin this vi, so I cannot upload a sample...
02-22-2018 05:50 PM
@M.Mei wrote:
Thanks. "uncertain number line" means I do not know the number of lines displayed as the number is typed by the user. The x value is from the instrument and the number of plots is not fixed. I
So all y traces share the same x-values? You still have not said if the x-values are evenly spaced.
02-23-2018 04:27 AM
Yes, all the y traces share the same x values, and the x value are not evenly spaced.