bugGNU Octave - Bugs: bug #50680, Better documentation of newplot,...

 
 

bug #50680: Better documentation of newplot, axes, and plot creating in general

Submitted by:  Francesco Potortì <pot>
Submitted on:  Thu Mar 30 13:47:21 2017  
 
Category: DocumentationSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Documentation
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon Apr 3 15:37:24 2017, comment #4:

Changed the title to try and capture the notes from comment #3.

Rik <rik5>
Project Administrator
Fri Mar 31 15:34:09 2017, comment #3:

I don't think it is the colororder property documentation that has to be better improved; most properties are reset by newplot, not only this particular property.

We need to find a place to fully document the interaction between axes and high level plotting functions. Something like:

"Some properties of axes objects ("colororder" for example) have to be changed before any plot to be effective. On the other hand, unless "hold" has been used, high level plotting functions will reset axes properties (see newplot) before plotting. Basically there are two ways to deal with this case:

  • Create the axes, set its properties at your convenience and then use "hold on" to prevent newplot from resetting the axes properties. E.g:
  • Set properties as defaults. E.g:

Note also that most 2D high level plotting functions set the "box" axes property "on". In the first method we need to set "box" to "on" manually, otherwise the resulting plot will have its "box" "off" (the default)."

I think something like this covers much of this bug and bug #49400.

Pantxo Diribarne <pantxo>
Project Member
Thu Mar 30 20:17:34 2017, comment #2:

The report I mentioned is bug #49400.

Pantxo Diribarne <pantxo>
Project Member
Thu Mar 30 15:20:18 2017, comment #1:

Hi,

This is all expected and compatible with ML (but probably insufficiently documented):

  • Example 1: "hold on" creates an axes which will be used for further high level plotting since it has its "nexplot" property set to "add" by "hold" function (see "help newplot")
  • Example 2: after "hold on" has created a first axes, you create a second one with "axes". The second one has "nexplot"->"replace" (the default) and will thus be reset by "newplot"
  • Example 3: you create a second axes that covers the first one, use "set (gca, 'colororder', jet);" instead of "axes (...)"

There is already a request to better document this behavior but I can't find it right now.

Pantxo Diribarne <pantxo>
Project Member
Thu Mar 30 13:47:21 2017, original submission:

This bug follows up on bug #50511.

In the answer to that bug, I discover that this code works:

The first problem is that this is counterintuitive. I suggest that this code be added in the docs as an example, maybe following the text of the 'colororder' line property.

The second problem is that this code does not work:

Apparently, axes does nothing with the colororder property, yet does not give an error. This may be an axes bug or a documentation bug, I do not know.

Third, in the following instance axes() corrupts the plot in a strange way:

the lines disappear after running axes(), and moreover the axis labels are corrupted.

All the above code is run under Octave 4.0.3 on Debian.

Francesco Potortì <pot>

 

(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 rik5 (Updated the item)
  • -unavailable- added by pantxo (Posted a comment)
  • -unavailable- added by pot (Submitted the item)
  • -unavailable- added by pot (submitter of bug #)
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Apr 3 15:37:24 2017rik5SummaryBetter documentation of colororder property=>Better documentation of newplot, axes, and plot creating in general
    Thu Mar 30 15:27:00 2017rik5CategoryPlotting with OpenGL=>Documentation
      StatusNone=>Confirmed
      SummaryStrange behaviour of colororder property=>Better documentation of colororder property
    Thu Mar 30 15:20:18 2017pantxoRelease4.0.3=>dev
    Thu Mar 30 13:47:21 2017potCarbon-Copy-=>Added akramer

    Back to the top


    Powered by Savane 3.1-cleanup1