LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

graph scale doesn't use up the full plot area

The x-scale on my XY Graph doesn't go all the way to the edge of the plot area. I have attached a bmp showing what I mean. The 0 point of the X axis on the bottom plot is at the edge of the black plot area; however, it is a little bit in on the top one, and no data is plotted to the left of it. I am completely unable to figure out how to get it to move back, nor am I able to get it to go bad on demand. This has happened to me in the past, and has even gotten about half-way across the plot area, but I have never seen it happen. I have only noticed it after the fact.

How do I get my origin to be at the origin?

Thanks,
Matt K
0 Kudos
Message 1 of 12
(3,802 Views)
There are some bugs around with scale management in LabVIEW graphs. I spent a significant number of hours on such issues, and the only poor solution I found was to restore the axis to their original position using Right click>Advanced>Reset scale layout. Unfortunately, this is not accessible programatically.

CC
Chilly Charly    (aka CC)
0 Kudos
Message 2 of 12
(3,777 Views)
Have you tried the property node X Scale>Range>Minimum set to zero (or whatever you want). Disable autoscale on that axis and set the min and max programmatically.
0 Kudos
Message 3 of 12
(3,773 Views)
Resetting the scale layout gave me the attached picture, which is just as bad as what I had before. However, when I brought that control into the control editor, resetting the scale layout gave me something that looked much better. I only needed to do some minor resizing.

Thanks for the suggestions.
Matt
0 Kudos
Message 4 of 12
(3,751 Views)
Have you tried turning of Loose Fit? Right click the graph and select X Scale. Loose Fit is the default. Deslect it and see if that fixes your problem.
0 Kudos
Message 5 of 12
(3,747 Views)
Hello Matt,

I would also suggest right-clicking the graph and selecting Properties. A box will appear. Then select the tab for Scales. In the drop down box make sure that you select X axis. Then deselect autoscaling and put your minimum value as 0. This should set the origin to zero.
Try this out. If these suggestions do not work for you, I would like to try and recreate the problem here. If you could simplify your program down to the minimum that still illustrates the problem, I could try and find the problem.

Thanks,
Caroline
National Instruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
0 Kudos
Message 6 of 12
(3,722 Views)
Caroline

I tried your suggestion, but it didn't work.
So I copy and pasted the bad graph and the good graph into a vi and am including it with this response.

Good luck.
Matt
0 Kudos
Message 7 of 12
(3,715 Views)
I forgot to mention that I have been using LabVIEW 7.0. I have 7.1, but I haven't upgraded yet due to the number of other systems I will have to update the run-time-engine on.

Matt
0 Kudos
Message 8 of 12
(3,561 Views)
You may have copied the graphs but you didn't copy the data. There's nothing in your example that shows the problem you're having. To save default data, go to Operate>Make Current Values Default. Save the VI and repost it.
0 Kudos
Message 9 of 12
(3,707 Views)
The data isn't what's important. Wire whatever data you want to it, and the top graph will still have its x-origin a little bit to the right of the edge of plot area.

There have been several suggestions about checking the scale and autoscale. These don't affect where the left-most tick is located; they only affect what the value is. I believe that the problem is one level down in the control definition stating where the x-axis is relative to all the other decorations. Unfortunately, when the tick starts migrating to the right, it is not because I have edited the control in the control editor, but rather that LabVIEW itself has done something.

Matt
0 Kudos
Message 10 of 12
(3,703 Views)