LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph with dynamic number of plots

I've got an XY Graph with some dynamic number of plots to graph. Once I know this number, I change the LegPlots property and plot the data from an array containing all the plots. The data is displayed correctly, but I get overlapping colors. Say I'm only trying to graph 3 plots. I get three lines (good) but then the three lines have 29 colors (bad), as if it's plotting all possible plots at the data points of the three. The legend updates to only show three (good), but am I missing something else? Does the LegPlot property not govern that, but only governs the legend itself?
0 Kudos
Message 1 of 4
(3,214 Views)

Could you post code or a screenshot? It sounds like you may be entering the data incorrectly to the XY Graph.

Michael

0 Kudos
Message 2 of 4
(3,207 Views)
If the problem is the code then I'll take a look at my mess of wire, I just wanted to see if it was the LegPlots property first.
Here's what it looks like, just in case
0 Kudos
Message 3 of 4
(3,200 Views)

I think I understand now. The LegPlots does NOT govern which graphs are shown on the graph, only how many graphs are shown in the Legend itself. (PS, this is an outdated property anyways if you are using LV8.5). If you want to limit the number of graphs shown on the graphs itself, you have a couple of options:
1. Grab an array subset of your data and wire it to the XY Graph.
2. Make a For loop, with N being the number of graphs, and set for each graph the "Plot.Visible" property.

Hope this answer is in the right direction.

Michael

0 Kudos
Message 4 of 4
(3,196 Views)