LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plotting a graph with array values

Solved!
Go to solution

I have a 2D array. The first colum is the X axis values and the other 4 colums each Y axis .

 

How can i plot such a graph?   A graph with 1 X axis and 4 Y axis sca

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 1 of 11
(3,959 Views)
Solution
Accepted by topic author Nghtcrwlr

Hi Nghtcrwlr,

 

use DeleteFromArray to get the first column and the remaining ones. Then use an autoindexing FOR loop (on the Y data) to build an array of plot for a XY graph from each Y column and the X column:

check.png

Best regards,
GerdW


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

Thanks GerdW . I am planning to have 4 diferrent Y axis Scales. I duplicated the Y scale 4 times. I found out the max n min in each column to set the Y scale range according to it. But it seems one can only scale the Y axis in general using PropertyNode.

Is there any way to scale each one using property?

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 11
(3,927 Views)

Hi Nightcrawler,

 

did you notice the property "Active Y Scale"? Did you read it's help entry?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 11
(3,921 Views)

I am having a graph with 3 Y-axis scales. Temp, Current & Gear Efficiency. I want to set each axis a specified range ( min & max)
I tried using the property for graph "Plot.YScaleindex" for each scale and then setting min max. But somehow it is not wroking properly. Does anyone have any idea? Is it not possible to scale all 3 scales at a time?

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 11
(3,849 Views)

Hi NightCrawler,

 

do you actually read the answers you get on your questions?

If yes: why don't you follow them?

 

(There's a reason why I moved your message into this older thread of yours!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 11
(3,839 Views)

Hi GerdW

 

Sorry for the misunderstanding. Soemthing else was in my mind. The actual problem was: the Y scale of my second plot ( gear efficiency) always changes to another scale ( to temperature) . It only happens to Gear efficiency. All other scales remains same as saved.

 

 

 

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 11
(3,825 Views)

Are they set to Autoscale?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 11
(3,802 Views)

No . they are not set to autoscale. It happens only when i press Autoscale button. So i guess it has something to do with property node

Nghtcwrlr

---------------------------------------------------------------------------------------------
*************************************
---------------------------------------------------------------------------------------------
0 Kudos
Message 9 of 11
(3,790 Views)

Hi Nightcrawler,

 

AGAIN: Please read the answers you get - and read them carefully!

 

I recommended to use the property "Active Y Scale", but you used "Plot.Y Scale Index".

PLEASE READ THE ANSWERS YOU ALREADY GOT!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(3,787 Views)