0

I have seen on Stackoverflow that some people where asking how to have the grid lines showing in between subplots.

However in matplotlib 2.1.1 I have this as default behavior - and I actually don't want it.

n_cols   = 2 # or 1
fig,axes = plt.subplots(3, n_cols, sharex='all', sharey='row')
axes     = axes.reshape((3,n_cols));

for input in inputs:
    ax1 = axes[0,column[input]].plot(...)
    ax1.yaxis.grid(True)
    ax1.xaxis.grid(True)
    ax2 = axes[1,column[input]].plot(...)
    ax2.yaxis.grid(True)
    ax2.xaxis.grid(True)
    ax3 = axes[2,column[input]].plot(...)
    ax3.yaxis.grid(True)
    ax3.xaxis.grid(True)

plt.show()

So yes, the grid is set multiple times to True for each axis.

enter image description here

Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
Radio Controlled
  • 825
  • 8
  • 23

0 Answers0