LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically add multiple scales to graph

On the front panel, I can choose "duplicate scale" "delete scale" to add/remove multiple scales a Graph control.  Can I do this programmatically,i.e., use the VI to adjust the number of scales on the graph?  The purpose is to have variable number of plots on the same graph, each having a different scale.
0 Kudos
Message 1 of 9
(5,658 Views)

I have come accross that same desire.

The way I did was create all the scales I ever needed ahead of time and then turn the visibility on/off programaticly.  You can also associate plots with scales programaticly.

Dan

 

Dan Shangraw, P.E.


   

Message 2 of 9
(5,651 Views)

I use this: Add the maximum number of needed scales per hand. You can swap sides to get a better look.

To switch on/off a scale use the property "Active Y Scale" to select the scale and "yscale.visible" to switch on/off.

I've written a small demo.  I hope it's usefull.

Message 3 of 9
(5,647 Views)

Hi Andreas_Fuerst I want to create duplicate scale for waveform chart for x axis. Is it possible to create ? the duplicate scale option from that menu list was not visible. I couldn't create duplicate scale. Please refer my attachments so that you can understand my problem. 

0 Kudos
Message 4 of 9
(2,578 Views)

I would say no.  Waveform charts are special in that you send data to them one point or a few points at a time and the X-axis is constantly moving.

 

You can create a duplicate scale for the X axis on Waveform Graphs and XY Graphs.

0 Kudos
Message 5 of 9
(2,569 Views)

I came across the same issue: i want to programmatically create scales and activate them if needed. I see the visibility flag, but no way to automatically create them. Does somebody knows how to do it? or it is just not possible.

Adding it manually in advance is a solution, but not the best one.

Accessing the scale legend properties, should be possible like accessing plot legend. It is just an array....

 

Thanks!

0 Kudos
Message 6 of 9
(812 Views)

Hi Marian,

 


@Marian_G wrote:

i want to programmatically create scales and activate them if needed. I see the visibility flag, but no way to automatically create them. Does somebody knows how to do it? or it is just not possible.

Adding it manually in advance is a solution, but not the best one.


It's the same state as it was 15 years ago: create the scales manually at edit time and then you can switch their visibility at runtime…

Best regards,
GerdW


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

Hi GerdW,

 

Thanks a lot for the reply.

Too bad it was not improved until now....

 

Best regards,

Marian

0 Kudos
Message 8 of 9
(797 Views)

@Marian_G wrote:

Thanks a lot for the reply.

Too bad it was not improved until now....

 


It will be lots of work and little gain. Actually, 0 financial gain for NI...

 

It's the same for captions. You can only create them during edit time. Not even scripting can create a caption... 

0 Kudos
Message 9 of 9
(779 Views)