contourf: black lines connecting contour levels?

When I do contourf plots in matplotlib, I get lines connecting the contour levels. This doesn’t only appear to be an artifact of my plotting algorithms, it appears in this example from the matplotlib cookbook:

http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

at least on my mac.

(I think this is the link to the output I get from that:
https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9
)

Is there a way to keep these lines from happening? If not, is there a way to turn off all of the black lines separating the contour levels?

Thanks in advance,

Rick

···


Rick Muller
rpmuller@…287…

The dropbox link is broken (you need a public url).
What version of mpl and what backend are you using?

There was a similar problem which has now been fixed.
Try the work-around described in the thread below, and see if works.

http://www.nabble.com/problems-with-contourf---alpha-td22553269.html

Regards,

-JJ

···

On Thu, Jul 2, 2009 at 4:26 PM, Rick Muller<rpmuller@...287...> wrote:

When I do contourf plots in matplotlib, I get lines connecting the contour
levels. This doesn't only appear to be an artifact of my plotting
algorithms, it appears in this example from the matplotlib cookbook:

http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

at least on my mac.

(I think this is the link to the output I get from that:
https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9
)

Is there a way to keep these lines from happening? If not, is there a way to
turn off all of the black lines separating the contour levels?

Thanks in advance,

Rick

--
Rick Muller
rpmuller@...287...

------------------------------------------------------------------------------

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

JJ

Thanks for the tips. I had seen one of those posts whilst googling around for the bug, but discounted it because I’m not using an alpha value.

Here are links to one of the cookbook examples, and one of the files that I want to plot:
http://files.getdropbox.com/u/533499/griddata-test.png
http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png

I’m using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.

I don’t know which bug in the thread you were referring to. I tried the

for c in CS.collections: c.set_edgecolor(“none”)

fix, but it didn’t have any effect.

···

On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee <lee.j.joon@…287…> wrote:

The dropbox link is broken (you need a public url).

What version of mpl and what backend are you using?

There was a similar problem which has now been fixed.

Try the work-around described in the thread below, and see if works.

http://www.nabble.com/problems-with-contourf—alpha-td22553269.html

Regards,

-JJ

On Thu, Jul 2, 2009 at 4:26 PM, Rick Muller<rpmuller@…287…> wrote:

When I do contourf plots in matplotlib, I get lines connecting the contour

levels. This doesn’t only appear to be an artifact of my plotting

algorithms, it appears in this example from the matplotlib cookbook:

http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

at least on my mac.

(I think this is the link to the output I get from that:

https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9

)

Is there a way to keep these lines from happening? If not, is there a way to

turn off all of the black lines separating the contour levels?

Thanks in advance,

Rick

Rick Muller

rpmuller@…287…



Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Rick Muller
rpmuller@…287…

Oh, and I’m using the Agg backend, I think, whatever is the default.

···

On Thu, Jul 2, 2009 at 7:19 PM, Rick Muller <rpmuller@…1003…7…> wrote:

JJ

Thanks for the tips. I had seen one of those posts whilst googling around for the bug, but discounted it because I’m not using an alpha value.

Here are links to one of the cookbook examples, and one of the files that I want to plot:

http://files.getdropbox.com/u/533499/griddata-test.png
http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png

I’m using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.

I don’t know which bug in the thread you were referring to. I tried the

for c in CS.collections: c.set_edgecolor(“none”)

fix, but it didn’t have any effect.

On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee <lee.j.joon@…287…> wrote:

The dropbox link is broken (you need a public url).

What version of mpl and what backend are you using?

There was a similar problem which has now been fixed.

Try the work-around described in the thread below, and see if works.

http://www.nabble.com/problems-with-contourf—alpha-td22553269.html

Regards,

-JJ

On Thu, Jul 2, 2009 at 4:26 PM, Rick Muller<rpmuller@…287…> wrote:

When I do contourf plots in matplotlib, I get lines connecting the contour

levels. This doesn’t only appear to be an artifact of my plotting

algorithms, it appears in this example from the matplotlib cookbook:

http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

at least on my mac.

(I think this is the link to the output I get from that:

https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9

)

Is there a way to keep these lines from happening? If not, is there a way to

turn off all of the black lines separating the contour levels?

Thanks in advance,

Rick

Rick Muller

rpmuller@…1003…7…



Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Rick Muller
rpmuller@…287…


Rick Muller
rpmuller@…287…

The example in the cookbool works fine with svn version of mpl.
So, it seems that this bug has been fixed.

