LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Autoscale Y axis

Hello,
I would like to autoscale the y-axis in a X-Y plot with the minimum set always to 0 and while the maximum autoscales. I tried to set y-scale start and minimum (using the XY plot properties) but still the y range minimum is set to the minimum value of the data. I would like the y-axis scale to be set at 0 for the minimum and the max. of the data for the maximum. Can anyone help with this. Thanks.
0 Kudos
Message 1 of 9
(5,864 Views)
Hi,

when you used the property node did deactivate the feature "auto scale" in the context menu?
If not, the values will be written to the y scale but immediatly afterwards the y scale will perform an autoscale and you won't see the result of thw writting of the property node.

Stephan
0 Kudos
Message 2 of 9
(5,864 Views)
Stephan,
Thanks for your comments, but I am afraid I do not follow your advice. In the property node, I cannot see any context menu. I previoulsy had several property nodes so that the user could either autoscale or set the max and the min manually. Could you please elaborate on your comment? Thanks.
Karthik.
0 Kudos
Message 3 of 9
(5,864 Views)
Dear Karthik,

sorry, I was a bit unprecise!
There is no context menu for the property node, but if you click right on the graph belongig to it on the front panel than you will get a context menu.
There you have to disable "auto scale" for the y axis.
This should be menu item under y axis or similar (unfortunate I have a german version of LabVIEW, so I'm not aware how the correct names of the menu items og the english version might be).

Stephan
0 Kudos
Message 4 of 9
(5,864 Views)
Here are 2 quick methods of doing it. I would suggest method 1 for efficiency. I am sure there are other ways, too.
0 Kudos
Message 5 of 9
(5,864 Views)
Don't mess with "scale start", etc. just write the following three properties:

YScale.ScaleFit (0=don't autoscale)
YScale.Minimum (0)
YScale.Maximum (Y(max))

As shown in the attached image.

(Since you mentioned that there are other property nodes on your diagram, make sure they don't fight with these new settings.)
Message 6 of 9
(5,864 Views)
Hi Jeremy,

Welcome to the Exchange!

It is generally a good idea to summarize your examples that you post. That way;

1) We do not have to down load your code to see what "method 1" is.

2) You can resize your porperty nodes and mainipulate the properties from top to bottom in the order you want. This will avoid the multi-frame seq structure.

3) Defering front panel updates and then undefering afterwards may improve performance and appearence.

Trying to help,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 9
(5,864 Views)
> I would like to autoscale the y-axis in a X-Y plot with the minimum
> set always to 0 and while the maximum autoscales. I tried to set
> y-scale start and minimum (using the XY plot properties) but still the
> y range minimum is set to the minimum value of the data. I would like
> the y-axis scale to be set at 0 for the minimum and the max. of the
> data for the maximum. Can anyone help with this. Thanks.

You can either turn off autoscaling and set the max Y Scale each time
you write data to the graph. There are some subVIs in the Picture
Examples for determining the max and min using pretty much the same
algorithm that LV uses. Or you can write the data to LV and immediately
set the min to zero leaving autoscaling on. You might try this in a
s
ingle property node or in a tightly sequenced set of property nodes,
possibly with panel updates turned off when doing it.

Greg McKaskle
0 Kudos
Message 8 of 9
(5,864 Views)
Hi Jeremy,

I failed to mention that your option 1 is a good approach.

If you look below you will see that Greg was on the same wave-length.

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