control checkerboard pattern size on printed paper

6 visualizaciones (últimos 30 días)
Brian
Brian el 5 de Dic. de 2017
Editada: Brian el 5 de Dic. de 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 :)

Respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by