Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Feature request
Currently thehexbin
function allows for its first two parametersx
andy
to be strings ofdata
(usually a pandas DataFrame), but notC
importnumpyasnpimportpandasaspdimportmatplotlib.pyplotaspltdf=pd.DataFrame(np.random.rand(100000,3))df.columns= ['a','b','c']plt.hexbin('a','b',C='c',data=df)
Results inIndexError: string index out of range
Currently, you must pass inC
as a Series/array
plt.hexbin('a', 'b', C=df['c'], data=df)