LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems setting the graph to the origin?

Hi,
This might be a stupid question but for some reason I can't seem to get the plot on my VI to have its origin at (0,0). I have used property nodes to set the X/Y min to 0 but for some reason the X-axis appears fine but the Y-axis starts elevated. The point which should be 0,0 visually is actually 0,-10?? The -10 does not show but when I run it, I can ddrag the cursor below the zero on the Y and still have it be visible. PLease I have even tried customizing the graph but then the tick marks remain to far below. I'm sorry for being so vague, this is the best explanation I can come up with, any help will be appreciated,
Alex
0 Kudos
Message 1 of 7
(3,522 Views)
This was a tricky one. Did you set both the X and the Y axis to manual scale mode (i.e. uncheck the X and Y auto-scale options by right-clicking on the graph)? That is my best guess of what could be the problem. Hope it helps. /Mikael
Message 2 of 7
(3,522 Views)
I actually did do that and still it does not help...so I'm absolutely clueless! I wish I could draw the picture for you as to what is going on..if you imagine a chessboard, then the 8 columns on the bottom are all labelled starting from (0) the origin, but the rows are labeled also (0) but instead of the Y value being on the origin it is actually one whole grid(square) up????
0 Kudos
Message 3 of 7
(3,522 Views)
Do you think you can add your VI with the problem as an attachment (answer your question and you will get that option)? Then it will be easier to see what the problem is. /Mikael
0 Kudos
Message 4 of 7
(3,522 Views)
This simple test VI works for me. Try to run it and see if it does what you want. /Mikael
0 Kudos
Message 5 of 7
(3,522 Views)
> This might be a stupid question but for some reason I can't seem to
> get the plot on my VI to have its origin at (0,0). I have used
> property nodes to set the X/Y min to 0 but for some reason the X-axis
> appears fine but the Y-axis starts elevated. The point which should be
> 0,0 visually is actually 0,-10?? The -10 does not show but when I run
> it, I can ddrag the cursor below the zero on the Y and still have it
> be visible. PLease I have even tried customizing the graph but then
> the tick marks remain to far below. I'm sorry for being so vague, this
> is the best explanation I can come up with, any help will be
> appreciated,
> Alex

I can't explain what has caused this, but if all else fails, drop a new graph,
edit it to be similar to the old graph, delete
the old one and wire up the
new one. Beware that the Replace menu item may work, but it tries to keep
many of the formatting that has been done to the graph, so it may also keep
the odd behavior that you want to get rid of.

Greg McKaskle
0 Kudos
Message 6 of 7
(3,522 Views)
Try this code it might help you

cwgraph.Axes(1).Ticks.MajorUnitsBase = 0 'x coordinate
cwgraph.Axes(2).Ticks.MajorUnitsBase = 0 'y coordinate

This will set coordinate to origin
0 Kudos
Message 7 of 7
(3,522 Views)