octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #58704] png plot does nor respect dpi and prod


From: Michael Leitner
Subject: [Octave-bug-tracker] [bug #58704] png plot does nor respect dpi and produces unreadable results
Date: Mon, 6 Jul 2020 16:26:30 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Firefox/60.0

Follow-up Comment #3, bug #58704 (project octave):

I am disinterested in how fast this is fixed, as I do not have the ambition to
use the octave output for publishable printing. However, I also do not see why
-S and -r should be incompatible. As Rik said in closed #55907, the two
options are for different (in my view even orthogonal) things. In this sense I
think I am totally with the original reporter here, and I will try to explain
it clearly: In my view, both resolution and size in pixel should have some
default values. For the sake of argument, let's say the default resolution is
150 dpi. Actually, I think we should be talking about pixel per inch, not dots
per inch, see the introduction in https://en.wikipedia.org/wiki/Dots_per_inch.
So as I see it, 150 dpi mean 150 pixel per inch. On the other hand, one
typographical point is about 1/72 inch (see
https://en.wikipedia.org/wiki/Point_(typography) for the different
definitions), meaning about 2 pixel per typographical point, meaning in turn
that a 10-point font should have a height of about 20 pixel (again this is not
strictly correct, as it is more about the horizontal space of the em than
about the font height...). Further, let us assume a standard size of 600x400
pixels. Thus, you could fit about 20 lines of text onto the figure.

So much for the default values. If I now specify only the size of the figure,
while keeping the resolution fixed, let's say I set the height to 200 pixels.
Then I would expect to be able to fit 10 lines of text into the figure. 

On the other hand, if I specify the resolution, let's say to 300 dpi, I would
expect the size in pixel to remain at 600x400 (I have not requested
non-default sizes), while a 10-point font would now have a height of 40 pixels
(as I have more pixels to the typographical point). So I would have again 10
lines of text, but with a better resolution of the letters (and that's
intended, after all I increased the resolution). 

And finally, if I set both to non-default values, let's say 300x200 pixels
with a resolution of 75 dpi, then I would expect the 10-point font to have a
height of about 10 pixels, and I would again expect to have 20 lines of text,
but now with quite coarse letters. 

So you see, in this view resolution and size are quite orthogonal concepts. Of
course, e.g. increasing the resolution at constant size in pixels would be
perfectly equivalent to increasing the font size, line widths, point sizes...
at constant resolution (and figure size), so there are work-arounds. But as
the original reporter, I do not see why the two options should be
incompatible, specifically I do not think that closing #55907 was the right
thing to do. Note that I have not checked how octave behaves with the last
changesets, and I also cannot check how matlab behaves. Of course, octave
should follow matlab, but I would indeed be surprised if also in matlab the
resolution would be ignored if a size is specified. 

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?58704>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]