LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

lock grid in an XY graph

I have an XY graph with the size of 400x400. I want to always have only 10 grids (just like on X axis) on Y axis without resizing the graph or without making X or Y scale autoscale. How do I do that?
0 Kudos
Message 1 of 4
(3,195 Views)
You can use a Property Node to write an array of 11 values to the XScale.MarkerValues[] and YScale.MarkerValues[] arrays. You'll have to calculate the grid line locations from your actual data; in your example, I just picked my own sets of grid lines which mostly fit the sample data (see attachment).


Sometimes, the graph doesn't update right away. There are various tricks to force an update. In this example, I've chosen the crude but effective technique of hiding and showing the graph.

0 Kudos
Message 2 of 4
(3,195 Views)
The technique Ian describes is also useful if you have a plot with multiple Y axis and you want the grid lines from the two sides to line up.

If anybody ever wants to do that I have some subvis that manage the process...

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 3 of 4
(3,196 Views)
Hi Mike,

yes, I have to use multiple Y axis and want the grid lines of all axis to be lined up.

So I would be very glad, if you could send me your subvis...

Thanks in advance for your help...

Alf
0 Kudos
Message 4 of 4
(3,168 Views)