-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Adapt inline backend to changes in matplotlib #2384
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
Thanks for getting onto this so quickly. I'd be inclined to add a comment just above the |
@takluyver Good point. Comment added |
Thanks. If my matplotlib PPA build succeeds tonight, I'll test this tomorrow. Otherwise, I'll take your word for it that it works. |
Please do make this a PR against master. We backport PRs to 0.13.1 from master by tagging the appropriate ones. |
Matplotlib recently merged matplotlib/matplotlib#1125 that makes it simpler to use objective oriented figure creation by automatically creating the right canvas for the backend. To solve that all backends must provide a backend_xxx.FigureCanvas. This is obviosly missing from the inline backend. The change is needed to make the inline backend work with mpl's 1.2.x branch which is due to released soon. Simply setting the default canvas equal to a Agg canvas appears to work for both svg and png figures but I'm not sure weather that is the right approach. Should the canvas depend on the figure format and provide a svg canvas for a svg figure? (Note that before this change to matplotlib the canvas from a plt.figure call seams to be a agg type in all cases) Edit: I made the pull request against 0.13.1 since it would be good to have this in the stable branch for when mpl is released. Just let me know and I can rebase it against master
Matplotlib recently merged matplotlib/matplotlib#1125 that makes it simpler to use objective oriented figure creation by automatically creating the right canvas for the backend. To solve that all backends must provide a backend_xxx.FigureCanvas. This is obviosly missing from the inline backend. The change is needed to make the inline backend work with mpl's 1.2.x branch which is due to released soon. Simply setting the default canvas equal to a Agg canvas appears to work for both svg and png figures but I'm not sure weather that is the right approach. Should the canvas depend on the figure format and provide a svg canvas for a svg figure? (Note that before this change to matplotlib the canvas from a plt.figure call seams to be a agg type in all cases) Edit: I made the pull request against 0.13.1 since it would be good to have this in the stable branch for when mpl is released. Just let me know and I can rebase it against master
* tag 'rel-0.13.1': (27 commits) remove rc for 0.13.1 final 0.13.1.rc3 qtconsole extras_require to whatsnew Backport PR ipython#2492: add missing 'qtconsole' extras_require add 2480 to whatsnew Backport PR ipython#2480: Add deprecation warnings for sympyprinting PR 2384 to whatsnew mark 0.13.1.rc2 Backport PR ipython#2384: Adapt inline backend to changes in matplotlib mark 0.13.1.rc1 update 0.13.1 whatsnew lists Backport PR ipython#2479: use new _winapi instead of removed _subprocess Backport PR ipython#2437: don't let log cleanup prevent engine start Backport PR ipython#2405: clarify TaskScheduler.hwm doc Backport PR ipython#2377: Fix installation of man pages in Python 3 start 0.13.1 whatsnew Backport PR ipython#2373: fix missing imports in core.interactiveshell Backport PR ipython#2365: fix names of notebooks for download/save Backport PR ipython#2345: Remove references to 'version' no longer in argparse. Github issue ipython#2343. Backport PR ipython#2347: adjust division error message checking to account for Python 3 ...
* tag 'rel-0.13.1': (51 commits) remove rc for 0.13.1 final 0.13.1.rc3 qtconsole extras_require to whatsnew Backport PR ipython#2492: add missing 'qtconsole' extras_require add 2480 to whatsnew Backport PR ipython#2480: Add deprecation warnings for sympyprinting PR 2384 to whatsnew mark 0.13.1.rc2 Backport PR ipython#2384: Adapt inline backend to changes in matplotlib mark 0.13.1.rc1 update 0.13.1 whatsnew lists Backport PR ipython#2479: use new _winapi instead of removed _subprocess Backport PR ipython#2437: don't let log cleanup prevent engine start Backport PR ipython#2405: clarify TaskScheduler.hwm doc Backport PR ipython#2377: Fix installation of man pages in Python 3 start 0.13.1 whatsnew Backport PR ipython#2373: fix missing imports in core.interactiveshell Backport PR ipython#2365: fix names of notebooks for download/save Backport PR ipython#2345: Remove references to 'version' no longer in argparse. Github issue ipython#2343. Backport PR ipython#2347: adjust division error message checking to account for Python 3 ...
Matplotlib recently merged matplotlib/matplotlib#1125 that makes it simpler to use
objective oriented figure creation by automatically creating the right canvas for the backend. To solve that
all backends must provide a backend_xxx.FigureCanvas. This is obviosly missing from the inline backend.
The change is needed to make the inline backend work with mpl's 1.2.x branch which is due to released soon. Simply setting the default canvas equal to a Agg canvas appears to work for both svg and png figures but I'm not sure weather that is the right approach. Should the canvas depend on the figure format and provide a svg canvas for a svg figure? (Note that before this change to matplotlib the canvas from a plt.figure call seams to be a agg type in all cases)
Edit: I made the pull request against 0.13.1 since it would be good to have this in the stable branch for when mpl is released.
Just let me know and I can rebase it against master