bugGNU Octave - Bugs: bug #51263, plotyy weirdness

 
 

bug #51263: plotyy weirdness

Submitted by:  Muhali <muhali>
Submitted on:  Mon 19 Jun 2017 09:29:29 AM UTC  
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Invalid Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Mon 17 Jul 2017 10:29:17 AM UTC, comment #3: 

Ok. If I understood correctly, this bug report can be closed as invalid.
If you still think there is something wrong with how Octave is behaving in that case, please report back.

Markus Mützel <mmuetzel>
Project Member
Mon 17 Jul 2017 08:22:35 AM UTC, comment #2: 

ok, probably not a bug but a misunderstanding on my side. Thanks.

Muhali <muhali>
Tue 20 Jun 2017 09:12:17 AM UTC, comment #1: 

I am uncertain which plot you would like to achieve. But have you tried something like:

figure (1); clf;
ax = gca;
hold (ax, 'on');
plotyy (ax, [1:5 11:15], [1*ones(1,5) 3*ones(1,5)], [21:30 31:40], [2*ones(1,10) 4*ones(1,10)]);

If you do not want the lines to connect, try inserting nans:

hax = plotyy (ax, [1:5 NaN 11:15], [1*ones(1,5) NaN 3*ones(1,5)], [21:30 NaN 31:40], [2*ones(1,10) NaN 4*ones(1,10)]);
ylim (hax(1), [0.5 3.5]); ylim (hax(2), [1.5 4.5]);

I am not sure what Matlab tries to do. But to me it looks like it is failing. I don't think we have to strictly follow Matlab in this case.

Anyways, if you have doubts using Octave functions, please use the mailing list instead: -email is unavailable-

Please, report back if you still think there is a bug that I'm missing atm.

Markus Mützel <mmuetzel>
Project Member
Mon 19 Jun 2017 09:29:29 AM UTC, original submission:  

I have the following example

figure(1) ; clf ;
ax = gca ;
hold(ax, 'on') ;
plotyy(ax, 1:5, 1*ones(1,5), 21:30, 2*ones(1,10)) ;
plotyy(ax, 11:15, 3*ones(1,5), 31:40, 4*ones(1,10)) ;

which I would like to give me a unique x-axis holding the interval 1:40 and two y-axis, the left holding the interval 1:3 and the right holding the interval 2:4.

What I get instead is the attached figure 'octave.png', which may not be a bug at all as the example script is simply not the right way to do it. However, doing the same in ML gives me a totally different figure (matlab.png attached).

Muhali <muhali>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #40933:  octave.png added by muhali (14KiB - image/png)
file #40934:  matlab.png added by muhali (12KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2017-07-17 mmuetzel StatusNeed Info => Invalid
        Open/ClosedOpen => Closed
    2017-06-20 mmuetzel Item GroupNone => Matlab Compatibility
        StatusNone => Need Info
        Operating SystemGNU/Linux => Any
    2017-06-19 muhali Attached File- => Added octave.png, #40933
        Attached File- => Added matlab.png, #40934

    Back to the top


    Powered by Savane 3.5