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
{{ message }}
Repository navigation
Axis limits are set badly with small values in scatter(). #9979
I have been trying to see why scatter is behaving in a different way. I realized that some of the code used by scatter is in _path.h. The get_path_collection_extents method gets called from path.py to figure out the dimensions to give to the bounding box. I would be interested in pursuing this further, but I am just not sure how to debug the c++ part of the library, any tips would be appreciated.
Summary: The simplest possible scatter plot of a time series on a single date chooses nonsensically huge x bounds, making the plot useless for visualization by default.
Activity
jklymak commentedon Dec 12, 2017
Yes, it's scatter's specialness. I bet plot doesn't do that.
naught101 commentedon Dec 12, 2017
No, plot() doesn't do that.
[-]Axis limits are set badly with small values.[/-][+]Axis limits are set badly with small values in scatter().[/+]LucyTishkina commentedon Mar 16, 2018
I have been trying to see why scatter is behaving in a different way. I realized that some of the code used by scatter is in _path.h. The get_path_collection_extents method gets called from path.py to figure out the dimensions to give to the bounding box. I would be interested in pursuing this further, but I am just not sure how to debug the c++ part of the library, any tips would be appreciated.
tacaswell commentedon Mar 16, 2018
@Lusura My knee jerk reaction is that the bug is not in the c++ layer, but in how we massage the returns of those calls in python.
One of the things scatter tries to take into account is that the size of the markers can vary in size which may be related to this.
Agree is in related to #7413.
jzwinck commentedon Nov 29, 2018
Here's a trivial demo which doesn't do what anyone would expect: https://stackoverflow.com/questions/53536688/matplotlib-automatically-sets-insane-datetime-x-axis-range
The code:
The result
Summary: The simplest possible scatter plot of a time series on a single date chooses nonsensically huge x bounds, making the plot useless for visualization by default.
anntzer commentedon Aug 6, 2019
AFAICT this (both examples) has been fixed by #13642. Feel free to reopen if something is missing.