Re: [Matplotlib-users] Inconsistent marker/line zorder in errorbar legend

2011-12-07 Thread Adrian Del Maestro
Thank you very much!  I was trying to do something like this in
legend_handler.py but this is such a simple fix!

Best,
  Adrian.

On Wed, Dec 7, 2011 at 9:11 AM, Jae-Joon Lee lee.j.j...@gmail.com wrote:
 I just pushed a change that I believe fixes this problem

 https://github.com/matplotlib/matplotlib/commit/96caca8dd48d08e3106337ecdeae82fa0236b86b

 Required change is very minor, so you may apply the patch by yourself.
 If you need a workaround, let me know.
 Regards,

 -JJ


 On Tue, Dec 6, 2011 at 11:46 AM, Adrian Del Maestro agde...@gmail.com wrote:
 Hello,

 I have run across an inconsistency in the zorder of markers and lines
 in the legend for an errorbar as opposed to a plot in matplotlib
 v1.1.0.  After some considerable amount of time reading
 legend_handler.py and the information at
 http://matplotlib.sourceforge.net/users/legend_guide.html I was unable
 to figure out how to make the errorbar markers sit 'on top' of the
 lines in a legend.

 For example the following code:

 import pylab as pl
 import numpy as np

 x = pl.arange(-2,2,0.1)
 y = x**2
 dy = np.random.random(len(x))

 pl.figure(1)
 pl.plot(x,y, color='k', linewidth=0.5, linestyle='-', marker='o',
        markerfacecolor='lime', markeredgecolor='k', markeredgewidth=0.5,
 label='line1', markersize=10)
 pl.legend(loc='best', frameon=False)

 pl.figure(2)
 pl.errorbar(x,y,yerr=dy, color='k', linewidth=0.5, linestyle='-', marker='o',
        markerfacecolor='lime', markeredgecolor='k', markeredgewidth=0.5,
        label='line1', markersize=10, ecolor='lime', capsize=10)
 pl.legend(loc='best', frameon=False)

 pl.show()

 produces a legend for the plot (figure(1)) with the markers on top of
 the lines, but the legend for the errorbar (figure(2)) has this
 reversed.

 Any ideas/suggestions would be greatly appreciated.

 Best,
  Adrian.

 --
 Cloud Services Checklist: Pricing and Packaging Optimization
 This white paper is intended to serve as a reference, checklist and point of
 discussion for anyone considering optimizing the pricing and packaging model
 of a cloud services business. Read Now!
 http://www.accelacomm.com/jaw/sfnl/114/51491232/
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Inconsistent marker/line zorder in errorbar legend

2011-12-06 Thread Adrian Del Maestro
Hello,

I have run across an inconsistency in the zorder of markers and lines
in the legend for an errorbar as opposed to a plot in matplotlib
v1.1.0.  After some considerable amount of time reading
legend_handler.py and the information at
http://matplotlib.sourceforge.net/users/legend_guide.html I was unable
to figure out how to make the errorbar markers sit 'on top' of the
lines in a legend.

For example the following code:

import pylab as pl
import numpy as np

x = pl.arange(-2,2,0.1)
y = x**2
dy = np.random.random(len(x))

pl.figure(1)
pl.plot(x,y, color='k', linewidth=0.5, linestyle='-', marker='o',
markerfacecolor='lime', markeredgecolor='k', markeredgewidth=0.5,
label='line1', markersize=10)
pl.legend(loc='best', frameon=False)

pl.figure(2)
pl.errorbar(x,y,yerr=dy, color='k', linewidth=0.5, linestyle='-', marker='o',
markerfacecolor='lime', markeredgecolor='k', markeredgewidth=0.5,
label='line1', markersize=10, ecolor='lime', capsize=10)
pl.legend(loc='best', frameon=False)

pl.show()

produces a legend for the plot (figure(1)) with the markers on top of
the lines, but the legend for the errorbar (figure(2)) has this
reversed.

Any ideas/suggestions would be greatly appreciated.

Best,
  Adrian.

--
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users