-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Open
Labels
keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actionmentored: hackathonstatus: confirmed bugtopic: polar
Milestone
Description
Adding a colorbar to a pcolormesh when the polar projection is specified for the axes doesn't work as expected. The code below results in a missing colorbar, and a very small plot area.
import matplotlib.pyplot as plot
import mpl_toolkits.axes_grid1 as axes_grid1
import numpy as np
t = np.linspace(0.0, 2.0 * np.pi, 360)
r = np.linspace(0,100,200)
rg, tg = np.meshgrid(r,t)
c = rg * np.sin(tg)
# If I remove the projection="polar" argument here the
ax = plot.subplot2grid((1, 1), (0, 0), projection="polar", aspect=1.)
im = ax.pcolormesh(t, r, c.T)
divider = axes_grid1.make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)
plot.colorbar(im, cax=cax)
plot.show()
Metadata
Metadata
Assignees
Labels
keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actionmentored: hackathonstatus: confirmed bugtopic: polar