LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Glitchy Y axis on an intensity Graph

Solved!
Go to solution

Ok guys/gals,

 

I have an intensity graph inside of a loop that has a Y scale that is a little glitchy.  I need to control the graph dimension based on output from another system that generates the data and the graph needs to be inside of a loop in order to manipulate the data with a real-time display of what is being done.

 

I'm a little hung up on getting rid of the Y scale glitch, the max value is jumping every time the loop executes.  I can make it better by removing the SetYScale.Max feature of the property node and just let it autoscale but it doesn't remove it totally even then.  There has got to be a way to do this where the display is stable.  Any help would be appreciated.

 

I've attached an example code.

0 Kudos
Message 1 of 8
(2,523 Views)
I can't run your sample, because you don't attach data. But if your data always the same size, why you are using rescale? Set fixed sizes and switch off auto scale. Alse use scale->range->minimum instead scale->range->start
Message 2 of 8
(2,486 Views)

The data can just be as simple as a 10x10 2D array of random numbers in the form of a CSV, it's an intensity Graph.

 

The data is not always the same size, the data i'm working with will always have the same number of columns but will have many different row counts.  So when the system that i'm pulling data from spits out the row size i set the scale based on that.  That is why i use YScale.Maximum property.

0 Kudos
Message 3 of 8
(2,474 Views)

So, what's the problem?
What you mean with "Y scale that is a little glitchy."

0 Kudos
Message 4 of 8
(2,472 Views)

Did you run the code?

 

Usually the data is anywhere from 900 - 1800 rows but 1000 columns, maybe size matters.  The Y scale seems to bounce around during the refresh of the loop, it appears to round up to the next highest 100.  For example if the Y scale come in at 1435 (rows) the graph will glitch the Y scale at 1500 then correct to 1435 and repeat...its pretty fast but it's really annoying to look at.

 

I've attached some actual data, it is glitchy on my end see if is for you too.

0 Kudos
Message 5 of 8
(2,466 Views)
Solution
Accepted by topic author coolhandLV7

You are setting the y range 4x/second to a specific value but also have it set to autoscale. These settings keep fighting each other.

Turn of autoscale

 

(Or leave it at autoscale and remove that entire property node.)

 

Set the range and other properties whenever there is new data or when they change and not over and over. For example the zscale markers never change, so that belongs before the loop.

 

(Why are you using "RngStart" instead of "minimum"? Why is the max wired to a constant with the wrong representation?)

Message 6 of 8
(2,455 Views)

Rng.Start is a typo, it should be and is XScale.Minimum in the actual code.  Also the (Z) scale is a control in the actual code i just put it in there quickly for this example, the operator needs to have the ability to change the (Z) scale and have it update so it needs to be in the loop.  The representation as a DBL is unnecessary, it's just the default for the property the data scale dimensions will always be integer values.

 

Un-checking AutoScaleY and Loose Fit  seem to be the problem works well now.  Thanks.

0 Kudos
Message 7 of 8
(2,444 Views)

@coolhandLV7 wrote:

The representation as a DBL is unnecessary, it's just the default for the property the data scale dimensions will always be integer values..


But the property is DBL, so the constant should be DBL too. No big diea, though.

 


@coolhandLV7 wrote:

... the operator needs to have the ability to change the (Z) scale and have it update so it needs to be in the loop. 


 

It still should only execute when the setting is changed, and not with every iteration of the loop.

 

Same for the height map terminal. The terminal should only get written if there is new data and not over and over with the same data. Look into event structures. Most of my programs use 0% CPU unless something is changed.

 

0 Kudos
Message 8 of 8
(2,430 Views)