Hello, I'm trying to draw only left and bottom borders of
> the frame surrounding each plot, like in the attached
> chart.
> I've checked matplotlib source code and it seems there is
> no way to do that with a simple parameter. Do you confirm
> that? If yes, can I submit a patch for such a "feature"?
It's been a long standing wish to support something like this -- axis
lines that an be placed arbitrarily, eg in the center like
mathematica, or only on the left, only on the right, etc... So a
patch would definitely be welcome.
Here is some example code that will get you pretty close to the
figure you sent
import matplotlib
from pylab import figure, show, nx
defaults = {
'xtick.major.size' : 6,
'xtick.direction' : 'out',
'ytick.major.size' : 6,
'ytick.direction' : 'out',
'grid.color' : 'gray',
'grid.linestyle' : '-',
'grid.linewidth' : 0.5
}
matplotlib.rcParams.update(defaults)
fig = figure()
ax = fig.add_subplot(111)
ax.axesPatch.set_edgecolor('white')
props = dict(color='black', lw=1.5, transform=ax.transAxes,
clip_on=False)
line1, = ax.plot([0,0], [0,1])
line2, = ax.plot([0,1], [0,0])
line1.update(props)
line2.update(props)
ax.plot(nx.rand(10), '-o', lw=2)
ax.xaxis.grid(False)
ax.yaxis.grid(True)
for tick in ax.xaxis.get_major_ticks() + ax.yaxis.get_major_ticks():
tick.tick2On = False # turn of right and top ticking
show()