Zorder and Clip_on issues

Hi everyone,

I had recently experienced a frustration regarding zorder and clip_on in Matplotlib.

In figure 1 attached here, I would like to put blue horizontal error bars above the x-axis. As you can see right now, half of it is cut by the x-axis (for the blue point at H = 0). I used:

axes.errorbar(data[:,0], data[:,1], xerr=data[:,2], fmt=’’, ls ="", c = ‘b’, capthick=2, elinewidth=2, clip_on = False, zorder = 10)

But even if I change zorder = 1000, the error bar never goes above the axis. Is it a bug?

Regarding the same topic, I also discovered that when using axes.twinx() in Figure 2 (A : axes; B : axes2 = axes.twinx()). The blue curve (A) never goes above the red curve (B), whatever zorder I use. I even tried axes2.set_axisbelow(True), but it doesn’t change anything. I really want “axes2” to be below the “axes”. Is it a bug? I had to change it manually with Illustrator and it worked, but it is of course really not convenient.

Thank you very much for your help !

Figure 1.pdf (79.3 KB)

Figure 2 - corrected with Illustrator.pdf (130 KB)

Figure 2.pdf (130 KB)

Which version of matplotlib? This is familiar… I could have sworn we fixed this.

Ben Root

···

On Jul 3, 2015 10:25 PM, “Gael Grissonnanche” <gael.grissonnanche1@…287…> wrote:

Hi everyone,

I had recently experienced a frustration regarding zorder and clip_on in Matplotlib.

In figure 1 attached here, I would like to put blue horizontal error bars above the x-axis. As you can see right now, half of it is cut by the x-axis (for the blue point at H = 0). I used:

axes.errorbar(data[:,0], data[:,1], xerr=data[:,2], fmt=’’, ls ="", c = ‘b’, capthick=2, elinewidth=2, clip_on = False, zorder = 10)

But even if I change zorder = 1000, the error bar never goes above the axis. Is it a bug?

Regarding the same topic, I also discovered that when using axes.twinx() in Figure 2 (A : axes; B : axes2 = axes.twinx()). The blue curve (A) never goes above the red curve (B), whatever zorder I use. I even tried axes2.set_axisbelow(True), but it doesn’t change anything. I really want “axes2” to be below the “axes”. Is it a bug? I had to change it manually with Illustrator and it worked, but it is of course really not convenient.

Thank you very much for your help !


Don’t Limit Your Business. Reach for the Cloud.

GigeNET’s Cloud Solutions provide you with the tools and support that

you need to offload your IT needs and focus on growing your business.

Configured For All Businesses. Start Your Cloud Today.

https://www.gigenetcloud.com/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

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

Thank you very for helping with this issue. I am using the last version 1.4.3 (if it is the last one).

Gaël

···

De : ben.v.root@…287… [mailto:ben.v.root@…287…] De la part de Benjamin Root
Envoyé : 3 juillet 2015 22:41
À : Gael Grissonnanche
Cc : Matplotlib Users
Objet : Re: [Matplotlib-users] Zorder and Clip_on issues

Which version of matplotlib? This is familiar… I could have sworn we fixed this.

Ben Root

On Jul 3, 2015 10:25 PM, “Gael Grissonnanche” <gael.grissonnanche1@…985…> wrote:

Hi everyone,

I had recently experienced a frustration regarding zorder and clip_on in Matplotlib.

In figure 1 attached here, I would like to put blue horizontal error bars above the x-axis. As you can see right now, half of it is cut by the x-axis (for the blue point at H = 0). I used:

axes.errorbar(data[:,0], data[:,1], xerr=data[:,2], fmt=’’, ls ="", c = ‘b’, capthick=2, elinewidth=2, clip_on = False, zorder = 10)

But even if I change zorder = 1000, the error bar never goes above the axis. Is it a bug?

Regarding the same topic, I also discovered that when using axes.twinx() in Figure 2 (A : axes; B : axes2 = axes.twinx()). The blue curve (A) never goes above the red curve (B), whatever zorder I use. I even tried axes2.set_axisbelow(True), but it doesn’t change anything. I really want “axes2” to be below the “axes”. Is it a bug? I had to change it manually with Illustrator and it worked, but it is of course really not convenient.

Thank you very much for your help !


Don’t Limit Your Business. Reach for the Cloud.
GigeNET’s Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/


Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users