LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can one plot, having a variable range, on a multiplot overlay Chart be used to control YScale.ScaleFit? I don't want stacked charts.

I can get Stacked Plots to Y-Scale fit OK, but these take up too much room on the screen for my application. When I switch the chart to Overlay Plots the YScale.ScaleFit property uses the Y-range for all of the plots, rather than for the selected plot. Is there a solution? Thanks.
0 Kudos
Message 1 of 5
(3,222 Views)
If I understand you, you want to have one plot in the overlay plot to set the Y-scale range for all the plots. Yes?

To do that will require some code. The order needs to be something like this:

1. Write data to the plot, have autoscale Y turned off on all the plots but one.

2. Read the scale ranges from the one autoscaled plot.

3. Write those values to the scale ranges for all the other plots.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(3,222 Views)
I tried this approach using two plots (one is 5X amplitude compared with the other), but when I clear the chart and try to read the range for the lower amplitude plot by making it the active plot I get the range for both the plots. Please tell me how to read the range correctly. Thanks.
0 Kudos
Message 3 of 5
(3,222 Views)
Hi DexterLM,

Using one plot to control another plot�s Y-scale can be done by using property nodes. However they must be separate plots. I have created an example VI (attached) where I put a transparent chart (x and y scales are not visible) on top of another chart. The visible chart controls the x & y axis range of the transparent chart. You will notice that the transparent chart has to be the same size as the visible chart and overlaid exactly on top of the visible chart. For questions about making front panel objects transparent go to help and search for "transparent".

Hope this will help!

Regards,
Brooks W.
National Instruments
0 Kudos
Message 4 of 5
(3,222 Views)
> I tried this approach using two plots (one is 5X amplitude compared
> with the other), but when I clear the chart and try to read the range
> for the lower amplitude plot by making it the active plot I get the
> range for both the plots. Please tell me how to read the range
> correctly. Thanks.

It sounds like there is a bit of confusion about Range. Range and
autoscaling are a scale property, not a plot property. You can have
multilple scales and can assign a plot to any scale you like, so one
option is to have a visible scale and your primary plot mapped using the
visible scale. Make an additional scale and hide it. Map the other
plots to the hidden scale and you will programmatically set the range of
that scale to be whateve
r you like, probably want to set it to match the
visible scale range. And don't forget that the Active Plot and Active
Scale are used to determine which ojects is affected by the property
changes.

Greg McKaskle
0 Kudos
Message 5 of 5
(3,222 Views)