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

MathGroup Archive 2007

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

Search the Archive

Re: Inset problems & Export

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84109] Re: Inset problems & Export
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Mon, 10 Dec 2007 20:37:53 -0500 (EST)
  • Organization: The Open University, Milton Keynes, UK
  • References: <fjj1jp$g43$1@smc.vnet.net>

Will Robertson wrote:

> This bug is tricky because Inset is rather unpredictable. I've had it
> change behaviour with the same code and now even killing the kernel
> giving me reproducible results. Oh well. I'm using Mathematica 6.0.1
> on Windows XP.
> 
> Here's the vague problem. I'm exporting an Inset and it gets cropped:
> 
> g1 = Plot[Sin[x], {x, 0, 2 \[Pi]}];
> g2 = Plot[Cos[x], {x, 0, 2 \[Pi]}];
> Graphics@Inset@Row[{g1, g2}]
> Export["test.eps", %];
> Show[Import["test.eps"]]
> 
> Sometimes you don't even need to export the thing to get the cropping
> to happen:
> 
> g1 = Plot[2 Sin[x], {x, 0, 2 \[Pi]}, AspectRatio -> Automatic,
>    ImageSize -> {Automatic, 200}];
> g2 = Plot[5 Cos[x], {x, 0, 2 \[Pi]}, AspectRatio -> Automatic,
>    ImageSize -> {Automatic, 200}, PlotStyle -> Red];
> Row[{g1, g2}]
> Graphics@Inset[Row@{g1, g2}]
> 
> Row on its own produces the plot I want. Unfortunately, it's not a
> graphics primitive, which I need it to be. I can't use GraphicsRow,
> because it produces subplots of equal width (somehow things just
> managed to work out for the ColorbarPlot package). So I'm stuck. I
> can't even reliably use Inset, let alone Export[]-ing it afterwards.
> 
> Any ideas? Are the above problems even reproducible on other machines?

The above problems are reproducible on my machine as one can check at

http://homepages.nyu.edu/~jmg336/mathematica/unwantedcropping.pdf

(Note that, for the first set of expression, the conversion to pdf also 
crops the inset, so the pdf file does not display exactly what the 
corresponding notebook shows.)

Regards,
-- 
Jean-Marc


  • Prev by Date: how to speed up lenghty formulas??
  • Next by Date: Re: Monitor bug or feature
  • Previous by thread: Re: Inset problems & Export
  • Next by thread: Re: Inset problems & Export