-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels

Description
Description
I'm running into an error after upgrading the proplot version . The error occurs when using contourf, the error message is KeyError: 'red'
Steps to reproduce
# your code here
# we should be able to copy-paste this into python and exactly reproduce your bug
import proplot as plot
import matplotlib.pyplot as plt
import numpy as np
f, axs = plot.subplots(ncols=1, nrows=1)
#generate random data
data=np.ones((180,360))
data[20:80,80:150]+=1
x=np.arange(0,360,1)
y=np.arange(0,180,1)
axs.contourf(x,y,data,cmap=plt.cm.coolwarm)
plt.show()
Expected behavior: A simple contourf plot
Actual behavior: An error message occured and the plot was not produced
Equivalent steps in matplotlib
Pretty sure its Proplot. With matplotlib this works
import matplotlib.pyplot as plt
import numpy as np
f,axs=plt.subplots()
#generate random data
data=np.ones((180,360))
data[20:80,80:150]+=1
x=np.arange(0,360,1)
y=np.arange(0,180,1)
axs.contourf(x,y,data,cmap=plt.cm.coolwarm)
plt.show()
Proplot version
Matplotlib: 3.4.1
Proplot: 0.9.1