|
From: mgurling <mag...@gm...> - 2013-04-30 20:24:25
|
I'm trying to make a legend handle that is half black and half hatched. I've
tried ...
...
rpos1 = ax.bar(ind, pos1, width, color='k', label='+1')
rneg1 = ax.bar(ind, neg1, width, color='w', hatch='///', label='-1')
rpos2 = ax.bar(ind, pos2, width, color='w', label='+2')
rneg2 = ax.bar(ind, neg2, width, color='w', label='-2')
handles, labels = ax.get_legend_handles_labels()
ax.legend( ((handles[0], handles[1]), handles[2]) , ('one', 'two') )
...
The first handles--handles[0] and handles[1]--are combined but not side by
side: the hatched rectangle is placed over the top of the black rectangle so
the handle looks like it is just hatched. How might I create this mixed
handle?
--
View this message in context: http://matplotlib.1069221.n5.nabble.com/black-and-hatched-legend-handle-tp40979.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|