Skip to content

Problem with scatter size when set xlim/ylim #16548

Closed
@GYHHAHA

Description

@GYHHAHA
fig = plt.figure(figsize=(10,10))
gs = gridspec.GridSpec(1,1) 
ax0 = plt.subplot(gs[0])
ax0.scatter([0],[1],s=20000)
ax0.scatter([0],[3],s=20000)
ax0.set_xlim(-2,2)
ax0.set_ylim(-5,5)

This result of the above code shows two intersecting circles.
bug1
But if I cancel the set_xlim/set_ylim step, these two circles are separated.

fig = plt.figure(figsize=(10,10))
gs = gridspec.GridSpec(1,1) 
ax0 = plt.subplot(gs[0])
ax0.scatter([0],[1],s=20000)
ax0.scatter([0],[3],s=20000)

bug2
So how to find a more explicit way to decide the size of scatters?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions