Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Why Row does not format 2 plots in one row when ImageSize->Full?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg112438] Re: Why Row does not format 2 plots in one row when ImageSize->Full?
  • From: "Carl K. Woll" <carlw at wolfram.com>
  • Date: Wed, 15 Sep 2010 04:41:16 -0400 (EDT)

On 9/14/2010 4:14 AM, Nasser M. Abbasi wrote:
> Version 7,
>
> When I type
>
> Case 1
> --------
> p1 = Plot[Sin[x], {x, -Pi, Pi}, ImageSize ->  200];
> Row[{p1, p1}]
>
> Then the 2 plots above show up in one row as expected.
>
> But when I type
>
> case 2
> ------
> p1 = Plot[Sin[x], {x, -Pi, Pi}, ImageSize ->  Full];
> Row[{p1, p1}, ImageSize ->  200]
>
> Then the 2 plots show up on top of each others. *not in a row*
>
>
> And when I do
>
> case 3
> -------
> p1 = Plot[Sin[x], {x, -Pi, Pi}, ImageSize ->  Full];
> GraphicsRow[{p1, p1}, ImageSize ->  200]
>
> Then the 2 plots show up in one row again.
>
> I am sure there is a very good and obvious explanation for case 2, but I
> do not see it now.
>
> May be it has to do with the ordering of the rendering process?
>
> --Nasser
>
>    

The main difference is that Row allows linebreaks, whereas GraphicsRow 
does not. So, GraphicsRow will shrink it's contents so that they all fit 
on one line, while Row won't.

In case 1, if you were to narrow your notebook, then you would see that 
the 2 plots will be in a column once the notebook width is small enough.

In case 2, the ImageSize->Full setting means the first image will take 
the full notebook width to render, leaving nothing left for the second 
image, so it gets pushed onto the next line.

In case 3, the plots are shrunk so that they fit in one row of width 200.

Carl Woll
Wolfram Research


  • Prev by Date: Re: Word wrap and page breaks in printed notebooks?
  • Next by Date: Re: How does Mathematica create contour plots (or density plots)?
  • Previous by thread: Connecting to Oracle via tnsnames.ora
  • Next by thread: Re: Why Row does not format 2 plots in one row when ImageSize->Full?