alpha/transparency now failing in scatter (after upgrade to Ubuntu 9.10)

Reporting this as a matplotlib bug because that's where I see the error.

I have some code which was running fine, drawing a scatter plot with transparent/alpha for the colour, like this...

ax1.scatter(sanjose_y,sanjose_x,color=(0.9,0.9,0.0,0.1),label='SanJose')

This used to draw a very faint transparent series of points which (where there were a lot of points) built up a fairly solid colour. Now, after an upgrade to Ubuntu 9.10 I see only solid colour, no transparency/alpha at all. Also (a different problem), I get an error message (when adding a legend, that no labels were defined). This is also changed behaviour since the upgrade. Seems like scatter has changed... but why?

I tried downloading matplotlib source code and compiling -- and despite a few glitches (like, it was by default Mac compilation) -- I think I got that going OK. Still, I see exactly the same behaviour. Scatter is behaving differently, and I really need that alpha/transparency!!!

Neither of these problems were evident on Ubuntu 9.04, and I was using the inbuilt matplotlib for that.

Please excuse if this report is in the wrong place -- my first attempt to report a bug in this package.

Cheers
A

···

--
Andrew 'Boo' Davie

Have you tried:

ax1.scatter(sanjose_y,sanjose_x,color=(0.9,0.9,0.0),label='SanJose',alpha=0.1)

That's what the scatter_demo2.py example does, and it appears to be working.

In general, alpha support is a bit inconsistent, and is the source of a number of these kinds of bugs -- where RGBA values are supported in some places but not in others. It's on the TODO list to fix, but it's rather pervasive so hasn't been tackled yet.

Mike

···

Boo.Davie@...83... wrote:

Reporting this as a matplotlib bug because that's where I see the error.

I have some code which was running fine, drawing a scatter plot with transparent/alpha for the colour, like this...

ax1.scatter(sanjose_y,sanjose_x,color=(0.9,0.9,0.0,0.1),label='SanJose')

This used to draw a very faint transparent series of points which (where there were a lot of points) built up a fairly solid colour. Now, after an upgrade to Ubuntu 9.10 I see only solid colour, no transparency/alpha at all. Also (a different problem), I get an error message (when adding a legend, that no labels were defined). This is also changed behaviour since the upgrade. Seems like scatter has changed... but why?

I tried downloading matplotlib source code and compiling -- and despite a few glitches (like, it was by default Mac compilation) -- I think I got that going OK. Still, I see exactly the same behaviour. Scatter is behaving differently, and I really need that alpha/transparency!!!

Neither of these problems were evident on Ubuntu 9.04, and I was using the inbuilt matplotlib for that.

Please excuse if this report is in the wrong place -- my first attempt to report a bug in this package.

Cheers
A

--
Andrew 'Boo' Davie

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

This is a known bug.

http://www.nabble.com/No-legend-using-scatter-function-td24816047.html#a24816047

This is fixed in the svn, and I guess 0.99.1.1 shipped with this fixed.
If you don't want to upgrade, use the workaround in the above post.

Regards,

-JJ

···

On Mon, Oct 26, 2009 at 2:35 AM, <Boo.Davie@...83...> wrote:

Also (a different problem), I get an error message (when adding a legend, that no labels were defined). This is also changed behaviour since the upgrade. Seems like scatter has changed... but why?

Have you tried:
ax1.scatter(sanjose_y,sanjose_x,color=(0.9,0.9,0.0),label='SanJose',alpha=0.1)

Yes, the above worked, thank you

···

--
Andrew 'Boo' Davie