LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I programatically "reset scale layout"?

When ploting waveform and XY graphs, sometimes the X scale goes weird and Xmin goes beyond the visible plot area. This problem is corrected by making right click-advanced-reset scale layout. Is there any way to do this programatically? Thanks

Daniel
Message 1 of 9
(4,388 Views)
Hi Daniel,

If the Xmin sometimes is out of the range of what you are expecting and do not want the graph to do that, you should turn off the autoscaling function (Right Click->X Scale->Autoscale). You can do the same thing programmatically using XScale.Scale Fit property in property node. Wire a zero constant to the Scale Fit property to turn off autoscaling. You can also set the minimum value of X scale by using the X Scale.Range.Minimum property.

Regards,
Ankita A.
0 Kudos
Message 2 of 9
(4,388 Views)
Hi. Thanks for your answer.

My problem is not about autoscaling. It's about a graph scale display problem that happens sometimes when I zoom in and the Y scale values have a lot of digits.

My question points to "reset scale layout" programatically. Is it possible to do that?

I understand that it may be difficult to understand the problem I try to describe, so when it happens again I'll get a screenshot and post it.

Thanks,

Daniel
0 Kudos
Message 3 of 9
(4,388 Views)
Hi Daniel,

It is not possible to "reset scale layout" programmatically. You can however set the Marker Values programmatically using property nodes.

Regards,
Ankita A.
0 Kudos
Message 4 of 9
(4,388 Views)
Hi, Ankita. Attached there is an image of the problem I have. Please note that the minimum value of the X axis is mislocated.
I've had the same problem ocassionally on different programs I made. I'm now using LV7.1 but I remember I got the same problem on LV6.

Which would be the best method to correct this programatically?

Thank you.

Daniel
0 Kudos
Message 5 of 9
(4,388 Views)
Hi Daniel,

Please try out the attached example. Try to plot your data in the graph in this example and see if you are able to correct the xscale programmatically using this VI.

Please let me know if you have any questions/comments regarding this issue.

Regards,
Ankita A.
0 Kudos
Message 6 of 9
(4,388 Views)
Hi.
I implemented your method in my program, but I'm afraid it didn't work out.

I really don't have no idea about how to correct this problem.

Regards,

Daniel
0 Kudos
Message 7 of 9
(4,388 Views)
Hi Daniel,

I cannot think of any other way to reset the scale programmatically. I think your best bet would be to do it using the front panel.

Reagrds,
Ankita A.
0 Kudos
Message 8 of 9
(4,388 Views)
This strange behaviour may be related to a bug in the graph scale management known to affect the Y scale. Have a look at previous discussions here
I'm sorry that you will have to wait for a fix by NI. In the mean time, try to find a work-around playing with the property node...

CC
Chilly Charly    (aka CC)
0 Kudos
Message 9 of 9
(4,388 Views)