Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing plot at top level #347

Merged
merged 2 commits into from Oct 17, 2019
Merged

Exposing plot at top level #347

merged 2 commits into from Oct 17, 2019

Conversation

jsignell
Copy link
Member

import numpy as np
import pandas as pd

pd.options.plotting.backend = 'hvplot'
data = np.random.normal(size=[50, 2])
df = pd.DataFrame(data, columns=['x', 'y'])

df.plot(x='x', y='y')

@jbednar
Copy link
Member

jbednar commented Oct 17, 2019

How does that example depend on having plot at the top level?

@jsignell
Copy link
Member Author

This is from the gitter convo

@jsignell
Copy link
Member Author

There are two ways to implement backends for pd.options.plotting.backend : entrypoints or exposing a top level plot function in the module.

@jsignell jsignell merged commit b536e1f into master Oct 17, 2019
@jsignell jsignell deleted the jsignell/expose_plot branch October 17, 2019 20:24
@jbednar
Copy link
Member

jbednar commented Oct 17, 2019

To summarize the conversation from gitter for posterity, the issue is that pd.options.plotting.backend = 'holoviews' currently works, via the entry point mechanism, but pd.options.plotting.backend = 'hvplot' does not. With this PR, pd.options.plotting.backend = 'hvplot' now works, via the top-level plot function method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants