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

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

[Octave-bug-tracker] [bug #53056] LineWidth interpreted as pixels, not p


From: Rik
Subject: [Octave-bug-tracker] [bug #53056] LineWidth interpreted as pixels, not points
Date: Sat, 3 Feb 2018 07:04:32 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

URL:
  <http://savannah.gnu.org/bugs/?53056>

                 Summary: LineWidth interpreted as pixels, not points
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Sat 03 Feb 2018 04:04:31 AM PST
                Category: Plotting with OpenGL
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Matlab Compatibility
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

According to Matlab documentation, LineWidth and MarkerSize for line objects
are specified in points.  In Octave, we use the OpenGL function glLineWidth
which sets line width in pixels.

Given that Matlab interprets pixels to mean 1/96 of an inch and points are
defined to be 1/72 of an inch, this should mean that Octave merely needs to
inflate sizes by 96/72 == 4/3.

In order to test this, could someone try the following script in Matlab (also
attached) and upload the resulting file?


close all
ver   % Show what version is running
h1 = line ([0 1], [0.1 0.1], 'linewidth', 0.5);
h2 = line ([0 1], [0.2 0.2], 'linewidth', 1);
h3 = line ([0 1], [0.3 0.3], 'linewidth', 2);
h4 = line ([0 1], [0.4 0.4], 'linewidth', 2.75);
h5 = line ([0 1], [0.5 0.5], 'linewidth', 3);
h6 = line ([0 1], [0.6 0.6], 'linewidth', 6);
h7 = line ([0 1], [0.7 0.7], 'linewidth', 12);
h8 = line ([0 1], [0.8 0.8], 'linewidth', 18);
ylim ([0 1]);
print -r300 lwidth.png






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 03 Feb 2018 04:04:31 AM PST  Name: tst_lwidth.m  Size: 459B   By:
rik5

<http://savannah.gnu.org/bugs/download.php?file_id=43158>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?53056>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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