LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Autoscale XY Graph with 2 plots

I have a graph with 2 different plots on the same Y axis. If I turn off the "visible" property on one of these plots (so I have only one plot visible), the autoscale Y continue to take both plots into account, thus creating a very too large scale for the visible plot. Is there a way to autoscale only one plot while another is hidden but associated with the same scale?
0 Kudos
Message 1 of 3
(2,933 Views)
You have several possibilities, for example:

* instead of setting the property to invisible, temporarily replace one graph with empty data. (see attached sample code).

* Don't use autoscale, but use ArrayMinMax on the visible y values, the set the yrange.minimum and yrange.maximum accordingly.

*switch the second plot to a second y scale while invisible and back to scale 1 when visible again.

* any other variation of the above.
0 Kudos
Message 2 of 3
(2,933 Views)
> I have a graph with 2 different plots on the same Y axis. If I turn
> off the "visible" property on one of these plots (so I have only one
> plot visible), the autoscale Y continue to take both plots into
> account, thus creating a very too large scale for the visible plot. Is
> there a way to autoscale only one plot while another is hidden but
> associated with the same scale?

I think the right approach will be to update the data in the graph to
contain only the one plot. I'm not actually that familiar with the
hidden plot property. The documentation doesn't state how this is
supposed to interact with autoscaling, but from what you say, it treats
the plot like it is transparent but still onscreen. This sounds like it
should be filed as a bug.

G
reg McKaskle
0 Kudos
Message 3 of 3
(2,933 Views)