LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

align graph legends and get graph-only bounds

I often overlay graphs to accommodate legnthy legends or plot data otrerwise difficult to get onto a single graph. Today I wrote a VI to align plot legends, whose widths tend to change with the plot names (should I be annoyed by this?). In the process I remembered that getting a graph's bounds and position will include the entire area occupied by the plot and its legentd, scrollbar, and palettes. It's interesting to me that you can get the plot area and the size of each of these accoutrement independently, but there does not seem to be a native way to get just the graph's boundaries (annoyance level now orange). Couple that with incosistent usage of "bounds", "area", and "position" in object properties... well, here you can see that I've employed some simple conversion routines to handle this.

 

In the attached llb is a VI that gets the graph boundaries by first turning off the palettes, legends, and scrollbar (and restoring them afterward), and another that aligns the legends of any number of graphs, by reference, taking into account legend visibility.  Hopefully others will find these useful.

_____________
Creator of the BundleMagic plugin for LabVIEW!
Message 1 of 3
(2,630 Views)

I know this is an old post but I wanted to thank you for this. It helped me deal with a pesky plot legend that was moving out of position when resizing due to long item names.

0 Kudos
Message 2 of 3
(2,341 Views)

Fantastic, glad you found this useful!!!

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 3 of 3
(2,333 Views)