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

MathGroup Archive 2009

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

Search the Archive

ItemSize and ImageSize->Full , I do not understand what happens

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105312] ItemSize and ImageSize->Full , I do not understand what happens
  • From: "Nasser M. Abbasi" <nma at 12000.org>
  • Date: Fri, 27 Nov 2009 06:30:00 -0500 (EST)

Version 7

One of the problems I always have with using Manipulate is getting the plots 
and images to align and fit and have the sizes I want when they are inside a 
Grid (or Column) and having the whole thing be of the right size when 
everything is put togother.

So, I am trying now to make a plot completely fill a given Grid or Column 
cell (so that no empty space exist around the plot).

I normally do this by playing around with the options ItemSize for the Grid, 
and with ImageSize for the plot, and with AspectRatio for the plot command, 
and with ImagePadding until I get the right size and layout looks good.

But I am finally decided to step back and see if I can find an easier way 
than this trial and error method.

One way to make an Image fit best inside a Grid or Column element is by the 
use of Scaled[1], as in

Column[{Plot[Sin[x], {x, -Pi, Pi}, ImageSize -> Scaled[1]]}, ItemSize -> 20, 
Frame -> All]

However, I do not want to use Scaled[] (for other reasons). So from the help 
under ImageSize it says:

"For an object that appears as an element in a Grid, ImageSize->Full 
corresponds to the full width of the cell in the grid. "

Sound good. So based on the above, if I use ImageSize->Full I should get, 
what I thought, the same output or may be close to what I had with 
Scaled[1], but something very weird happens instead:

(be careful when using this command below, you'll notice strange output, and 
the scroll bar will no longer work)

Column[{Plot[Sin[x], {x, -Pi, Pi}, ImageSize -> Full]}, ItemSize -> 20, 
Frame -> All]

I do not understand why Mathematica did what it did. I am giving an specific 
ItemSize and saying ImageSize->Full, so what is wrong with this?

Thanks,
--Nasser 



  • Prev by Date: Re: part assigned sequence behavior puzzling
  • Next by Date: Re: ItemSize and ImageSize->Full , I do not understand what happens
  • Previous by thread: Re: countour plot (in 3D)
  • Next by thread: Re: ItemSize and ImageSize->Full ,