LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

questions on XY Graph

Solved!
Go to solution

Hi, i believe many people have already asked this question, but i couldn't find solution to my problems below.

 

  1. i would like to plot multiple Y-axes on same X-axis (time) using X-Y Graphs . The reason i am using X-Y graphs is I have data (both amplitude and timestamp) in an array, so it would make sense to directly plot the arrays as it is rather than using a for loop to plot 1 element at a time.
  2. I would like to stack multiple Y-axes just like the waveform charts using X-Y Graphs, not sure if it is possible to do that?

 

Has anyone tried something like this before?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 1 of 10
(3,718 Views)

Yes.

 

Right click your y-axis and choose "duplicate scale".

Expand your plots so you see at least Plot 0 and Plot 1. 

Right click one of the plots and choose Y Scale as Amplitude 2.

 

Multiple Axes.png

0 Kudos
Message 2 of 10
(3,707 Views)

Thank you, i know how to do that on front panel, how would the block diagram look like?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 3 of 10
(3,691 Views)

You just have to set it up on your front panel once and it is done. You can use property nodes to make plots visible/invisible or use the Plot.YScaleIdx (Y Scale Index) to choose which scale to use, but I imagine you won't really need to change it on the fly...

0 Kudos
Message 4 of 10
(3,685 Views)

One of my favorites

 

An array of clusters of arrays of clusters.

 

Smiley Happy

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 10
(3,677 Views)

@Ben wrote:

One of my favorites

 

An array of clusters of arrays of clusters.

 

Smiley Happy

 

Ben

 

 


That sounds very confusing, can you please share a picture of such vi?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 6 of 10
(3,666 Views)
Solution
Accepted by topic author LV_Enthu

@LV_Enthu wrote:

@Ben wrote:

One of my favorites

 

An array of clusters of arrays of clusters.

 

Smiley Happy

 

Ben

 

 


That sounds very confusing, can you please share a picture of such vi?


No but I will ry to explain. Starting at the end of the expresion and working back to the left.

 

Clusters - a cluster with two values, an X and a Y. The cluster is a point to be plotted.

 

Arrays of clusters - the array is one of the plots on the graph.

 

Clusters of ... - LV does not let you do arrays of arrays (that would be a 2-D array) so each plot gets wrapped in a cluster.

 

An array of clusters of arrays... - Each array is one of your plots.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 10
(3,661 Views)

Thank you that helped... 

 

Sorry i had another follow up question, can i stack these multiple graphs just like waveform charts?

 

If nt, is there a way to have 1 axis on left and other axis on right, just like excel?

Now on LabVIEW 10.0 on Win7
0 Kudos
Message 8 of 10
(3,655 Views)

I don't believe you can stack them. You can swap sides by right clicking the axis and selecting "swap sides"

0 Kudos
Message 9 of 10
(3,651 Views)
Solution
Accepted by topic author LV_Enthu

Yes after doing what Greg described above you right-click one of the scales and select "swap sides" to move the scale to the other side of the graph. Greg also explained how to associate a plot with the proper Y-Scale.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 10 of 10
(3,649 Views)