Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<pre><code>g = Graphics[{Rectangle[{0, 0}, {19, 28}], Orange, Rectangle[{0, 0}, {1, 1}]}] </code></pre> <p>Okay, first thing you need to do is set the <code>x</code> and <code>y</code> directions to use the same units, which means</p> <pre><code>Show[g, AspectRatio -&gt; Automatic] </code></pre> <p>But this is already the default.</p> <p>Second thing you need to do is choose a size and range for your plot area. Let's make it 21 by 30 with your rectangles centred:</p> <pre><code>plotArea = {{0, 21}, {0, 30}} - {1, 1} Show[g, AspectRatio -&gt; Automatic, PlotRange -&gt; plotArea] </code></pre> <p>Third thing you need to do is turning off adding any padding/margins that make the actual size of your figure larger than your plot range:</p> <pre><code>final = Show[g, AspectRatio -&gt; Automatic, PlotRange -&gt; plotArea, PlotRangePadding -&gt; 0, ImagePadding -&gt; 0] </code></pre> <p>I believe <code>ImageMargins</code> does not make a difference, but if it does, set that to 0 as well.</p> <p>The final thing you need to do is export this to a printable format that preserves the image dimensions, and set the size of the image so that 1 cm will be 1 unit on your plot. Mathematica accepts image sizes in printer's points, so let's define:</p> <pre><code>cm = 72/2.54 Export["final.pdf", Show[final, ImageSize -&gt; 21 cm]] </code></pre> <p>We want the plot to be 21 cm wide because it's 21 units wide. Use PDF as export format, not TIFF. The <code>ImageSize</code> needs to be used inside <code>Show</code> to work around some problems with <code>Export</code> ...</p> <p>Now open your PDF in Adobe Reader, open the print dialogue, and make sure that Page Scaling is set to None! I don't know how to do this in other readers ... Also make sure your figure fits the paper (21 by 30 cm is too large for A4 ...)</p> <p>I'm not going to do a test print, so let me know if this works for you :-) The size of the PDF generated this way is exactly 21 by 30 cm, so if something goes wrong, it must happen at the printing stage.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload