LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
thesnarfman

Autoscale Only When Go Outside Scale Range

Status: New

Want to have graph display a certain scale unless values go outside scale min or max and then do autoscale but only in direction which scale bounds were crossed.

Example:
Normally want graph to display X scale 0 to 10 to display to user:
Scale 0 to 10 look good.PNG
If set same graph to autoscale would get the following graph that user could interpret as values are swinging all over the place but this could just be noise and I do not want to display this format to user:
Autoscale Bad.PNG
So I want a solution that incorporates manual scale and autoscale by autoscaling only after scale limit is exceeded. Asume get a data point of 13 which is above the max scale range of 10, graph would do a single autoscale only in direction above 10 to change max to 13.
Desired Result.PNG
Would be Graph Scales property. Option disabled if Autoscale was selected.
Properties.png

I know can use property nodes to programatically do this in my program but it is much more involved having to constantly check to see if values have gone outside range and then issue a single Autoscale.

15 Comments
fabric
Active Participant

One effect of this would be that the range can only ever grow. Would that be ok with you? 

 

I understand your use case (and I have implemented a variety of scaling algorithms in the past to overcome the shortcomings of the built-in autoscale), but in this case I'm saving my kudos for a more symmetric solution... 

crossrulz
Knight of NI

So maybe a minimum scale (must be at least this size)?  Sounds like it could be useful, particularrly when your data gets into the linear range and you just see the noise.  I say it is at least worth looking into, but I have reservations about this actual implementation.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Intaris
Proven Zealot

I say give us a property node where we can pass in a VI reference which does the autoscale for us, similar to how Callback VIs are created (pushing functionality into the control).

 

Or expose an "Autoscale Filter?" and "Autoscale" Event so that we can do this ourselves (pulling functionality into our code).

Mads
Active Participant
ZX81
Member

I wish I could 'kudos' Intaris's response.

 

I searched yesterday morning for a post along these lines, and when I didn't see it, I started a new post of my own.  But I waited to post it till I got LV-2015 installed to verify it wasn't already fixed.  I posted it this morning, then saw this post....  Sorry for the duplication.

 

My approach was to add a 'minimum-span' to the auto scaling.  It wouldn't guarantee that 0..10 would be shown; it might show 1..11 instead.  I like the idea you (thenarfman) described for many cases, too.  My focus was on temperatures that wouldn't have a good starting range.

 

I like where you're going with it, but would suggest some label differences.  Maybe:

 [X] Autoscale

   [______0]  Minimum

   [_____10]  Maximum

 [X] Always include above values in display

 [____5]  Minimum span in Autoscale

 

or 

 [X] Autoscale

   [______0]  Minimum

   [_____10]  Maximum

 [X] Autoscale always includes range:

   [____0] to [___10]

   [____5]  Minimum span in Autoscale

 

 

I had also suggested the autoscaling shouldn't change quite so often--it's very distracting, and hard to compare a moving point to a moving scale.

 

   Do not down-scale if contents over [_50]% current display

   Up-scale [__5]% beyond data span

 

(My last suggestion would be hard to implement, and not commonly needed:  tie scales on different graphs together)

 

___________________
CLD, CPI; User since rev 8.6.
Intaris
Proven Zealot

Regarding autoscaling changing too often: There's a little-known property (because it's not exposed ont he properties dialog - bold dog NI) called autoscale delay which does what it says on the box.

 

If the graph needs to be zoomed out (data off-plot) it does it automatically, if it needs to get smaller then it will wait X seconds before doing it.  Try setting this value really really large and you nearly have the "only grow" autoscale (it will never contract).

ZX81
Member

Awesome!  Thanks Intaris (about the delayed scale-in).  That'll help me a lot.

___________________
CLD, CPI; User since rev 8.6.
altenbach
Knight of NI

There are quite a few ideas expanding/limiting the autoscale functionality. Maybe there should be a gigantic list of what we want. Some are mentioned here and elsewhere. All can be simulated using property nodes, of course:

 

  • This idea
  • One-sided autoscale. I often want one side fixed at zero (or some other value). would also help here.
  • Symmetric autoscale: force zero to be in the center, i.e. scale goes from -max(abs(y)) to  +max(abs(y))
  • Square pixels: Useful for XY graphs and intensity graphs. autoscale both axes such that a circle appears round or an image mapped into an intensity graph is not distorted. If I fit a circle to data, it should look like a circle!!! (This is currently difficult because it depends on the size of the plot area).
  • ...

 

 

JB
Trusted Enthusiast
Trusted Enthusiast

Like fabric, "I have implemented a variety of scaling algorithms in the past to overcome the shortcomings of the built-in autoscale".

Therefore, kudo for a global thought about autoscale.

Manzolli
Active Participant

How about adding to the original idea of waiting until there is a value out of the current range these two:

 

1) A lock (on/off) for minimum, maximum. Locking or unlocking both we would have same behaviour as the proposed idea.

 

2) Range limits: minimum (never be smaller than a value), maximum (never be greater than a value). Free can be achieved by putting -Inf for minimum and Inf for maximum.

 

3) Define some rules to solve possible conflicts between 1) and 2).

 

The sure thing is that some improvement in AutoScale will be very welcome. Kudos!

André Manzolli

Mechanical Engineer
Certified LabVIEW Developer - CLD
LabVIEW Champion
Curitiba - PR - Brazil