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
list_plot of a nearly constant sequence fails #11973
Comments
comment:1
Here are a whole bunch of (closed) related tickets.
|
comment:3
This happens with plot too:
|
comment:4
It appears that the major locator is giving back bad values (i.e., somehow it is giving back [0,1,2] as the major tickmarks, which is then trimmed down to just 1, giving the minor locator error since there is only one major tickmark). I think the problem is somewhere in matplotlib.ticker.MaxNLocator.bin_boundaries function, but I'm not sure. |
comment:5
My test cases are:
|
comment:6
I think the next step would be to try to replicate it using only matplotlib. If we can do that, we can move the bug report upstream. |
Milestone sage-4.7.3 deleted |
comment:8
I think we can bump this up:
reproduces the problem in mpl 1.2.x. |
comment:9
Great; if you can post to the matplotlib mailing list and post the thread URL here, that would be great. |
Changed keywords from list_plot, matplotlib to list_plot, matplotlib, sd40.5 |
comment:11
I'll contact matplotlib-devel and see what they think of the problem. |
comment:12
Interesting: the example I gave in the description works in 5.1beta0 (64-bit Linux), but the y-axis doesn't have any labels. The plot is correct for the given data, though. |
comment:17
everything works in 6.6.rc0 |
At https://groups.google.com/d/topic/sage-devel/gu0Al01k-3Y/discussion I noted that list_plot/matplotlib are confused when given a nearly-constant sequence:
fails with
(with 4.7.1 on 64-bit Linux.)
Since the usual plot() function works with constant functions, there should be a way to get this working. (Or, we should decide that this is a matplotlib bug and properly report it.)
CC: @novoselt
Component: graphics
Keywords: list_plot, matplotlib, sd40.5
Issue created by migration from https://trac.sagemath.org/ticket/11973
The text was updated successfully, but these errors were encountered: