ax = lab.subplot(111, axisbelow='True')
ensures that the gridlines appear below the bars on a plot;
how can the same be done for the legend (ie the grid
below the legend and not running through it)?
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
CSIR E-mail Legal Notice
CSIR Copyright, Terms and Conditions
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean.
From: John Hunter <jdhunter@ac...> - 2007-01-18 14:55:25
>>>>> "Derek" == Derek Hohls <DHohls@...> writes:
Derek> The command: ax = lab.subplot(111, axisbelow='True')
Derek> ensures that the gridlines appear below the bars on a plot;
Derek> how can the same be done for the legend (ie the grid below
Derek> the legend and not running through it)?
Hmm, I don't see this in matplotlib svn. Ie, in the example below, the
grid is below the legend.
In : ax = subplot(111, axisbelow=True)
In : plot([1,2,3], label='test')
Out: [<matplotlib.lines.Line2D instance at 0xb581b6ac>]
In : legend()
Out: <matplotlib.legend.Legend instance at 0xb581bc4c>
In : grid()
If this doesn't work for you and you cannot upgrade, you may be able
to increase the zorder of your legend
l = legend(...)
and see if that helps.
Get latest updates about Open Source Projects, Conferences and News.