LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Question about stacking/overlay plots on WFM chart...

This could just be my lack of experience with wfm charts, but I've noticed some behavior I don't understand...

 

It seems that after I attempt to hook a wfm chart up to an array of wfms and change from overlay to stack plots and vice versa, it doesnt seem to take effect immediately.  I don't remember the exact sequence, but just now it (the chart) was not responding to the instruction to stack (or overlay)- I tried running it, plotted the info ok, stopped it, tried again, didnt work.  I did it ~3 times, and it worked on the 3rd time... (going back and forth between stack and overlay, it seemed to go from overlayed to stacked the 3rd time...

 

Does anyone else see this kind of behavior with wfm charts?  What do I not understand here?

 

At what point does the chart get information about how many waveforms are wired into it?  

 

also, I'm on LV2013

 

Thx

-pat

 

 

edit:  another observation: the stack plots selection/instruction didnt work until I made all of the plots on the graph visible on the plot legend...

0 Kudos
Message 1 of 5
(3,124 Views)

Can you create a simple demo showing the effect? I just tried it and it worked fine...

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 5
(3,111 Views)

here's a vi I just tried it on with my desktiop computer running 2013...

 

here's what I did- 

 

created a wfm chart on the fp. (didnt wire it up yet)

 

created wfm constant wired it into the init array, made it 3 large.

 

wired them together, go to fp and right click select stack plots ... no change.

 

expand plot legend on wfm chart.

 

right click, overlay (nothing changes)

 

right click, stack plots ...plots stack!

 

thanks for the response!

 

-pat

 

0 Kudos
Message 3 of 5
(3,109 Views)

Ok, I see the problem. And it seems there is a coupkle things going on.

 

  1. As written there is nothing that I can do to get the plots to stack because there is no data to plot. The array of datapoints if empty. This behavior makes sense.
  2. Add data to the array, run the VI, and you still don't get stacked plots unless the legend is showing three plots.

Number two is the curious, and it seems to be related to the datatype you are passing to the chart. I wrote an example that utilized 3 ramdom numbers bundled together and the bundle feeding the chart. This works as expected regardless of how many traces are shown in the plot legend.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 5
(3,100 Views)

Hello Pat,

 

In LabVIEW the number of stacked plots in a waveform chart is determined by the number of plots visible in the plot legend. Please reference the example VI I have attached to demonstrate the following:

 

1. Display three plots (0-2) in the plot legend and set the chart to stack plots. Running the VI will display the three randomly generated waveforms in three separate plots.

 

2. Display five plots (0-4) in the plot legend, set the chart to overlay plots, and then set the chart to stack plots. This refreshes the waveform chart and you should now see five stacked plots, three of which may have data retained from previously running the VI. Running the VI will update the top three plots and the other two plots will remain blank.

 

3. Display one plot in the plot legend, set the chart to overlay plots, and then set the chart to stack plots. Because only one plot is visible, the three waveforms will always appear stacked. This is because the waveform chart always displays all of the data wired to even if the number of plots is less than the number of waveforms. With one plot and three waveforms this is only possible by forcing them to overlay with one another. Note that if the legend is hidden the number of plots is still determined by the number specified in the legend.

 

4. Display two plots (0-1) in the plot legend, set the chart to overlay plots, and then set the chart to stack plots. The chart will now display one waveform in the top chart, and overlay the remaining waveforms in the second chart. Again this is because the chart always displays all data within the specified number of plots.

 

All of these situations are the expected behavior for waveform charts in LabVIEW. I hope this information is helpful!

Message 5 of 5
(3,061 Views)