[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #39495] polar plot should have a circular rho/
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #39495] polar plot should have a circular rho/theta axis |
Date: |
Mon, 28 Apr 2014 19:34:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0 |
Update of bug #39495 (project octave):
Status: Confirmed => In Progress
_______________________________________________________
Follow-up Comment #3:
This is great! I haven't been able to get to this issue for over a year so
I'm glad someone finally did.
Before you finalize the code I think we should check if there is a Matlab
interface we should be trying to match. If not, we can do whatever we want
and create the new properties like rtick, ttick. But maybe Matlab does
something simple like re-using xtick for rho and ytick for theta?
Here are some other responses to your questions:
1) Yes, it is okay to use a tag. We already do this for items like legends
and contours.
2) We need listeners on all the properties that could affect the display. I
see
color
linewidth
font{angle
name
size
units
weight}
interpreter
One thing that I think would make it easier is to use the extended version of
addlistener to pass through the property name that is being updated and then
you can get by with a single update_text routine and a single update_line
routine.
For example,
addlistener (hax, "fontangle", address@hidden, hg, "fontangle"})
addlistener (hax, "fontangle", address@hidden, hg, "fontname"})
and later
function update_text (hax, ~, hg, propname)
propval = get (hax, propname);
htext = findobj (hg, "type", "text");
set (htext, propname, propval);
endfunction
There is a similar example from legend.m
function updatelegendtext (h, ~)
kids = get (h, "children");
htext = [];
for i = 1:numel (kids)
if (strcmp (get (kids(i), "type"), "text"))
htext(end+1) = kids(i);
endif
endfor
tprops = {"fontangle", "fontname", "fontweight", "color"};
lprops = {"fontangle", "fontname", "fontweight", "textcolor"};
set (htext, tprops, get (h, lprops));
ec = get (h, "edgecolor");
set (h, "xcolor", ec, "ycolor", ec);
endfunction
In this case, all display values are copied over regardless of which one
changed. It's not too compute intensive because the set() routine
automatically shortcircuits if the old and new value are the same.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?39495>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/