LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stacking Plots

I'm trying to plot five data points in a waveform graph. I need to stack plots such that two data points appear in one plot and three in the other. Please see the simple program attached. Any help you can provide will be greatly appreciated.

0 Kudos
Message 1 of 9
(536 Views)

Hi GRC,

 

attaching your VI downconverted for an older LabVIEW version will help you to reach a broader audience.

Most say "LV2021 or older", I prefer LV2019…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 9
(498 Views)

If you know which measurements to plot on each plot area, you could create a separate chart for each set of signals:

dsbNI_0-1764881917166.png


I turned off the 'stack charts' option above to allow for the grouping (Plots 1,2; Plots 3,4,5) in your post.

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 3 of 9
(441 Views)

Thanks for your reply. I know I can use individual charts and you can also put all the data points in one chart and stack them, but I was trying group them first (into arrays or clusters) and then stack them. Any thoughts?

0 Kudos
Message 4 of 9
(438 Views)

I don't know how to do that with a chart in LabVIEW.

You could implement the chart update behaviors with a Mixed Signal Graph (MSG). The mixed signal graph allows you to specify which signals are assigned to which plot areas, but I don't recommend MSG as it can be finnicky.

In your application, is the number of signals fixed? the number of charts?
If the number of signals is variable, but the number of charts is fixed, I would place a graph for each chart, buffer the data to create the chart update effect, and send an array of buffered signals to each graph.

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
Message 5 of 9
(430 Views)

It is not clear what you want to achieve. Can you make a sketch?

0 Kudos
Message 6 of 9
(317 Views)

nevermind

0 Kudos
Message 7 of 9
(315 Views)

@GRCs wrote:

Thanks for your reply. I know I can use individual charts and you can also put all the data points in one chart and stack them, but I was trying group them first (into arrays or clusters) and then stack them. Any thoughts?


Why not just use a cluster of two charts?

 

altenbach_1-1765213816824.png

 

 

Message 8 of 9
(273 Views)

I'm not sure what you mean by "Stack them".  I can think of two scenarios:

  1. Create Upper Chart and Lower Chart (two separate Charts).  Make them the same width and same X scaling, and align them so that Upper is right above Lower.  Create separate plots for the two Charts.
  2. Plot a single chart, but have two "Y" axes, the one on the Left where you plot, say, Channels 1, 2, and 4, and the one on the Right where you plot Channels 3 and 5.

Option 1 has already been suggested, but I gather isn't what you mean.  Option 2 actually exists for LabVIEW Charts and Graphs.  However, it can be very tricky to implement!  I actually tried to do this for plotting a Waveform Graph showing 7 channels of Flow rates (units liters/min) and one of Coolant Temperature (°/sec), but eventually gave up and created two graphs (Option 1, above).

 

Bob Schor

0 Kudos
Message 9 of 9
(125 Views)