How do I print a 1-inch by 1-inch square on a piece of paper?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have been searching the help files and MATLAB Answers but my pictures are still coming out distorted.
0 Kommentare
Antworten (1)
Walter Roberson
am 4 Feb. 2016
Look at Figure Properties for PaperSize and PaperSizeMode and PaperUnits
Then construct whatever graphics you want on an axes whose Units has been set to 'inch' and with appropriate Position, and with DataAspect set to [1 1 1]; with that combination, a change of 1.0 in your data will correspond to 1.0 inch
2 Kommentare
Walter Roberson
am 4 Feb. 2016
fig = figure('Units', 'inches', 'papersize', [8.5,11], 'paperpositionmode', 'auto');
ax = axes('Units','inches', 'Position', [1 1 1 1])
x=[0,0,1,1,0];
y=[0,1,1,0,0];
plot(ax, x, y)
set(ax, 'visible', 'off', 'dataaspectratio', [1 1 1]);
print(fig)
Tested on my system. Interestingly the square did not show up as 1" x 1" on my display, but printed out as 1" x 1" to within the accuracy of my measuring tape.
Siehe auch
Kategorien
Mehr zu Cartesian Coordinate System Conversion 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!