[Date Index]
[Thread Index]
[Author Index]
Re: The size of image output
*To*: mathgroup at smc.vnet.net
*Subject*: [mg114931] Re: The size of image output
*From*: "E. Martin-Serrano" <eMartinSerrano at telefonica.net>
*Date*: Thu, 23 Dec 2010 03:53:37 -0500 (EST)
*References*: <iepdjl$g3g$1@smc.vnet.net> <201012220736.CAA10503@smc.vnet.net>
Hi,
Your construct,
Graphics[{{FaceForm[], Rectangle[{0, 0}, {1, 1}]},
Inset[Plot[10^5 x^2, {x, -2, 2}, Frame -> True, Axes -> None],
ImageScaled[{0, 0}], ImageScaled[{0, 0}], ImageScaled[1]]},
ImageSize -> 40 72/25.4]
in fact, works on V8 (TRIAL).
But in does not in my V7.01; here it fails to produce the graphics and gives
the message "Coordinate 1 should be a pair of numbers" (in
*ImageScaled[1]*).
However, if *ImageScaled[1]* is changed to *ImageScaled[{1,1}]* it does work
in V7.01 too, apparently, rendering the same graphics.
According to the documentation *ImageScaled[]* has not been modified in V8
E. Martin-Serrano
-----Original Message-----
From: JUN [mailto:noeckel at gmail.com]
Sent: Wednesday, December 22, 2010 8:37 AM
To: mathgroup at smc.vnet.net
Subject: [mg114931] [mg114911] Re: The size of image output
On Dec 20, 9:23 pm, Alexei Boulbitch <alexei.boulbi... at iee.lu> wrote:
> Dear community,
>
> Some journals require the figures for submitted papers to be of a
> special size. For example, the Phys. Rev. group requires that the images
> should be submitted in the eps format with the figure width of 8.5 cm.
>
> Up to now I solved the problem by creating the image in Mathematica,
> exporting it as an eps file followed by its resizing in Adobe
> Illustrator, that has a simple tool for that.
>
> I wonder, if there is a way to specify the size of the output image in
> centimeters within Mathematica?
>
> This question has already been discussed in 1999 (see units
> in graphics). The method proposed there seems however, not to work with
> the 8th version without modifications. Besides, it suffers from
> uncertainty coming from the fact that "Mathematica adds a border around
> the graphics and we cannot get the amount of margin that is used,
> because it depends of the ticks labels, the plot label"
>
> Are there any improvements in the later versions?
>
> Best regards.
>
> --
> Alexei Boulbitch, Dr. habil.
> Senior Scientist
> Material Development
>
> IEE S.A.
> ZAE Weiergewan
> 11, rue Edmond Reuter
> L-5326 CONTERN
> Luxembourg
>
> Tel: +352 2454 2566
> Fax: +352 2454 3566
> Mobile: +49 (0) 151 52 40 66 44
>
> e-mail: alexei.boulbi... at iee.lu
>
> www.iee.lu
>
> --
>
> This e-mail may contain trade secrets or privileged, undisclosed or
> otherwise confidential information. If you are not the intended
> recipient and have received this e-mail in error, you are hereby
> notified that any review, copying or distribution of it is strictly
> prohibited. Please inform us immediately and destroy the original
> transmittal from your system. Thank you for your co-operation.
Hi,
to get graphics exported with exactly determined dimensions, one
method with a lot of fine-tuning flexibility would be something along
these lines:
Graphics[{{FaceForm[], Rectangle[{0, 0}, {1, 1}]},
Inset[Plot[10^5 x^2, {x, -2, 2}, Frame -> True, Axes -> None],
ImageScaled[{0, 0}], ImageScaled[{0, 0}], ImageScaled[1]]},
ImageSize -> 40 72/25.4]
The invisible rectangle (FaceForm[ ]) contains your plot(s) as an
inset, and the image size applies to this rectangle. The exported PDF
then has the dimensions determined by the bounding rectangle. You just
have to arrange everything to fit into the rectangle the way you want
- that's what the ImageScaled[...] does in this example. For a
different aspect ratio, you'd have to change the Rectangle[...]
dimensions appropriately.
Jens
Prev by Date:
**Re: what's wrong with this?!!**
Next by Date:
**Re: switching between versions 7 and 8**
Previous by thread:
**Re: The size of image output**
Next by thread:
**Re: The size of image output**
| |