Jouni K. Seppänen | 1 Mar 02:19
Face
Picon
Picon
Picon
Favicon
Gravatar

Re: strange alpha legend bug

"John Hunter" <jdh2358@...> writes:

> I suspect we are screwing up somewhere in the way we copy properties
> from legended objects to their legend proxies (ie we are reversing
> this somewhere and copying properties from a proxy to the axes

Here's at least a clue: change your alphas from 0.5 to 0.1. Then
resize the window several times and watch the rectangles become 
a little bit darker each time. I suspect that extra copies of the
rectangles are being created.

--

-- 
Jouni K. Seppänen
http://www.iki.fi/jks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Jouni K. Seppänen | 1 Mar 11:07
Face
Picon
Picon
Picon
Favicon
Gravatar

Re: strange alpha legend bug

I committed the following change, which seems to fix the bug.

Index: legend.py
===================================================================
--- legend.py   (revision 3031)
+++ legend.py   (working copy)
@@ -315,7 +315,7 @@
             raise Exception, 'Auto legends not available for figure legends.'

         def get_handles(ax):
-            handles = ax.lines
+            handles = ax.lines[:]
             handles.extend(ax.patches)
             handles.extend([c for c in ax.collections if isinstance(c, LineCollection)])

--

-- 
Jouni K. Seppänen
http://www.iki.fi/jks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
John Hunter | 1 Mar 16:15
Picon
Gravatar

Re: strange alpha legend bug

On 3/1/07, Jouni K. Seppänen <jks@...> wrote:
> I committed the following change, which seems to fix the bug.

> -            handles = ax.lines
> +            handles = ax.lines[:]

Wow, nasty and subtle.  Good work!  Now how do I get a doughnut to you
in Finland :-)  Any ideas Perry?

JDH

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Perry Greenfield | 1 Mar 16:24

Re: strange alpha legend bug


On Mar 1, 2007, at 10:15 AM, John Hunter wrote:

> On 3/1/07, Jouni K. Seppänen <jks@...> wrote:
>> I committed the following change, which seems to fix the bug.
>
>> -            handles = ax.lines
>> +            handles = ax.lines[:]
>
> Wow, nasty and subtle.  Good work!  Now how do I get a doughnut to you
> in Finland :-)  Any ideas Perry?

What, you didn't like the way I did it? ;-)
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
John Hunter | 1 Mar 16:25
Picon
Gravatar

Re: strange alpha legend bug

On 3/1/07, Perry Greenfield <perry@...> wrote:

> What, you didn't like the way I did it? ;-)

Actually, I think I saved that in the freezer still in the envelope as
a memento -- maybe I can just send that one on to save the dollar!

JDH

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Jouni K. Seppänen | 1 Mar 16:53
Face
Picon
Picon
Picon
Favicon
Gravatar

Re: strange alpha legend bug

"John Hunter" <jdh2358@...> writes:

> Actually, I think I saved that in the freezer still in the envelope as
> a memento -- maybe I can just send that one on to save the dollar!

That sounds like something that could get me in trouble with Finnish
customs officials. I may have an opportunity to visit San Jose in
August -- that's at least on the same continent as you, right? :-)

--

-- 
Jouni K. Seppänen
http://www.iki.fi/jks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Jouni K. Seppänen | 2 Mar 16:31
Face
Picon
Picon
Picon
Favicon
Gravatar

barh vs. bar(orientation='horizontal')

Hi,

What is the reason for having both barh and bar, when the latter
accepts the orientation='horizontal' argument? I am asking because of
sf bug #1669506, which is about hist(orientation='horizontal') not
working because it passes a log kwarg to barh.

--

-- 
Jouni K. Seppänen
http://www.iki.fi/jks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Eric Firing | 2 Mar 19:24
Favicon
Gravatar

Re: barh vs. bar(orientation='horizontal')

Jouni K. Seppänen wrote:
> Hi,
> 
> What is the reason for having both barh and bar, when the latter
> accepts the orientation='horizontal' argument? I am asking because of
> sf bug #1669506, which is about hist(orientation='horizontal') not
> working because it passes a log kwarg to barh.
> 

I didn't do it--but it looks like the reason is that having barh as a 
separate method permits a more natural order of arguments without 
introducing more complexity in the argument handling.

Vertical bars take left, height, width, bottom;
barh takes bottom, width, height, left.

Handling this difference with all possible combinations of *args and 
**kwargs would be complex; the present method, using a separate name 
(barh), is nice and simple.

Looks like barh just needs to take a **kwargs (which could replace most 
of the present listed kwargs; or add a log kwarg to the list) and pass 
it along to bar.  You are taking care of this?

Eric

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
(Continue reading)

John Hunter | 2 Mar 19:47
Picon
Gravatar

Re: barh vs. bar(orientation='horizontal')

On 3/2/07, Eric Firing <efiring@...> wrote:

> I didn't do it--but it looks like the reason is that having barh as a
> separate method permits a more natural order of arguments without
> introducing more complexity in the argument handling.

barh was originally added for compatibility with matlab and on a user
request.  I think the kwarg was added to bar to support easy calling
for functions that use bar (eg hist) but may also want to configure
the orientation.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Jouni K. Seppänen | 3 Mar 07:00
Face
Picon
Picon
Picon
Favicon
Gravatar

Re: barh vs. bar(orientation='horizontal')

Eric Firing <efiring@...> writes:

> Looks like barh just needs to take a **kwargs (which could replace most 
> of the present listed kwargs; or add a log kwarg to the list) and pass 
> it along to bar.  You are taking care of this?

I replaced most of the kwargs by a **kwargs dict in svn revision 3037.
This does change the behavior for people who were giving positional
arguments to barh, but they do get an error message.

--

-- 
Jouni K. Seppänen
http://www.iki.fi/jks

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Gmane