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

WebAgg: Fix IPython detection. Fix encoding error on Python 3 #2834

Merged
merged 2 commits into from Mar 17, 2014

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Feb 24, 2014

This is an alternative to #2832.

This fixes an error on Python 3 where byte strings can not be serialized to JSON.

This also removes show() as a way to display all figures inline in the IPython notebook. This causes problems because:

  1. In a regular IPython console, you want to start the plotting server blocking

  2. In an IPython notebook, you don't

There is no way to detect which frontend you have for IPython -- in some cases, you may actually be using both.

So the solution here is to make show() always start a blocking server (and thus, it's only useful outside of the IPython notebook), and use the Figure repr to display an inline figure.

@mdboom mdboom added this to the v1.4.0 milestone Feb 24, 2014
@pelson
Copy link
Member

pelson commented Feb 26, 2014

We can remove line 43 which defines _in_ipython as a result of this change.

tacaswell added a commit that referenced this pull request Mar 17, 2014
WebAgg: Fix IPython detection.  Fix encoding error on Python 3
@tacaswell tacaswell merged commit 76f902c into matplotlib:master Mar 17, 2014
@mdboom mdboom deleted the webagg/ipython-detection branch August 7, 2014 13:52
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.

None yet

4 participants