bugGNU Octave - Bugs: bug #55840, line plot creates additional...

 
 

bug #55840: line plot creates additional undesirable axes when specifying axes handle to plot into

Submitted by:  None
Submitted on:  Tue 05 Mar 2019 09:11:00 PM UTC  
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  Rik <rik5>
Originator Name:  Glenn Groeschel Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  5.1.0
Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Wed 06 Mar 2019 01:31:40 AM UTC, comment #5: 

Fixed in this changeset (https://hg.savannah.gnu.org/hgweb/octave/rev/4d7665fc8f6c).  I used a slightly different approach which was already standard in the other plotting routines in scripts/plot/draw.  This will be a part of the 5.2.0 bug fix release in a few months time.  Since it is just an m-file change you can also grab the updated copy of line.m from the Mercurial repo and copy it in to your installation to see the fix.

Rik <rik5>
Project AdministratorIn charge of this item.
Wed 06 Mar 2019 12:20:55 AM UTC, comment #4: 

Yeah, Glenn originally reported it as 5.1.0, I moved it to dev, but feel free to keep it 5.1.0 and fix on stable if you think it's important.

Mike Miller <mtmiller>
Project Administrator
Wed 06 Mar 2019 12:06:15 AM UTC, comment #3: 

Just tested and answered my own question: this does affect 5.1.0 so the fix should go on the stable branch.

Rik <rik5>
Project AdministratorIn charge of this item.
Tue 05 Mar 2019 11:48:56 PM UTC, comment #2: 

This is probably my doing.  I re-worked line and _line_ quite a bit.  Assigning the bug to myself.

This is marked against the development version of Octave.  Is it also present on the new 5.1.0 stable release?

Rik <rik5>
Project AdministratorIn charge of this item.
Tue 05 Mar 2019 10:22:39 PM UTC, comment #1: 

Confirmed on Debian GNU/Linux in the development version as well. Requires that the line is being drawn onto an axes object that is not in the active figure.

Also affects gnuplot (provided example needs to be edited to remove calls to 'uicontrol')

Mike Miller <mtmiller>
Project Administrator
Tue 05 Mar 2019 09:11:00 PM UTC, original submission:  

First, thanks to all the Octave contributors that make Octave so great.

When using line(...) to plot into an existing axes handle, an undesirable axes is created in the current figure when no axis exists.  Run attached unwanted_axis.m for demonstration.

This occurs for Open_GL graphics toolkit as well as ftlk toolkit.

----------------------------------------------------------------------
GNU Octave Version: 5.1.0 (hg id: d05d6eebde10)
GNU Octave License: GNU General Public License
Operating System: MINGW32_NT-6.1 Windows 7 Service Pack 1 x86_64
----------------------------------------------------------------------

This error occurs when _next_line_color_.m and _next_line_style_.m eventually get called.  In these m-files gca() is called, which creates an axis when one doesn't exist in the current figure (even though the explicit handle to the desired axis is passed to line). To remedy, _line_.m can be modified to pass the desired axes handle to _next_line_style_.m and _next_line_color_.m.  Both of these functions need to be modified to allow passing in the desired axis handle as well.

Diffs for a very crude hack to address this are attached.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #46434:  unwanted_axis.m added by None (676B - text/plain)
file #46435:  __next_line_color__.diff added by None (1KiB - application/octet-stream)
file #46436:  __line__.diff added by None (2KiB - application/octet-stream)
file #46437:  __next_line_style__.diff added by None (987B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (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 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-03-06 rik5 StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2019-03-06 rik5 Releasedev => 5.1.0
    2019-03-05 rik5 Assigned toNone => rik5
    2019-03-05 mtmiller StatusNone => Confirmed
        Release5.1.0 => dev
        Operating SystemMicrosoft Windows => Any
    2019-03-05 None Attached File- => Added unwanted_axis.m, #46434
        Attached File- => Added __next_line_color__.diff, #46435
        Attached File- => Added __line__.diff, #46436
        Attached File- => Added __next_line_style__.diff, #46437

    Back to the top


    Powered by Savane 3.5