Re: Aligning framed graphics in rows
- To: mathgroup at smc.vnet.net
- Subject: [mg104657] Re: Aligning framed graphics in rows
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Fri, 6 Nov 2009 05:15:23 -0500 (EST)
- References: <hcu5c2$m2p$1@smc.vnet.net>
Szabolcs Horv=E1t schrieb: > Hello, > > Is there a reliable way to align framed graphics in a row, in such a way > that both the top and bottom of the frame are at the same level? > > Here is an example: > > GraphicsRow[ > { > LogLogPlot[1 + Sin[x], {x, 1, 100}, Axes -> False, Frame -> True, > FrameLabel -> {"horizontal", "vertical"}, AspectRatio -> 4/5], > Plot[Sinc[x], {x, -5, 5}, Axes -> False, Frame -> True, > FrameLabel -> {"horizontal", "vertical"}, AspectRatio -> 4/5] > }] > > > Note how the second graphic is taller than the first one. I would like > the frames to be properly aligned, for aesthetic reasons. All my > graphics have (different) frame labels, and their aspect ratio is fixed . I think that the difference in frame dimensions is due to different settings of ImagePadding. You can achieve what you want with setting ImagePadding to the same value for all your plots: padding = 20; GraphicsRow[{LogLogPlot[1 + Sin[x], {x, 1, 100}, Axes -> False, Frame -> True, FrameLabel -> {"horizontal", "vertical"}, AspectRatio -> 4/5, ImagePadding -> padding], Plot[Sinc[x], {x, -5, 5}, Axes -> False, Frame -> True, FrameLabel -> {"horizontal", "vertical"}, AspectRatio -> 4/5, ImagePadding -> padding]}] It needs some iterations to find a value that works for all plots. Unfortunatley finding the largest ImagePadding values with AbsoluteOptions and use that automatically seems to not work since it will return ImagePadding -> All which is not much help... hth, albert