bugGNU Octave - Bugs: bug #50227, annotation does not know color...

 
 

bug #50227: annotation does not know color property (but it claims to know it)

Submitted by:  Hartmut <hardy>
Submitted on:  Sat 04 Feb 2017 10:13:08 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 09 Feb 2017 07:00:06 PM UTC, comment #9:

I made a few small modifications.

1. For comments that stand alone on a line, the prefix is '##'.

2. I changed the warning message to emphasize that it is using the 2-input form of warning, and to use the parser's string concatenation functionality rather than the sprintf functionality of warning, and to use double quotes in the message presented to users which required single quotes for the programmer.

Checked in here http://hg.savannah.gnu.org/hgweb/octave/rev/5f7c675b3954.

Thanks Markus, closing report.

Rik <rik5>
Project Administrator
Tue 07 Feb 2017 07:16:34 PM UTC, comment #8:

You are right, Pantxo. It would have been a little abrupt to remove that property without deprecation anyway.

The attached patch deprecates "edgecolor" and advices the user to use the new property "color" instead.

Let's see when TMW are going to change the name back...

Markus Mützel <mmuetzel>
Project Member
Tue 07 Feb 2017 06:25:25 PM UTC, comment #7:

Sorry I answered too late but I think "edgecolor" actually used to be the name of the property. There are leftover of this in the current ML doc:

>> Example: annotation('rectangle',[.5 .5 .1 .1],'EdgeColor','r') creates a rectangle annotation with a red outline.


and this example runs fine in ML 2015b.

So I think we should deprecate the edgecolor property before removing it.

Pantxo Diribarne <pantxo>
Project Member
Tue 07 Feb 2017 06:06:33 PM UTC, comment #6:

Attached is a patch that renames the rectangle and ellipse property "edgecolor" to "color" and adds a text for rectangle properties.

(file #39692)

Markus Mützel <mmuetzel>
Project Member
Sun 05 Feb 2017 05:05:49 PM UTC, comment #5:

Ok, so I changed the Category back to plotting.

Pantxo Diribarne <pantxo>
Project Member
Sun 05 Feb 2017 02:47:43 PM UTC, comment #4:

To me this sound like a "typo" in the properties. Shouldn't we just rename the "edgecolor" property into a "color" property?

This mismatch is also present in the "ellipse" annotation object. All other annotation objects seem fine (they have a "color" property).

Hartmut <hardy>
Sun 05 Feb 2017 02:28:28 PM UTC, comment #3:

This is also a Matlab incompatibility. [1] states that a rectangle annotation does not have an "EdgeColor" property but it has a "Color" property.

[1]: http://de.mathworks.com/help/matlab/ref/annotationrectangle-properties.html

Markus Mützel <mmuetzel>
Project Member
Sun 05 Feb 2017 09:04:00 AM UTC, comment #2:

... end of the previous post:

Changing the category to "Documentation"

Pantxo Diribarne <pantxo>
Project Member
Sun 05 Feb 2017 09:02:51 AM UTC, comment #1:

Hi,

Indeed, the documentation should read "edgecolor". You can see the actual properties of the objects using the "set" function:

Pantxo Diribarne <pantxo>
Project Member
Sat 04 Feb 2017 10:13:08 PM UTC, original submission:

This happens in Octave 4.2.0:

The result is an error message:

But the help text of annotation does mention the color property:

And Matlab is supposed to know this option as well, see http://de.mathworks.com/help/matlab/ref/annotation.html#busqlwm

Hartmut <hardy>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #39692:  bug50227_annotation_rectangle_color.patch added by mmuetzel (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by mmuetzel (Posted a comment)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by hardy (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):

     

     

    Follow 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 09 Feb 2017 07:00:06 PM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Tue 07 Feb 2017 07:17:47 PM UTCmmuetzelAttached File-=>Added bug50227_annotation_rectangle_color_v2.patch, #39693
    Tue 07 Feb 2017 06:06:33 PM UTCmmuetzelAttached File-=>Added bug50227_annotation_rectangle_color.patch, #39692
      StatusConfirmed=>Patch Submitted
      Release4.2.0=>dev
    Sun 05 Feb 2017 05:05:49 PM UTCpantxoCategoryDocumentation=>Plotting
      Item GroupDocumentation=>Matlab Compatibility
    Sun 05 Feb 2017 09:02:51 AM UTCpantxoCategoryPlotting=>Documentation
      Item GroupIncorrect Result=>Documentation
      StatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup1