-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
%matplotlib widget does not work in the scope of %display latex #33469
Comments
This comment has been minimized.
This comment has been minimized.
Changed keywords from none to jupyterlab, matplotlib widget |
comment:3
I hit presumably the same problem this morning in class with How to reproduce
outputs a string representation instead of the slider:
Proposed fixSage's formatter has a list of "Python native types" Temporary workaroundApply the proposed fix by monkey patching:
|
comment:4
Eric: does the workaround work for ipyml? Cheers, |
comment:5
Replying to @nthiery:
Yes, absolutely:
fixes the issue. Thank you Nicolas! |
comment:6
Replying to @egourgoulhon:
Actually, this specific addition is not even necessary: as you pointed out
is more generic and suffices to fix the issue with |
comment:7
Great. So the next step is to implement the fix directly in Sage. I might not be able to do it in the next days, so anyone feel free |
comment:9
Miracle: upgrading my sage was quick, and git trac still functional on my laptop. New commits:
|
Commit: |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:11
Well, needs review I guess. I tried adding a test, but actually the test pass even before the patch. |
comment:12
Replying to @nthiery:
I have no idea, either. But if the test does not test the patch, then I think it is of no use. On the other hand, any change in the output system may cause unexpected side effects which are detected only by human eyes. It seems that the best we can do is to check a good many examples with the patch. There is another ticket #11362 that needs the same scrutiny. |
comment:14
Agreed. I only included it to be precise about what I tried, in the |
comment:15
Replying to @kwankyu:
I've already updated test_display_latex.ipynb, but I'll prepare a better one soon, including threejs animations and so on... |
comment:16
Replying to @nthiery:
I don't see any simple doctest either, so yes, maybe the best is to revert this. |
comment:17
Replying to @egourgoulhon:
Here it is : test_display.ipynb. It would be nice to have this ticket merged in Sage 9.6. IMHO, it is ready to go. Simply maybe the test mentioned in comment:11 could be removed, given that the actual test is the "human-eyes" one, e.g. via the above notebook. |
This comment has been minimized.
This comment has been minimized.
comment:18
Replying to @egourgoulhon:
+1 for positive review. |
comment:19
Replying to @egourgoulhon:
Thank you! |
comment:20
OK, let's move on. Thank you Nicolas for the fix! |
Reviewer: Eric Gourgoulhon, Kwankyu Lee |
Author: Nicolas M. Thiéry |
Changed branch from u/nthiery/_matplotlib_widget_does_not_work_in_the_scope_of__display_latex to |
The magic
%matplotlib widget
, which provides interactive Matplotlib display via the package ipympl introduced in #32069, is inoperative in the scope of%display latex
:in a Jupyter notebook the cell
results in the raw output
instead of the interactive Matplotlib window. Replacing
%display latex
by%display plain
makes the cell work fine.See also the test notebook below.
This is problematic for Jupyterlab, where the magic
%matplotlib notebook
is not supported and must be replaced by%matplotlib widget
.Notebook for testing display in Jupyter:
test_display.ipynb.
Note that it lies in a git repository, so feel free to amend it by sending a pull request to SageMathTest.
Depends on #32069
CC: @kwankyu
Component: notebook
Keywords: jupyterlab, matplotlib widget
Author: Nicolas M. Thiéry
Branch/Commit:
d8dd0db
Reviewer: Eric Gourgoulhon, Kwankyu Lee
Issue created by migration from https://trac.sagemath.org/ticket/33469
The text was updated successfully, but these errors were encountered: