-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
mpl_to_plotly offline #386
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
Conversation
`iplot_mpl()` allows offline matplotlib figure conversion for ipython notebook inline mode. `plotly_takeover()` is a compound command that allows an entire notebook session that was written using matplotlib to use offline plotly without any modification. the later idea was taken from https://github.com/jakevdp/mpld3/blob/202792bcddbfe957ade08a5085691ab176a4563d/mpld3/_display.py#L363
@chriddyp @theengineear -- ready for review |
iplot_mpl, | ||
plot, | ||
plot_mpl, | ||
plotly_takeover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe plotly_mpl_takeover
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any of these perhaps?
take_mpl_offline
make_mpl_offline
convert_mpl_to_offline
Neither plotly_takeover
nor plotly_mpl_takeover
makes all that much sense to me on the first pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(tbh I agree-- in case this reference got lost from the original pr the idea came from this function )
maybe enable_mpl_offline
?
otherwise looks good! |
@cldougl you need to update the plot-schema, you know how to do that?
|
thanks @theengineear just did! |
☁☀☂np :) |
|
||
def plot_mpl(mpl_fig, resize=False, strip_style=False, | ||
verbose=False, **kwargs): | ||
''' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐄 I think we typically use """
not, '''
. https://www.python.org/dev/peps/pep-0257/
Mostly non-blocking comments. 💃 after considering 'em! |
PR from arsenovic :
iplot_mpl()
allows offline matplotlib figure conversionfor ipython notebook inline mode.
plotly_takeover()
is a compound command that allows an entirenotebook session that was written using matplotlib to use offline
plotly without any modification.
plus
plot_mpl()
allows offline matplotlib figure conversion independent of Ipython notebooks.