-
-
Couldn't load subscription status.
- Fork 2.7k
static image support for other formats #43
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
@chriddyp
chriddyp
commented
Jun 28, 2014
- update response object handling within the static image interface
- exposed support for svg, pdf, and jpeg
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.
should we be more specific than 'json'? 'application/json'?
Looks good from the Python API side of things!
🐖
Hmm.
Off the better_svg_support branch, I'm getting:
6 figure = py.get_figure('al_indigo', '38')
----> 7 py.image.save_as(figure, 'test.png')
/home/etienne/plotly/python-api/plotly/plotly/plotly.pyc in save_as(cls, figure_or_data, filename, format, width, height)
620
621 f = open(filename, 'w')
--> 622 f.write(img)
623 f.close()
624
TypeError: expected a character buffer object
And similarly for
py.image.save_as(figure, 'test.svg')
with
print img # --> None
between line 621 and 622
Ah yeah, at this point it only works with a development version of plot.ly.
So once the dev branch gets deployed, this will work.
On Mon, Jun 30, 2014 at 11:07 AM, Étienne Tétreault-Pinard <
notifications@github.com> wrote:
Hmm.
Off the better_svg_support branch, I'm getting:
6 figure = py.get_figure('al_indigo', '38')----> 7 py.image.save_as(figure, 'test.png')
/home/etienne/plotly/python-api/plotly/plotly/plotly.pyc in save_as(cls, figure_or_data, filename, format, width, height)
620
621 f = open(filename, 'w')
--> 622 f.write(img)
623 f.close()
624TypeError: expected a character buffer object
—
Reply to this email directly or view it on GitHub
#43 (comment).
static image support for other formats