Skip to content

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

Merged
merged 7 commits into from
Jan 17, 2016
Merged

mpl_to_plotly offline #386

merged 7 commits into from
Jan 17, 2016

Conversation

cldougl
Copy link
Member

@cldougl cldougl commented Jan 15, 2016

PR from arsenovic :
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.

plus

  • plot_mpl() allows offline matplotlib figure conversion independent of Ipython notebooks.
  • docstrings / examples
  • tests

arsenovic and others added 3 commits December 3, 2015 14:55
`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
@cldougl cldougl changed the title Matplotlylib offline mpl_to_plotly offline Jan 15, 2016
@cldougl
Copy link
Member Author

cldougl commented Jan 15, 2016

@chriddyp @theengineear -- ready for review

iplot_mpl,
plot,
plot_mpl,
plotly_takeover
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe plotly_mpl_takeover?

Copy link
Contributor

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.

Copy link
Member Author

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 ?

@chriddyp
Copy link
Member

otherwise looks good!

@theengineear
Copy link
Contributor

@cldougl you need to update the plot-schema, you know how to do that?

Run make update_default_schema to fix it!

@cldougl
Copy link
Member Author

cldougl commented Jan 15, 2016

thanks @theengineear just did!
(thanks to that super helpful fail message \o/)

@theengineear
Copy link
Contributor

☁☀☂np :)


def plot_mpl(mpl_fig, resize=False, strip_style=False,
verbose=False, **kwargs):
'''
Copy link
Contributor

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/

@theengineear
Copy link
Contributor

Mostly non-blocking comments. 💃 after considering 'em!

cldougl added a commit that referenced this pull request Jan 17, 2016
@cldougl cldougl merged commit 31ca2c7 into master Jan 17, 2016
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.

4 participants