Wed 15 Jun 2016 04:33:57 PM UTC, comment #5:
Thanks everyone for testing. The supposed behavior for a primitive line object is found at http://www.mathworks.com/help/matlab/ref/primitiveline-properties.html.
I mispelled the attribute 'markeredgecolor' which is why this error resulted.
That's okay though. I get the gist, which is that for '.' the 'Color' attribute is used, unless 'markeredgecolor' has been specified to a different value than 'auto'. So Octave is okay in that respect.
But I don't understand the sizings. According to the documentation the sizing is done in points (basically 1/72 of an inch). So for a screen resolution of 90 ppi I would expect some relation to the quantity
In gl-render.cc I see the following code for the marker size.
and later
But also,
So, for the 'o' marker everything makes sense. The size (diameter) is determined in points. And the draw routine uses diameter/2, or the radius, to construct the 'o'. But the dot marker is special. It is using diameter/3 for the radius.
@Lachlan: Could you run tests in Matlab to try and determine what is going on? I think we need to construct a table of marker size versus resulting pixel size on screen.
Possible code, with measurement after each run:
And then repeated with the 'o' marker.
At the large sizes, like 72, it is clear that Octave is actually drawing 10-sided decagons, rather than smooth circles. Does Matlab do this to or do they scale the number of vertices in the OpenGL polygon to make it appear smooth at all sizes?
|
Wed 15 Jun 2016 07:36:14 AM UTC, comment #3:
get (h, 'markersize') % What is default
ans = 6
get (h, 'markerfacecolor') % What is default (blue, or something else)
ans = none
get (h, 'markeredegcolor') % What is default (blue, or something else)
Error using graph2d.lineseries/get
The name 'markeredegcolor' is not an accessible property for an instance of class
'lineseries'.
set (h, 'markerfacecolor', 'm') % does dot change to 'magenta'
No
set (h, 'markeredgecolor', 'g') % does dot change to 'green'
No
%% Secondary test for markersize compatibility.
get (0, 'screenpixelsperinch') % Current resolution
ans = 90
set (h, 'markersize', 4) % what is size of marker in pixels on screen?
one (Yes, one.)
set (h, 'markersize', 16) % what is size of marker in pixels on screen?
It looks like a 5x5 square with two extra pixels
set (h, 'markersize', 36) % what is size of marker in pixels on screen?
It looks like a circle of about 14 pixels diameter.
|
Tue 14 Jun 2016 03:56:26 PM UTC, comment #2:
To be clear, can somebody run the following in Matlab and report back.
I'll re-post to the Octave-Maintainer's list.
|
Mon 13 Jun 2016 04:37:16 AM UTC, comment #1:
The issue is particular to the dot '.' marker. Try using a different marker to see it working.
I know there is special code in gl-render.cc for the '.' marker. How does Matlab handle this? Is '.', really equivalent to a circle (marker 'o') but with a reduced radius? We need to know what behavior we should be aiming for.
|