0

Is there a way to achieve equivalent settings to the subplots grid adjustments but using the individual subplot API's?

In particular the subplots may be adjusted via the GridSpec:

gs = gridspec.GridSpec(4, 1, height_ratios=[2, 2, 1, 1]) 

The subplots may also be adjusted via gridspec_kw:

gridspec_kw={'wspace':0,'hspace':0})

Or even:

fig.subplots_adjust(wspace=2)

However I was not able to find a similar capability directly on the subplot api - e.g. following is not valid:

plt.subplot(2, 2, 1, gridspec_kw={'wspace':0,'hspace':0})

The rationale for finding this is I am working with pre-existing code that only uses subplot. It would be a meaningful effort to convert the code to subplots and so a direct addition of just the grid capability would be preferred if possible.

WestCoastProjects
  • 58,982
  • 91
  • 316
  • 560

0 Answers0