Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
chriddyp merged 2 commits into master from better_svg_support
Jun 30, 2014
Merged

Conversation

@chriddyp
Copy link
Member

@chriddyp chriddyp commented Jun 28, 2014

  • update response object handling within the static image interface
  • exposed support for svg, pdf, and jpeg

Copy link
Contributor

@theengineear theengineear Jun 30, 2014

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'?

Copy link
Contributor

Looks good from the Python API side of things!
🐖

Copy link
Contributor

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

Copy link
Member Author

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()
624

TypeError: expected a character buffer object


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

chriddyp added a commit that referenced this pull request Jun 30, 2014
static image support for other formats
@chriddyp chriddyp merged commit 97c1d70 into master Jun 30, 2014
@chriddyp chriddyp deleted the better_svg_support branch June 30, 2014 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /