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 PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.2.2Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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 ;-)
  • ...

cheers,
Adrian

Adrian <adaerr>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by adaerr (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 15 Apr 2018 06:25:55 PM UTCmtmillerSummarygeometry: 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.1-cleanup1