[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong
From: |
Ben Abbott |
Subject: |
[Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout |
Date: |
Wed, 16 Dec 2015 03:05:24 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/601.3.9 (KHTML, like Gecko) Version/9.0.2 Safari/601.3.9 |
Follow-up Comment #13, bug #46292 (project octave):
Ederag / others,
I tried comparing a PDF of the same size as the plot on screen and discovered
that the displayed fantasize on my Mac assumes 90 dpi (instead of 72 dpi).
close all
graphics_toolkit qt
width = 4;
height = 3;
figure (1)
set (gcf (), 'units', 'inches')
set (gcf (), 'paperunits', 'inches')
position = get (gcf (), 'position');
paperposition = get (gcf (), 'paperposition');
position(3:4) = [width, height];
paperposition(3:4) = [width, height];
set (gcf (), 'position', position)
set (gcf (), 'paperposition', paperposition)
plot (rand (3))
xlabel xlabel
ylabel ylabel
title 123456789012345678900123456789012345678901234567890
pdffile = 'wysisyg.pdf';
h = findall (gcf (), '-property', 'fontsize');
fontsize = cell2mat (get (h, 'fontsize'));
scale = 90 / get (0, 'screenpixelsperinch');
for n = 1:numel(h)
set (h(n), 'fontsize', fontsize(n) * scale)
end
print ('-dpdfwrite', pdffile)
for n = 1:numel(h)
set (h(n), 'fontsize', fontsize(n))
end
The resulting images for the PDF and the figure are attached. I'm curious if
the 90 dpi is some standard I'm not aware of ... i.e. do fontsizes on screen
and on paper assume a different dpi?
(file #35760, file #35761)
_______________________________________________________
Additional Item Attachment:
File name: figure-image.png Size:48 KB
File name: PDF-image.png Size:82 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46292>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/15
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout,
Ben Abbott <=
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/15
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/16
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/16
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/16
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/16
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, ederag, 2015/12/16
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/16
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/16
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, ederag, 2015/12/17
- [Octave-bug-tracker] [bug #46292] Axes with absolute "units" have wrong dimensions in printout, Ben Abbott, 2015/12/17