Anyhow, which command (contour or contourf) draws the vertical lines?
I bet it is contourf. And set_edgecolor("none") for return value of
contourf should have some effect. Did you redraw the figure?
Regards,

-JJ

···

On Thu, Jul 2, 2009 at 9:20 PM, Rick Muller<rpmuller@...287...> wrote:

Oh, and I'm using the Agg backend, I think, whatever is the default.

On Thu, Jul 2, 2009 at 7:19 PM, Rick Muller <rpmuller@...287...> wrote:

JJ

Thanks for the tips. I had seen one of those posts whilst googling around
for the bug, but discounted it because I'm not using an alpha value.

Here are links to one of the cookbook examples, and one of the files that
I want to plot:
http://files.getdropbox.com/u/533499/griddata-test.png
http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png

I'm using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.

I don't know which bug in the thread you were referring to. I tried the

>>> for c in CS.collections: c.set_edgecolor("none")

fix, but it didn't have any effect.

On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee <lee.j.joon@...287...> wrote:

The dropbox link is broken (you need a public url).
What version of mpl and what backend are you using?

There was a similar problem which has now been fixed.
Try the work-around described in the thread below, and see if works.

http://www.nabble.com/problems-with-contourf---alpha-td22553269.html

Regards,

-JJ

On Thu, Jul 2, 2009 at 4:26 PM, Rick Muller<rpmuller@...287...> wrote:
> When I do contourf plots in matplotlib, I get lines connecting the
> contour
> levels. This doesn't only appear to be an artifact of my plotting
> algorithms, it appears in this example from the matplotlib cookbook:
>
>
> http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
>
> at least on my mac.
>
> (I think this is the link to the output I get from that:
> https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9
> )
>
> Is there a way to keep these lines from happening? If not, is there a
> way to
> turn off all of the black lines separating the contour levels?
>
> Thanks in advance,
>
> Rick
>
> --
> Rick Muller
> rpmuller@...287...
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> matplotlib-users List Signup and Options
>
>

--
Rick Muller
rpmuller@...287...

--
Rick Muller
rpmuller@...287...

Beautiful! The SVN version worked well for this.

I forgot to check whether the workaround for version 0.98.5.3 worked; you may be right, and I may have simply forgotten to redraw the figure, but I think I did so (I normally kill my windows between plotting).

Thanks very much for your help with this!

···

On Fri, Jul 3, 2009 at 1:52 PM, Jae-Joon Lee <lee.j.joon@…287…> wrote:

The example in the cookbool works fine with svn version of mpl.

So, it seems that this bug has been fixed.

Anyhow, which command (contour or contourf) draws the vertical lines?

I bet it is contourf. And set_edgecolor(“none”) for return value of

contourf should have some effect. Did you redraw the figure?

Regards,

-JJ

On Thu, Jul 2, 2009 at 9:20 PM, Rick Muller<rpmuller@…287…> wrote:

Oh, and I’m using the Agg backend, I think, whatever is the default.

On Thu, Jul 2, 2009 at 7:19 PM, Rick Muller <rpmuller@…287…> wrote:

JJ

Thanks for the tips. I had seen one of those posts whilst googling around

for the bug, but discounted it because I’m not using an alpha value.

Here are links to one of the cookbook examples, and one of the files that

I want to plot:

http://files.getdropbox.com/u/533499/griddata-test.png

http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png

I’m using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.

I don’t know which bug in the thread you were referring to. I tried the

for c in CS.collections: c.set_edgecolor(“none”)

fix, but it didn’t have any effect.

On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee <lee.j.joon@…287…> wrote:

The dropbox link is broken (you need a public url).

What version of mpl and what backend are you using?

There was a similar problem which has now been fixed.

Try the work-around described in the thread below, and see if works.

http://www.nabble.com/problems-with-contourf—alpha-td22553269.html

Regards,

-JJ

On Thu, Jul 2, 2009 at 4:26 PM, Rick Muller<rpmuller@…287…> wrote:

When I do contourf plots in matplotlib, I get lines connecting the

contour

levels. This doesn’t only appear to be an artifact of my plotting

algorithms, it appears in this example from the matplotlib cookbook:

http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

at least on my mac.

(I think this is the link to the output I get from that:

https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9

)

Is there a way to keep these lines from happening? If not, is there a

way to

turn off all of the black lines separating the contour levels?

Thanks in advance,

Rick

Rick Muller

rpmuller@…287…



Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Rick Muller

rpmuller@…287…

Rick Muller

rpmuller@…287…


Rick Muller
rpmuller@…287…