[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: |
Fri, 3 Jun 2016 15:36:08 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko |
URL:
<http://savannah.gnu.org/bugs/?48115>
Summary: __plotyy__ function bug when using FUN2 argument
Project: GNU Octave
Submitted by: None
Submitted on: Fr 03 Jun 2016 15:36:06 UTC
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name: Holger Strubelt
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 4.0.1
Operating System: Any
_______________________________________________________
Details:
When using a user function (e.g. anonymous function) for the secondary axes
used by plotyy, a matrix index error is created.
The bug is in line 134 of function file plotyy.m within function __plotyy__:
h2 = feval (fun2, ax(2), x2, y2);
The second argument ax(2) must be deleted since fun2 is evaluated on the
current axes, which is set to ax(2) before that line.
I've attached a corrected version of plotyy.m.
In addition to said bug, I've added an improvement concerning coloring of the
y-axes. This doesn't make sense if one of the plot contains multiple lines
with different colors, since only the last line will control the y-axis color.
So I added a check for the number of lines within the plot:
For axis 1:
set (ax(1), "color", "none", "xlim", xlim);
if length(h1) == 1 ## Coloring y-axis only makes sense if plot contains
exactly one related line
set (ax(1), "ycolor", getcolor (h1(1)));
endif
For axis 2:
set (ax(2), "yaxislocation", "right", "color", "none", "box", "off", "xlim",
xlim);
if length(h2) == 1 ## Coloring y-axis only makes sense if plot contains
exactly one related line
set (ax(2), "ycolor", getcolor (h2(1)));
endif
If the maintainer team doesn't follow my argument in this matter, please feel
free not to include this change into a new version of plotyy.m.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fr 03 Jun 2016 15:36:06 UTC Name: plotyy.m Size: 10kB By: None
<http://savannah.gnu.org/bugs/download.php?file_id=37377>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48115>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48115] __plotyy__ function bug when using FUN2 argument,
anonymous <=