You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error handling in list_plot is dubious, with the following incredible side effect:
list_plot([(0,-1),(1,-2),(2,-3),(3,-4),(4,None)])
What happens is that list_plot eventually calls point which raises a TypeError due to the None, and then list_plot assumes that it was because the input consists of complex numbers (which is not the reason), and further it assumes that the input data has already been replaced by list(enumerate(data)) by the previous code (which isn't the case), so it takes the second entry of each pair and converts it into an element of CC and plots that. Hence the y-values are plotted on the x-axis. (And the None is converted to 0.)
The error handling in
list_plot
is dubious, with the following incredible side effect:What happens is that
list_plot
eventually callspoint
which raises aTypeError
due to theNone
, and thenlist_plot
assumes that it was because the input consists of complex numbers (which is not the reason), and further it assumes that the inputdata
has already been replaced bylist(enumerate(data))
by the previous code (which isn't the case), so it takes the second entry of each pair and converts it into an element ofCC
and plots that. Hence the y-values are plotted on the x-axis. (And theNone
is converted to0
.)Component: graphics
Keywords: list_plot, None
Issue created by migration from https://trac.sagemath.org/ticket/29960
The text was updated successfully, but these errors were encountered: