bugGNU Octave - Bugs: bug #47594, Marker style in scatter plot is...

 
 

bug #47594: Marker style in scatter plot is not well documented

Submitter:  None
Submitted:  Fri 01 Apr 2016 09:47:19 AM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Confirmed Assigned to:  None
Originator Name:  Samuel Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 4.0.0
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 07 May 2018 06:24:27 PM UTC, comment #2: 

If anyone works at debugging the parsing of arguments in the `scatter` function, it would be great if it could take into account the default line width (`get(0, 'DefaultLineLineWidth')`). Or at least use a larger default line width ; currently markers are almost invisible on my machine.

Hugo Raguet <snake>
Fri 01 Apr 2016 03:05:50 PM UTC, comment #1: 

Thanks for the bug report, confirmed here.

These work as workarounds.


scatter (rand (10, 1), rand (10, 1), 'r', '.');
scatter (rand (10, 1), rand (10, 1), 'red', '.');


It's worth noting that the Matlab help docs do not mention that plot-style linespec arguments may be given, but several other examples from the Matlab help also do not work in Octave:


>> x = rand (10, 1);
>> y = rand (10, 1);
>> a = 10;
## The fourth argument should accept a marker shape
>> scatter (x, y, a, 'd')
error: invalid color specification: d
error: invalid value for color property "markeredgecolor" (value = d)
error: called from
    __scatter__ at line 178 column 11
    scatter at line 86 column 10

## Property-value pairs after the marker size should work also
>> scatter (x, y, a, 'MarkerEdgeColor', [0 .5 .5], ...
            'MarkerFaceColor', [0 .7 .7], ...
            'LineWidth', 1.5)
error: invalid color specification: MarkerEdgeColor
error: invalid value for color property "markeredgecolor" (value = MarkerEdgeColor)
error: called from
    __scatter__ at line 178 column 11
    scatter at line 86 column 10


From https://www.mathworks.com/help/matlab/ref/scatter.html

Mike Miller <mtmiller>
Group Member
Fri 01 Apr 2016 09:47:19 AM UTC, original submission:  

Hi,


In the doc of the scatter function, it is said:

    The marker to use can be changed with the STYLE argument, that is a string defining a marker in the same manner as the 'plot' command.

However :

scatter(rand(1,10), rand(1,10), '.r')

results in the following error :

error: invalid color specification: .r
error: called from
    _scatter_ at line 178 column 11
    scatter at line 86 column 10
error: invalid value for color property "markeredgecolor" (value = .r)
error: called from
    _scatter_ at line 178 column 11
    scatter at line 86 column 10

The correct syntax is :

scatter(rand(1,10), rand(1,10), 'r', '.')

but this is not "in the same manner as the 'plot' command'.

The doc or the scatter command have to be updated.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by snake (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-04-01 mtmiller Item GroupDocumentation Matlab Compatibility
        StatusNone Confirmed
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code