Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature Request: Allow hexbin to use a string for parameter C to refer to column in data (DataFrame) #18097

Closed
@tdpetrou

Description

@tdpetrou

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp