control checkerboard pattern size on printed paper

5 Ansichten (letzte 30 Tage)
Brian
Brian am 5 Dez. 2017
Bearbeitet: Brian am 5 Dez. 2017
Hi
I would like to print the following checkerboard to a pdf file such that it has the correct given dimension on the A4 sheet. The example is a 6 times 6 tile pattern where each tile is 20 pixels times 20 pixels. I would like that the pattern is exactly 12 cm times 12 cm when printed on a4 paper. I have tried fig.PaperPosition and ax.Position but, as you can see from my example I did not succeed.
Im = checkerboard(20,3,3);
h = figure;
imshow(Im)
hold on
plot([10,100,100,10,10],[10,10,100,100,10],'r*-')
fig = gcf;
fig.PaperType = 'a4';
fig.PaperUnits = 'centimeters';
fig.PaperOrientation ='landscape';
fig.PaperPosition = [1 1 12 12];
print('-dpdf','tester.pdf','-r1080')
Any help is much appreciated :)

Antworten (0)

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by