Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

How to print figure precisely to A4 without scale

Asked by Craig on 16 Jan 2013

Hi,

Firstly thanks to anyone who can help me with this problem.

I have a program for academic work that produces some figures. On these figures are measurements that I would like to be precisely the same as on the paper that I print it from. However after several attempts from online research (paper type, orientation, size) I cannot get the axis measurement to be true to when I measure it on paper (with a ruler) therefore affecting the size of my figure.

Is there a specific way to export to a printable file (as this PC does not have direct printing links) that I can print to typical A4 and the measurements will match up.

In terms of coding all I have is, the rest I tried to change in the sub-menus:

figure,plot(w,-al,-w,-al)

Thanks in advance.

0 Comments

Craig

Products

No products are associated with this question.

1 Answer

Answer by per isakson on 16 Jan 2013

Did you search for a solution in the File Exchange? export_fig is the "Most Popular" download.

I have an old m-function, A4Paper, which I use now and then. It produces a figure, the size of A4-paper, on screen. It allows me to position axes using centimeters and when printed on paper size and location on the printed paper agrees "exactly" with those given. E.g.

    %%
    ohf = A4Paper( 'create', 'sa4' );
    U   = get( gcf, 'UserData' );
    axes( 'pos', U.p2d.*[ 3, 3, 8, 8 ] )

and File menu, Print gives me a printout on which I can use a ruler. Both axes are 80 mm long as far as I can measured with my old plastic ruler.

However, I fail to print to a file. I tried to print to the Adobe PDF printer, and a couple of variants with the function, print. On paper they end up some 5% to small. The margins are increased and the printing area is decreased.

This makes me tired.

I've mailed A4Paper to you via [Contact Craig]. You might want to delete it together with other spam.

1 Comment

Craig on 16 Jan 2013

Hi per isakson,

I have emailed you as well. I obtained a "screen ruler" for the computer and I notice that on 100% in Matlab the figure axis does not seem to represent any dimension I am familiar with. The axis reads 0.05 (function calculated from metres) yet when I measure it is roughly 3.75cm with the screen rule.

I obtained a connection to a printer but every attempt leads back to the discrepancy in measurement.

per isakson

Contact us