LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I control the position of the plot area on an XY graph?

I am using LabView 7.1 to create a utility to graph multiple plots with up to 3 Y axes on the same XY graph. There is normally one Y axis visible, but the other 2 are made visible as needed. Occasionally, when an axis is made visible it is displayed inside the plot area or the plot area is shifted to the left, covering up the original Y axis. I would like to be able to control the location of the plot area, but I haven't found a property node that does this. Does anyone have any suggestions on how to control the plot area's location?
0 Kudos
Message 1 of 5
(4,319 Views)
You can change the position of the plot area with the "Plot area bounds" property (A cluster for [left, top,right,bottom] in VI coordinates.
 
You also might want to disable "autoadjust scales" so the plot areea does no longer dynamically change, e.g. if the scales need more room. There are some reported bugs that the scales can get messed up during certain editing operations. To fix, simply right-click the graph and select "advanced..reset scale layout".
]
0 Kudos
Message 2 of 5
(4,312 Views)
The "Plot area bounds" property sounds like what I'm looking for, but I can't find it. If I create a property node for the graph, under "plot area" my options are "size" and "colors". Under "size" are the options "All elements", "width", and "height". No bounds or position.
0 Kudos
Message 3 of 5
(4,308 Views)
Jason,

The reason you can't find the Plot Area Bounds property is that it debuted in LabVIEW 8.0.

Unfortunately that functionality was not available in LabVIEW 7.1.

Could you perhaps toggle the text color of your additional scales to make them "visible" or "invisible" (to the user) while keeping them visible in the LabVIEW sense?  This would stop LabVIEW from having to resize the plot area and hopefully avoid the problem.  A bit of a hack workaround I know - perhaps if you could post a screenshot of the problem you are running into we could better help.

Regards,

Simon H
Applications Engineer
National Instruments
http://www.ni.com/support/


0 Kudos
Message 4 of 5
(4,282 Views)

I hadn't considered changing the axes colors, but I know there is an .ini file setting that would keep the plot area from resizing. I like having the plot resizing though, because it lets me have the maximum viewing area when looking at data sets with 1 y axis. I think we are upgrading to LabVIEW 8.0 soon, so I think I'll just work on a different feature until then.

I included 3 screenshots to show the problem. "Before" is with both data traces plotted on the same y axis. "2axis" is with the second trace plotted on a second y axis. "After" is with the second trace returned to the original y axis. You can see that the plot area moved to the left

I am using the sum of the axis widths to set the width of the plot area. Maybe I just need to sequence the order that the resizing and axis visibility are occurring.

Download All
0 Kudos
Message 5 of 5
(4,266 Views)