MathGroup Archive 1999

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

Search the Archive

units in graphics

How can i get a printed graphics with units equal to a fixed value in
centimeters  ?.

Here is an example with 2 cm units : (72 points = 1 inch and 1 inch = 2.54

          larg=2 Pi 20

          gr = Plot[Sin[x],{x,-Pi,Pi}, ImageSize ->
{1,1/2}Round[(72*larg)/25.4],  AspectRatio->Automatic  ]

The problem is that Mathematica adds a border around the graphics.
On the graphics above, the plot limits are not (-\[Pi];+\[Pi]) but (-3.3,
3.3) and we cannot get the amount of margin that is used, because it depends
of the ticks labels, the plot label, ...

Here is a worser example :

        Plot[ 10^5 x^2, {x,-2,2}, Frame->True, Axes->None,  ImageSize->40 72

A bad solution is to draw only graphics without frame and guess that the
images size is 1.05 times the specified plot range.
This is not perfect but seems to work.

Stephan Heiss
Heiss at

  • Prev by Date: Re: Dealing with submatrices
  • Next by Date: RE: How to plot more curves on one graph
  • Previous by thread: Re: Plotting discontinuous lines
  • Next by thread: Mathematica 2.2 on iMac?