From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph with 2 y scales

Solved!
Go to solution

Hello, I am using the Labview 8.2.1 and I would like to ask for a solution.

 

I use a Waveform Graph with 1 x-scale and 2 y-scales. The one y-scale is left and the other is on the right side of the graph.

I have created 2 plots and I have assigned them to the corresponding scales.

I want to plot 2 x-y arrays one after the other with different y-scales. Specifically, there must be one plot that ends at a value of the x-axis and from that point the other plot must continue using the other y-scale.

 

To do this I tried a "Sequence Structure", in the first frame of which, I create the first plot using 3 "Property Nodes": Plot.YScaleIndex , ActivePlot & ActiveYScale and I give the zero value to them in order to use the first y-scale.

In the second frame I create the second plot giving the integer 1 to the aforesaid "Property Nodes", but the first plot vanishes and the second plot does not use the second y-scale but the first one.

 

This is the frame1:

21590i7D09B94D408D3123

 

This is the frame2:

21592i211E21925A85FCF7

 

What can I do?

Thank you in advance.

 

 

0 Kudos
Message 1 of 6
(3,899 Views)
Solution
Accepted by topic author nikosfs

What happens in your sequence structure is that the second  fame overwrites the data from the first case.

21640iCD60D6A731E77465

 

You should create your two data-sets, and build an array of those, feed this into a for loop and then per data set, select the proper:

-plot (ActPlot)

-Y-scale (Plot.ScaleIdx)

-Y-scale to edit (ActYscl)

 

Then set the max and min, be aware that the second Y-scale should be created before running this code.

Another option would be to just auto-scale the Y-scales.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 6
(3,874 Views)

Thank you very much.

It works!

0 Kudos
Message 3 of 6
(3,865 Views)
Would it be even better, if on the Graph Properties page, Plot tag, one can set up the Y-scale to left or right? Good idea? But I do not know how to make recommendations to NI.
0 Kudos
Message 4 of 6
(3,198 Views)

Hi qing_shan61,

 

I encourage you to post your product suggestions on the LabVIEW Idea Exchange found here: http://forums.ni.com/t5/ideas/v2/ideaexchangepage/blog-id/labviewideas

 

Regards,

Allison M.
Applications Engineer
National Instruments
ni.com/support
0 Kudos
Message 5 of 6
(3,166 Views)

Thank you Allison M, look:

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/idb-p/labviewideas/tab/most-recent

 

Pease go in and give a Kudos!

0 Kudos
Message 6 of 6
(3,164 Views)