fill with a semilogy axis?

A colleague posed an interesting challenge:
How to do a filled plot having the y-axis in logarithm?
I think I can do it with creating patches myself an adding it to the axis, but isn't there anything built-in?

Best regards,
Michael

Does fill_between() not work for you? Note, I have never tried it on a log scale plot.

Ben Root

···

On Tue, May 3, 2011 at 3:40 AM, K.-Michael Aye <kmichael.aye@…287…> wrote:

A colleague posed an interesting challenge:

How to do a filled plot having the y-axis in logarithm?

I think I can do it with creating patches myself an adding it to the

axis, but isn’t there anything built-in?

Best regards,

Michael

Hi Michael,

I use fill_between() and log axis without problems in the following way (it’s by memory, I hope the sintax is correct)

fig = plt.figure()

spl = fig.add_subplot(111)

spl.fill_between(x,y1,y2)

spl.set_yscale(“log”)

plt.show()

Cheers,

Fra

···

Il giorno 06/mag/2011, alle ore 01.34, Benjamin Root ha scritto:

On Tue, May 3, 2011 at 3:40 AM, K.-Michael Aye <kmichael.aye@…287…> wrote:

A colleague posed an interesting challenge:

How to do a filled plot having the y-axis in logarithm?

I think I can do it with creating patches myself an adding it to the

axis, but isn’t there anything built-in?

Best regards,

Michael

Does fill_between() not work for you? Note, I have never tried it on a log scale plot.

Ben Root


WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options