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

Add options for savefig #4

Closed
sglyon opened this issue Dec 17, 2015 · 3 comments
Closed

Add options for savefig #4

sglyon opened this issue Dec 17, 2015 · 3 comments

Comments

@sglyon
Copy link
Member

sglyon commented Dec 17, 2015

Minimum options needed:

  • width
  • height
  • dpi

The width/height options would preferably accept measures like height=4inch, width=8inch

This might be relevant: http://stackoverflow.com/a/26047748/1742701

@asbisen
Copy link

asbisen commented Jan 12, 2016

Can we also add another option to savefig when saving output to html. Currently the html references local copy of plotly.js. Either we can embed the plotly.js inside the html such that the file is portable or we can add an option to use the CDN URI. Something like..

savefig(p, "plot.html", js=("remote", "local", "embed")) 

@sglyon
Copy link
Member Author

sglyon commented Jan 12, 2016

Excellent idea. I'd be happy to accept a pull request if you feel up for it.

To me it sounds like a keyword argument with type Symbol would work well.
What do you think?

// Spencer
On Jan 12, 2016 13:35, "asbisen" [email protected] wrote:

Can we also add another option to savefig when saving output to html.
Currently the html references local copy of plotly.js. Either we can
embed the plotly.js inside the html such that the file is portable or we
can add an option to use the CDN URI. Something like..

savefig(p, "plot.html", js=("remote", "local", "embed"))


Reply to this email directly or view it on GitHub
#4 (comment)
.

@asbisen
Copy link

asbisen commented Jan 13, 2016

Done you can review it here https://github.com/asbisen/PlotlyJS.jl

usage would look like:

savefig(p, "testr.html", js=:local)

  • :local would be default or could be provided explicitly
  • :remote would reference the CDN
  • :embed would embed adding ~1.7MB to the file

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

No branches or pull requests

2 participants