bugGNU Octave - Bugs: bug #53659, [octave forge] (geometry)...


bug #53659: [octave forge] (geometry) drawPoint: mixing FMT, PROPERTY-VALUE -> unexpected behaviour

Submitted by:  Adrian <adaerr>
Submitted on:  Sun 15 Apr 2018 12:56:29 PM UTC  
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  Juan Pablo Carbajal <juanpi>
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 31 May 2018 11:17:45 PM UTC, comment #1:

Thanks, this is now fixed in the development repository, bookmark release, commit 00e59a986baa

I went for a solution which is a mixture of both suggestions.

Juan Pablo Carbajal <juanpi>
Project MemberIn charge of this item.
Sun 15 Apr 2018 12:56:29 PM UTC, original submission:

The drawPoint command in the geometry package behaves unexpectedly
when mixing FMT and PROPERTY-VALUE specifications in its options.
Specifically, the marker color and shape may not correspond to the
values set in the options. Compare the figures produced by the
following commands:

The help for drawPoint specifies that its options are passed to the
plot function, so I expect the options to behave similarly.

The reason for this differing behaviour lies in the fact that
drawPoint prepends PROPERTY-VALUE pairs to the options before calling
plot (except if the latter consist in a single FMT arg):

[quoted from drawPoint.m]

Then the usual plot behaviour (pair-value properties have precedence
over FMT specifications whatever the order of the arguments) leads to
the behaviour above.

Note finally that mixing FMT and PROPERTY-VALUE options is permissible
according to the help for plot, which explicitly cites such an example.

The problem of color sticking to blue could be solved by just ommiting
the 'color' property setting from the drawPoint.m code quoted above.
As opposed to the 'linestyle' and 'marker' settings which are required
to make drawPoint indeed draw points, setting a default color can well
be left to plot.

There are several ways this could be solved for the marker:

  • modify plot so that its parser keeps the last set option *even when

FMT and PROPERTY-VALUE pairs are mixed* ?

  • change the if-condition above into "if mod(length(varargin), 2) ==

0", supposing that an uneven number of options implies the existence
of a FMT arg.

  • document the misfeature and make it a feature ;-)
  • ...


Adrian <adaerr>


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

Attach Files:

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 juanpi (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by adaerr (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-05-31 juanpi StatusNone => Fixed
        Assigned toNone => juanpi
        Open/ClosedOpen => Closed
        Release4.2.2 => dev
        Operating SystemGNU/Linux => Any
    2018-04-15 mtmiller Summarygeometry: drawPoint: mixing FMT, PROPERTY-VALUE -> unexpected behaviour => [octave forge] (geometry) drawPoint: mixing FMT, PROPERTY-VALUE -> unexpected behaviour

    Back to the top

    Powered by Savane 3.4