bugGNU Octave - Bugs: bug #45822, Subplots with Gnuplot: Two y-axes?

 
 

bug #45822: Subplots with Gnuplot: Two y-axes?

Submitter:  Martin Kunz <mkunz>
Submitted:  Tue 25 Aug 2015 02:41:34 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:  * 4.0.0 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Oct 2015 09:53:40 PM UTC, comment #5: 

Pushed the fix under your name on the stable branch.  See http://hg.savannah.gnu.org/hgweb/octave/rev/751b9cc78904.  Marking as Fixed and closing report.

Rik <rik5>
Group administrator
Tue 29 Sep 2015 08:27:50 PM UTC, comment #4: 

Is there anybody out there to push this trivial fix?

Avinoam Kalma <avinoam>
Group Member
Fri 04 Sep 2015 09:21:28 PM UTC, comment #3: 


@devs: please check and push this trivial fix

Avinoam Kalma <avinoam>
Group Member
Tue 01 Sep 2015 06:58:25 PM UTC, comment #2: 

cs attached


(file #34788)

Avinoam Kalma <avinoam>
Group Member
Mon 31 Aug 2015 04:43:56 AM UTC, comment #1: 

The problem is probably in __gnuplot_draw_axes__.m , lines 148-149


  fputs (plot_stream, "unset x2tics;\n");
  fputs (plot_stream, "unset x2tics;\n");


The second line should be


  fputs (plot_stream, "unset y2tics;\n");



Avinoam Kalma <avinoam>
Group Member
Tue 25 Aug 2015 02:41:34 PM UTC, original submission:  

I tried to create a column of three subplots where the second plot has its y-axis on the right-hand side. Example code:


graphics_toolkit ("gnuplot");

figure(1)
clf;
hAx(1) = subplot(3,1,1);
plot(5,5);
hAx(2) = subplot(3,1,2);
plot(10:-1:1);
hAx(3) = subplot(3,1,3);
plot(10:20)
set(hAx(2),"yaxislocation","right")


For some reason the third plot has a correct y-axis on the left side, but additionally the y-axis of the second plot on the right (see attached screenshot). Scrolling in the third subplot vertically moves both y-axes, so they seem to belong to one axis object, not two on top of each other.
I cannot even find the duplicate yticklabels:


>> get (1,"children")
ans =

  -201.90
  -207.46
  -213.86
>> get(get(1,"children")(1),"yticklabel")
ans =
{
  [1,1] = 10
  [1,2] = 12
  [1,3] = 14
  [1,4] = 16
  [1,5] = 18
  [1,6] = 20
}


(Note that the first child of the figure is the lowest axis object)

I am using Octave 4.0.0-rc4 under Windows 7 with the bundled Gnuplot 4.6 binary.

Thanks for any help!
Martin

Martin Kunz <mkunz>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #34788:  bug45822.cs added by avinoam (838B - text/plain)

 

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 avinoam (Posted a comment)
  • -email is unavailable- added by mkunz (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
    2015-10-19 rik5 StatusNone Fixed
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any
    2015-09-01 avinoam Attached File- Added bug45822.cs, #34788
    2015-08-25 mkunz Attached File- Added subplotAxisLocationScreenshot.png, #34722

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code