Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic interval in yaxis for waveform graph

Hi all, I have a waveform graph with a fixed x-axis of 1000 points. For the y-axis, I would like to have some sort of autoscaling and so i chose AutoScaleLoose mode for it.

 

However, The intervals between the major divisions is too small as I would like to have some buffer on top and below the graph. E.g., in the below image, 4 intervals above and 4 intervals below...

 

In addition, when the waveform changes, I would like this interval to change according too. The number of intervals should ideally be the same as before (etc, 8 intervals)

 

Untitled.jpg

0 Kudos
Message 1 of 3
(3,893 Views)

Hi there,

 

If I understand your requirement correctly, you want the YAxis to have some more spacing awailable above and below the range set by the graph.

For example, if the graph sets the Range value to (0, 2), you want the range to be say (-2, 4) by the factor of lets say 1).

 

Below are some images that I got from the attached code.

 

 

In the below images the red and green values are the actual range that the graph calculates. But in the code I set the range to have some space above and below the data.

 

adjustRange1.png

 

adjustRange2.pngadjustRange3.png

 

 

 

 

Hope this helps.

 

-Vijet

0 Kudos
Message 2 of 3
(3,882 Views)

Hi Vijet, thanks a lot! The setting of the range in yaxis with the customised calculation is good 🙂

0 Kudos
Message 3 of 3
(3,874 Views)