MathGroup Archive 2012

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

Search the Archive

Re: Controlling scale of Graphics on paper

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126224] Re: Controlling scale of Graphics on paper
  • From: Joseph Gwinn <joegwinn at comcast.net>
  • Date: Thu, 26 Apr 2012 05:26:09 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jmtd9i$sim$1@smc.vnet.net> <jn388q$g83$1@smc.vnet.net> <jn5rum$nr4$1@smc.vnet.net>

In article <jn5rum$nr4$1 at smc.vnet.net>,
 Yves Klett <yves.klett at googlemail.com> wrote:

> Addendum to my first post:
> 
> This does only work properly if the PlotRange of the graphics object is
> set to reflect the values of "format" (had not used that one in a while).
> 
> So making sure your dimensions are correct by using ghostview is always
> a good idea ;-)
> 
> So the right way to use this is:
> 
> gfx = Graphics[Line[{{10, 10}, {110, 10}, {110, 110}}],
>   PlotRange -> {{0, 200}, {0, 200}}]
> 
> ExportScaled[filename_, gfx_, format_: {210, 297}, opts___?OptionQ] :=
>   Module[{mm}, mm = 72/25.4;
>   Export[filename,
>    Show[gfx, ImageSize -> format*mm, ImageMargins -> 0,
>     ImagePadding -> None, AspectRatio -> Automatic], opts]]
> 
> ExportScaled["test.eps", gfx, -Subtract @@@ (PlotRange /.
>      Options[gfx, PlotRange])]
> 
> It is a good idea to set the PlotRange values for your graphics object
> *explicitly*, because extracting the with FullOptions can result in
> added whitespace (at least in some cases).

So, it is necessary to set five things in a self-consistent manner to 
achieve the desired scale control.  I had guessed that three things were 
needed.

I'll be trying this.

Thanks,

Joe Gwinn



  • Prev by Date: Re: Find all roots with FindRoot
  • Next by Date: Re: Controlling scale of Graphics on paper
  • Previous by thread: Re: Controlling scale of Graphics on paper
  • Next by thread: Re: Controlling scale of Graphics on paper