Alpha channel problems?

Hello all,

I am creating radar plots in matplolib and I cannot get transparent polygons.

I have run the examples from the gallery:
http://matplotlib.sourceforge.net/examples/api/radar_chart.html
http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html

The colours show differently on my computer and the polygons are opaque. I have changed
ax.set_alpha(0-1)
ax.fill(theta, d, facecolor=color, alpha=0-1)
plt.Polygon(verts, closed=True, edgecolor='k', alpha=0-1)

but the transparency doesn't change.

I am running Enthough Python Distribution (EPD 5.0.0) on Mac OS X 10.6.2

Thanks for your help,

Luc

You are writing "0-1" which is -1 which is not a valid alpha value.
This should probably raise an exception, but apparently it doesn't.
Valid alphas are in the range 0 to 1 Try 0.1 rather than 0-1. Note
alpha is not supported in postscript output, but does work in raster
displays, PNG, PDF and SVG.

JDH

···

On Tue, Feb 2, 2010 at 7:47 AM, Luc Gervais <luc.gerv@...287...> wrote:

Hello all,

I am creating radar plots in matplolib and I cannot get transparent polygons.

I have run the examples from the gallery:
http://matplotlib.sourceforge.net/examples/api/radar_chart.html
http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html

The colours show differently on my computer and the polygons are opaque. I have changed
ax.set_alpha(0-1)
ax.fill(theta, d, facecolor=color, alpha=0-1)
plt.Polygon(verts, closed=True, edgecolor='k', alpha=0-1)

Hi Jon, I'm sorry I didn't mean 0-1. I meant from 0 to 1. I have tried with values like 0.15, 0.55, 0.95 and 1. The polygons stay opaque with the same colour in all cases.

Luc

···

On 2010-02-02, at 2:59 PM, John Hunter wrote:

On Tue, Feb 2, 2010 at 7:47 AM, Luc Gervais <luc.gerv@...287...> wrote:

Hello all,

I am creating radar plots in matplolib and I cannot get transparent polygons.

I have run the examples from the gallery:
http://matplotlib.sourceforge.net/examples/api/radar_chart.html
http://matplotlib.sourceforge.net/examples/pylab_examples/polar_bar.html

The colours show differently on my computer and the polygons are opaque. I have changed
ax.set_alpha(0-1)
ax.fill(theta, d, facecolor=color, alpha=0-1)
plt.Polygon(verts, closed=True, edgecolor='k', alpha=0-1)

You are writing "0-1" which is -1 which is not a valid alpha value.
This should probably raise an exception, but apparently it doesn't.
Valid alphas are in the range 0 to 1 Try 0.1 rather than 0-1. Note
alpha is not supported in postscript output, but does work in raster
displays, PNG, PDF and SVG.

JDH