-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Description
Description
Unable to produce colorbars within different subplots. Matplotlib is able to produce a better colorbar.
Steps to reproduce in Matplotlib
import matplotlib.pyplot as plt
import numpy as np
# Fixing random state for reproducibility
np.random.seed(19680801)
fig, axs = plt.subplots(3, 3, constrained_layout=True)
for ax in axs.flat:
pcm = ax.pcolormesh(np.random.random((20, 20)))
fig.colorbar(pcm, ax=axs[0, :2], shrink=0.6, location='bottom')
fig.colorbar(pcm, ax=[axs[0, 2]], location='bottom')
fig.colorbar(pcm, ax=axs[1:, :], location='right', shrink=0.6)
fig.colorbar(pcm, ax=[axs[2, 1]], location='left')
plt.show()Steps to reproduce in Proplot
import proplot as plt
fig, axs = plt.subplots(ncols=3, nrows=3)
for ax in axs:
pcm = ax.pcolormesh(np.random.random((20, 20)))
fig.colorbar(pcm, ax=axs[0, :2], shrink=0.6, location='bottom')
fig.colorbar(pcm, ax=[axs[0, 2]], location='bottom')
fig.colorbar(pcm, ax=axs[1:, :], location='right', shrink=0.6)
fig.colorbar(pcm, ax=[axs[2, 1]], location='left')Matplotlib behavior: [What you expected to happen]

Proplot behavior: [What actually happened]

Proplot version
3.4.3 Matplotlib
0.9.5 Proplot