bugGNU Octave - Bugs: bug #52170, gnuplot graphics toolkit multiple...

 
 

bug #52170: gnuplot graphics toolkit multiple axes do not align

Submitter:  Dan Sebald <sebald>
Submitted:  Wed 04 Oct 2017 07:49:44 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 15 Oct 2017 12:27:34 AM UTC, comment #5: 

Great.  I pushed the patch here (http://hg.savannah.gnu.org/hgweb/octave/rev/9fab3273ff26).  Marking this bug and bug #52186 as fixed.

Rik <rik5>
Group administrator
Sat 14 Oct 2017 11:18:36 PM UTC, comment #4: 

Sorry, there was some debugging cruft in the previous patch.  New one attached.

(file #42156)

Dan Sebald <sebald>
Sat 14 Oct 2017 11:12:38 PM UTC, comment #3: 

All right, a second version of the patch that clears the arrows at the beginning of the plot.  This solves the issue found in

https://savannah.gnu.org/bugs/?52186

where an annotation is added to the plot.

(file #42155)

Dan Sebald <sebald>
Sat 14 Oct 2017 10:56:30 PM UTC, comment #2: 

Wait for me to confirm that patch.  I'm trying the example in

https://savannah.gnu.org/bugs/?52186

right now and that seems like the exact same issue, i.e., the arrows are being remembered between plots.  There may need to be a second location where the arrows are cleared...

Dan Sebald <sebald>
Sat 14 Oct 2017 10:33:58 PM UTC, comment #1: 

This first patch is to address item 2 in the original submission.  gnuplot remembers arrow settings between plots.  So a plot with multiple axes is going to retain axes (arrows) unless there is a command that clears all previous arrows.  Use the original example before and after the patch to see the difference.

In a follow-up patch I will address the position alignment.

(file #42149)

Dan Sebald <sebald>
Wed 04 Oct 2017 07:49:44 PM UTC, original submission:  

There looks to be multiple issues with the following:


graphics_toolkit gnuplot
figure
plot([0:50], sin(0.03*pi*[0:50]), 'b');
set(gca, 'xcolor', 'b');
set(gca, 'ycolor', 'b');
set(gca, 'box', 'off');
ax = axes('Position', get(gca, 'Position'));
plot(ax, [0:75], 2.5*cos(0.03*pi*[0:75]), 'r');
set(ax, 'xaxislocation', 'top');
set(ax, 'xcolor', 'r');
set(ax, 'yaxislocation', 'right');
set(ax, 'ycolor', 'r');
set(ax, 'color', 'none');
set(ax, 'box', 'off');


1) The two axes don't align even though I specified they should have the same position.

2) There is a vestigial blue border for the second plot when I specified box off.  It's odd that the following doesn't have that border:


graphics_toolkit gnuplot
figure
plot([0:50], sin(0.03*pi*[0:50]), 'b');
set(gca, 'xaxislocation', 'top');
set(gca, 'xcolor', 'b');
set(gca, 'yaxislocation', 'right');
set(gca, 'ycolor', 'b');
set(gca, 'color', 'none');
set(gca, 'box', 'off');


Dan Sebald <sebald>

 

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

Attach Files:
   
   
Comment:
   

 

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 sebald (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-15 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
    2017-10-14 sebald Attached File- Added octave-gnuplot_persistent_axes-djs2017oct16.patch, #42156
    2017-10-14 sebald Attached File- Added octave-gnuplot_persistent_axes-djs2017oct15.patch, #42155
    2017-10-14 sebald Attached File- Added octave-gnuplot_persistent_axes-djs2017oct14.patch, #42149

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code