2

I am currently creating a poster for a conference in Scribus. I have a given space on the poster for a plot that I want to create with Mathematica. I don't want to scale in in Scribus, as this would change the font size. Thus, the image should already have the expected size when I export it to PDF.

However, the results I put into ImageSize don't match the dimensions of the PDF created.

Is there a possibility to create a plot that is trimmed to the actual content (plot and labels) without a white border and matches a given size?

Here is an example. I have a 100mm x 200mm slot in my poster, and I would like to fill it with the Plot below. AspectRatio etc. should be adjusted to the given dimensions. As I want to preserve my font size, it is not enough to export the correct AspectRatio, but I need the dimensions.

Plot[x^2, {x, 0, 2}, LabelStyle -> {FontFamily -> "Helvetica", 24}, 
 ImageSize -> {2.835 100, 2.835 200}, AspectRatio -> Full, 
 RotateLabel -> True, Frame -> True, 
 FrameLabel -> {{"I [a.u.]", ""}, {"position (mm)", ""}}]

I checked with WolframAlpha that 2.835 is the factor pt->mm, as 72 is for pt->inch. However, if I export this plot to PDF, Acrobat tells me the dimensions are 69.8mm x 140.4mm. Additionally, I am dealing with a white border, that I cannot remove with ImagePadding->0, as that just leaves the coordinate system without the labels. This is bad because for example, my caption next to the image now starts above the image.

mcandril
  • 633
  • 4
  • 20
  • 1
    ImagePadding->0 – ssch Mar 04 '13 at 15:16
  • I don't think this is a duplicate. In the Real Size Image Printing, the images defines its size. In my case, the box in which the Plot should fit in is defined from outside. ImagePadding->0 cuts off the labels, and ImageSize does not scale my image. I added an example. – mcandril Mar 05 '13 at 09:36
  • 1
    @mcandril re: your latest edit, use AspectRatio -> Full to fill out the specified area. Do you really mean an area of 160 × 80 pt? This is 2.2 by 1.1 inches and 24 pt text seems too large in this case. – Oleksandr R. Mar 06 '13 at 04:33
  • I´d suggest editing the question and its title to reflect the need for defined image and font size. – Yves Klett Mar 06 '13 at 06:11
  • @Yves Klett I believe the sentence "I don't want to scale [it] in Scribus, as this would change the font size." was present in my first version. I don't really understand why the font size is important for the title. I want a PDF with certain dimension, I don't see why it is important what for. – mcandril Mar 06 '13 at 10:51
  • @Oleksandr R. Sorry, this was just an example. I updated the question with your suggestion. AspectRatio-Full works, but the PDF does not come out with the expected dimensions. – mcandril Mar 06 '13 at 10:53
  • You are correct - you did mention font size. As for the title, making it more informative might help re-opening. Posting the code you use for exporting will also be useful for others to replicate. – Yves Klett Mar 06 '13 at 13:29
  • @mcandril I don't know what the problem may be now since exporting your graphic I get a PDF of 10.02 cm by 20.00 cm, i.e. the right size. As regards the white border, try ImagePadding -> {{Automatic, None}, {Automatic, None}}. I'm not casting my reopen vote yet since I'm not convinced there's anything new in this question relative to the other one. – Oleksandr R. Mar 06 '13 at 18:12

0 Answers0