Skip to content
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

Marker not round with markersize=3 #1307

Merged
merged 2 commits into from Sep 26, 2012
Merged

Conversation

mdboom
Copy link
Member

@mdboom mdboom commented Sep 25, 2012

On 1.2.0rc2 the following example produces one round marker, and one diamond marker:

import matplotlib.pyplot as plt
import numpy as np

plt.xlim([1, 2])
plt.ylim([1, 2])
plt.plot(1.1, 1.1, 'ro', markersize=2.5)
plt.plot(1.5, 1.5, 'bo', markersize=3)
plt.plot(1.9, 1.9, 'ko', markersize=3.5)

plt.show()

Git bisect will be useful here, but I'm not sure this was even working in 1.1.0.

@mdboom
Copy link
Member

mdboom commented Sep 25, 2012

This marker was set to perform pixel snapping about 3 px. That doesn't make much sense, given that it has bezier curves. I've fixed this in the attached commit.

@pelson
Copy link
Member Author

pelson commented Sep 25, 2012

Amazing response time! I'm happy enough to call this a bug fix and apply to 1.2.x. Would you agree?

@mdboom
Copy link
Member

mdboom commented Sep 25, 2012

That was my thinking. I can't imagine anyone is relying on the "broken" behavior of a circle looking like a diamond. ;)

@mdboom
Copy link
Member

mdboom commented Sep 25, 2012

Hold off on merging just a bit -- I think this may have affected some of the unit tests.

@mdboom
Copy link
Member

mdboom commented Sep 25, 2012

This approach actually makes the circle marker much "fuzzier" looking at sizes of 6 or so and up, so I've modified this to only turn off snapping for smaller sizes. This also makes all of the tests pass with no changes.

pelson added a commit that referenced this pull request Sep 26, 2012
Marker not round with markersize=3
@pelson pelson merged commit fed7557 into matplotlib:v1.2.x Sep 26, 2012
@pelson
Copy link
Member Author

pelson commented Sep 26, 2012

Thanks @mdboom .

@mdboom mdboom deleted the circle-marker-snap branch March 3, 2015 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants