Skip to content

offline plot command - fixes https://github.com/plotly/plotly.py/pull/378 #378

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 10 commits into from
Jan 11, 2016

Conversation

chriddyp
Copy link
Member

Description: Write Plotly graphs to an HTML file from Python.

Fixes - fixes #378

@chriddyp
Copy link
Member Author

Here's a first pass at plotly.offline.plot
offline-plot

  • tests

hey @cldougl @theengineear - could you check this out?

if (plotly_platform_url != 'https://plot.ly' and
link_text == 'Export to plot.ly'):
plot([
go.Scatter(x=[1, 2, 3], y=[3, 2 6])
Copy link
Member

Choose a reason for hiding this comment

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

missing comma y=[3, 2, 6]

@cldougl
Copy link
Member

cldougl commented Dec 30, 2015

@chriddyp first pass looks good- all the defaults are working well for me!

def plot(figure_or_data,
show_link=True, link_text='Export to plot.ly',
validate=True, output_type='file',
include_plotlyjs=True,
Copy link
Member Author

Choose a reason for hiding this comment

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

In the future, when plotly.js is modularized, we might allow folks to include sub-bundles here. Maybe something like plotlyjs_modules=['scatter', 'bar', 'maps'] which would overwrite the include_plotlyjs argument?
cc @etpinard

Copy link
Contributor

Choose a reason for hiding this comment

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

🍻

maybe also a include_mathjax flag?

@theengineear
Copy link
Contributor

First pass looks good to me too!!

@Immortalin
Copy link

@chriddyp merge this with 366?

@chriddyp
Copy link
Member Author

chriddyp commented Jan 8, 2016

hey @cldougl @theengineear - I just added tests. Could you take another look? Would like to merge this early next week :)

@theengineear
Copy link
Contributor

Sweet! Thanks for adding tests! 💃 after you update the plot schema and tests 🎏

@cldougl
Copy link
Member

cldougl commented Jan 10, 2016

same here- 💃 after update/tests pass

chriddyp added a commit that referenced this pull request Jan 11, 2016
@chriddyp chriddyp merged commit a8a68fb into master Jan 11, 2016
@chriddyp chriddyp deleted the offline-plot branch January 11, 2016 17:24
@chriddyp chriddyp changed the title offline plot command offline plot command - fixes https://github.com/plotly/plotly.py/pull/378 Jan 11, 2016
@jackgolding
Copy link

Thanks heaps for this @chriddyp and all the testers!

@pollackscience
Copy link

Excellent! Thanks @chriddyp!

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.

7 participants