control checkerboard pattern size on printed paper

6 visualizzazioni (ultimi 30 giorni)
Brian
Brian il 5 Dic 2017
Modificato: Brian il 5 Dic 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 :)

Risposte (0)

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by