[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48115] __plotyy__ function bug when using FUN
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #48115] __plotyy__ function bug when using FUN2 argument |
Date: |
Tue, 7 Jun 2016 13:29:16 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko |
Follow-up Comment #2, bug #48115 (project octave):
Encountered the bug when experimenting with assigning different line
properties "on-the-fly". Plus, the y-axis coloring issue appeared
simultaneously. The behaviour to color an axis only when 1 line is associated
to the respective axis is the same as when using a well-known commercial
product. See this code example for illustration:
+verbatim
## plotyy examples
x=(0:0.1:10)';
y1=[3*sin(2*x), 2.5*cos(x)];
y2=[sin(x/2), 0.9*sin(x-0.5), 0.8*cos(x/2)];
## plotyy with one line for left y axis => only left y axis should be colored
figure;
plotyy(x,y1(:,1),x,y2);
## plotyy with one line for right y axis => only right y axis should be
colored
figure;
plotyy(x,y1,x,y2(:,1));
## plotyy with two inline functions => fails since FUN2 has wrong usage in
__plotyy__ function
figure;
plotyy(x,y1,x,y2, ...
@(x,y) plot(x,y(:,1),'r-',x,y(:,2),'b*'), ...
@(x,y) plot(x,y(:,1),'g--',x,y(:,2),'m.-',x,y(:,3),'b-.'));
-verbatim
By the way, the second example shows another bug in automatic coloring: the
first line in y2 is the same color as the last line in y1. I've also fixed
this issue by evaluationg the number of plot lines in y1 before assigning the
'colororder' property to ax(2). This was not included in the original fix
provided on Friday.
Added a diff file for all my changes. Not experienced in using diff or naming
diff files, so I called it "plotyy_m_diff_u.txt".
Thanks for your help, even though I've already fixed everything myself ;)
(file #37423)
_______________________________________________________
Additional Item Attachment:
File name: plotyy_m_diff_u.txt Size:1 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48115>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/