NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Hello, I'm attempting to create a 2D graph display that resizes when it's parent window resizes. I'm using the autoAspect feature and some resizing code that I found on a JPython script sheet that resizes the box to some percentage of the window via the matrix in ProjectionControl. The problem is that when the graph is resized this way it is centered in the panel using only the box coords, not the box plus the axes. So, when I resize the box to say 75% + of the window, the axis labels are out of the canvas. Anything less than 75% leaves alot of whitespace all around the graph (which is what I want to avoid). I figure one way around this problem is to calc the sizes of the axes and then translate the box up and left by these amounts. Then do the resize. This seems like a pretty bad hack, and I'm wondering if there is a better way to do this. If I'm stuck with the hack, is there a simple way to do the translation? Thanks for any help! Brandon blk@xxxxxxxxxxxxxxxxxx
visad
archives: