-
Notifications
You must be signed in to change notification settings - Fork 99
Closed
Labels
Description
Description
An inset colorbar can not centred.
The loc parameter has no centering option.
Steps to reproduce
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you.
import proplot as pplt
import numpy as np
x = np.array([1,2,3,4,5,6])
y = np.array([1, 2])
data = [[np.nan,np.nan,np.nan,np.nan,np.nan,np.nan],[1,2,2,1,3,4]]
with pplt.rc.context({'cmap': 'Grays', 'cmap.levels': 21}):
# Figure
fig = pplt.figure(refwidth=2.3, share=False)
axs = fig.subplots(ncols=1)
axs.format(xlabel='xlabel', ylabel='ylabel',xlocator=1, ylocator=1, )
hs=axs[0].pcolor( data, cmap='colorblind', levels=pplt.arange(0, 9,1))
axs.colorbar(hs, loc='ll',length=12,)
Expected behavior:
I want the colorbar in the figure to be centred.
Actual behavior:

Proplot version
matplotlib version is 3.3.4
proplot version is 0.9.5