Subscribe Bookmark RSS Feed

Automatic alignment of charts after resizing


I have a script which creates a window containing four graph boxes of equal size, arranged in a 2x2 grid. I'd like to incorporate into the script the feature that if the user resizes any one of the graphs by dragging one or both of its borders, the other three will be automatically and immediately resized to match it. This capability is evidently built into for example the Scatterplot Matrix on the Graph menu, but I can't work out how to reproduce the effect. Can anyone show me how?

Many thanks


Super User


Jun 23, 2011

Have you tried ctl-dragging? In some contexts that seems to work.

I've just tried it: no joy, I'm afraid.

Presumably if I can detect the fact that one chart has just been resized, I can then simply read the new size of the chart using << get width and << get height, and apply it to all the others with << set width and << set height; the problem as I see it is how to detect the resizing in the first place.

Or is it perhaps possible in some way to force the charts all to share a common size property, so that if the value of that property is changed, the new value is automatically applied to all the charts that share it?