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
[Bug]: Incorrect offsets and scaling of EllipseCollection #30866
The change comes from #29958, but I would not say it is a regression as such. Autoscaling is now automatic when you add a collection, as implied by the default value of the autolim parameter. To preserve the old behaviour, you can do
ax.add_collection(ec, autolim=False)
If you call ax.autoscale_view() after adding the collection then you get the same behaviour in v3.10.8 and in main.
The fact that the automatically determined limits seem to be wrong in this case probably should be investigated.
The fact that the automatically determined limits seem to be wrong in this case probably should be investigated.
In fact, they are correct: Bbox(x0=0.0, y0=0.0, x1=0.0, y1=1.0). Note that data limits are calculated based on the offsets only.
It's just that the data is chosen maximally confusing: There are 4 ellipses, two at (0, 0), two at (0, 1), which explains the data limits. Widths and heights are permutated between 0 and 1, so that only the 4th ellipse has non-zero width and height and is thus visible. 🤪 @williamlus please take a little more care when setting up an example that you don't use data leading to such degenerate cases.
@rcomer Yes, setting autolim=False can preserve the old behaviour. However, I found a new issue with autoscaling. After calling ax.autoscale_view(), the scaling is incorrect. Is this behavior intended or not? @timhoffm
This is correct. autolim=False means the artist is not included in the limits calculation. Since no limit-setting data is contained in the Axes autoscale_view() falls back to a small margin around (0, 0).
Activity
rcomer commentedon Dec 16, 2025
The change comes from #29958, but I would not say it is a regression as such. Autoscaling is now automatic when you add a collection, as implied by the default value of the autolim parameter. To preserve the old behaviour, you can do
If you call
ax.autoscale_view()after adding the collection then you get the same behaviour in v3.10.8 and inmain.The fact that the automatically determined limits seem to be wrong in this case probably should be investigated.
timhoffm commentedon Dec 16, 2025
Indeed automatic scaling is an intended change.
In fact, they are correct:
Bbox(x0=0.0, y0=0.0, x1=0.0, y1=1.0). Note that data limits are calculated based on the offsets only.It's just that the data is chosen maximally confusing: There are 4 ellipses, two at (0, 0), two at (0, 1), which explains the data limits. Widths and heights are permutated between 0 and 1, so that only the 4th ellipse has non-zero width and height and is thus visible. 🤪 @williamlus please take a little more care when setting up an example that you don't use data leading to such degenerate cases.
williamlus commentedon Dec 17, 2025
@rcomer Yes, setting
autolim=Falsecan preserve the old behaviour. However, I found a new issue with autoscaling. After callingax.autoscale_view(), the scaling is incorrect. Is this behavior intended or not? @timhoffmActual: With
ax.autoscale_view()Expected: Without
ax.autoscale_view()timhoffm commentedon Dec 17, 2025
This is correct.
autolim=Falsemeans the artist is not included in the limits calculation. Since no limit-setting data is contained in the Axesautoscale_view()falls back to a small margin around (0, 0).