MathGroup Archive 2009

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

Search the Archive

Re: How to stretch a image

  • To: mathgroup at
  • Subject: [mg96539] Re: [mg96516] How to stretch a image
  • From: Chris Hill <chill at>
  • Date: Mon, 16 Feb 2009 06:55:07 -0500 (EST)
  • References: <>

At 02:21 AM 2/15/2009, goodhei8 at wrote:
>such as the size of a image is 100 x 100, I want to make it stretch to
>200 x 600 (not 1:1). Mathematica give me 200x200 +200x400 blank. I tried
>Padding and Margins, no working : (
>PS, in Mathematica 6.
>Thanks in advance.

Use the AspectRatio option with the ImageSize option to stretch the 
image to the desired dimensions:

With[{w = 200, h = 600},
  Graphics[Disk[], AspectRatio -> h/w, ImageSize -> {w, h}]]

Chris Hill
Wolfram Research 

  • Prev by Date: Re: Plots margins
  • Next by Date: Re: NDSolve - Nice function but stiffness-problem
  • Previous by thread: How to stretch a image
  • Next by thread: Re: How to stretch a image