-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
a matrix plot is wrong when matrix entries are not representable as floats. #1481
Comments
comment:2
This seems to work in 2.9.3:
I do get this warning:
but the image shows up (a giant black square, just like it should). |
comment:3
Ok, but we should still add a doctest to catch this behavior. It can be Cheers, Michael |
comment:4
Thanks for reopening this. The following code displays the wrong plot:
What should be displayed is the same as the plot:
So the matrix plot has gone from blowing up to just being wrong. Whether this is worse or better is left as an exercise for the reader. |
comment:5
I think this problem is a matplotlib problem and has to do with not dealing with inf or -inf in the matrix. We could send vmin and vmax parameters to the imshow command to scale the matrix manually if we see an infinity in the matrix, or we could raise an exception, or we could report the bug back up to matplotlib (if it is indeed a matplotlib issue). |
this should completely deal with the dense case. |
Author: William Stein |
comment:6
Attachment: trac_1481-part1.patch.gz |
comment:9
Whoever referees this patch should make sure it works well with the norm, vmin, and vmax parameters in matrix_plot |
comment:10
On the surface, it doesn't appear that the patch works with norm, vmin, and vmax, probably because the patch was written before we added those parameters. |
Reviewer: Karl-Dieter Crisman |
comment:11
Does not apply to 4.7.alpha1 in any case. Needs work - though, impressively, only one hunk failed. Not bad for a patch over a year old. |
comment:12
The original patch doesn't seem to work at the moment (the numpy array created has dtype=object, so the integers stay as integers instead of becoming floats, so there are no infs to work around). I have a variant which works, and modified it to handle vmin and vmax, but I'm not sure what to do with norm: should the norm be applied before or after the vmin/vmax? |
can I Work on this issue ??? |
CC: @kcrisman
Component: graphics
Author: William Stein
Reviewer: Karl-Dieter Crisman
Issue created by migration from https://trac.sagemath.org/ticket/1481
The text was updated successfully, but these errors were encountered: