LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to prevent graph/chart scale duplicate numbers/times

Solved!
Go to solution

I have an XY graph, where I plot values against time.

To de-clutter the X-scale, I have chosen to hide the seconds (only hours and minutes are shown).

Now it looks like there are duplicate numbers on the X-scale (marked in red).

I've tried adjusting some XScale properties such as 'minor increment' to 60, as I thought this would limit the numbers to 1 for every minute.

 

How can I prevent this behaviour?

 

labview how to prevent graph scale duplicate numbers.png

 

labview snippet duplicate x scale values.png

0 Kudos
Message 1 of 6
(3,815 Views)
Solution
Accepted by topic author SGIE

The problem may be that you are overwriting your reference, and so you changing the increment is not having any effect. Instead of wiring your array seperately to the graph, try putting a 'Value' property in your refence and wire your data up there, to prevent it getting written over.

 

I have had this problem before and this was what the problem was.

 

Hope this helps 🙂

0 Kudos
Message 2 of 6
(3,767 Views)

Hello,

 

Thanks for your posting here. I see in your code that you have any data in your XY Graph and I have to say that the XY Graph will give you a view of your corresponding data against each other. If you have two different data in your array, then it will show them in two axis. 

I think that you can use Waveform Graph instead of XY Graph. Besides, you can look at the link below with its example too.

If you have any other question, don't hesitate to ask.

 

http://digital.ni.com/public.nsf/allkb/0A4899EF6D01B9C5862568B70074F989?OpenDocument

 

Kind regards,

Hossein

0 Kudos
Message 3 of 6
(3,763 Views)

This seems to work. Note the setting of XScale.Increment AFTER setting XScale Min/Max.

If you don't, the scale is messed up once every full minute (when seconds are 0)

 

 

PS: to make this example work, delete the 'XY graph reference', and replace it with a new one you make from 'XY Graph 2'. Common vi-snippet problem I've learned.

 

 

solution.png

 

0 Kudos
Message 4 of 6
(3,709 Views)
0 Kudos
Message 5 of 6
(3,686 Views)

I found that y axis scale markers can be repeated if the format is 'SI' - marker spacing is less than the increment. Switching to 'decimal' results in markers with unique markers.

Floating vs SI units.jpg

0 Kudos
Message 6 of 6
(3,568 Views)