-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ColorbarBase draws edges in slightly wrong positions. #4584
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
Comments
I can reproduce this on master with QT4/5, GTK(3)Agg and WXAgg but not with GTK(3)Cairo, OSX and WX backends so It looks like something specific to Agg |
Might be related to snapping? It might also be some pathological float -> int -> float conversion issues which would mean the line is in the right place and the error is in the colored patches. You might get some mileage out of http://matplotlib.org/examples/pylab_examples/broken_barh.html |
Having played with it more I'm fairly sure the lines are correct and the
|
This sounds familiar. It is sort of the snapping problem, but a bit more I guess it would be nice if we could define the strokes for the polygons in On Tue, Jul 7, 2015 at 9:16 AM, Roger Labbe [email protected]
|
Reconfirming on TkAgg, MPL 1.5.3, Windows 8.1, Python 2.7.12 |
Can you check this with 2.0.0rc2? I also now strongly suspect that this is related to the stamping / snapping of the ticks. |
I believe this was solved by #16090. When I run the examples above it looks good to me with no pixel bleeding on master. |
The code below uses ColorbarBase to print a stacked bar chart of a list of numbers. I use
drawedges=True
to get vertical lines to separate the colors with a black line. The lines are often, not always, slightly misaligned compared to the colors and the tick marks, never more than a few pixels. As I drag the matplotlib window larger and slower you can see these edge lines sometimes rendering correctly (right where the colors change) or just a few pixels off. I think the error is always to the right.I've attached an example image. If you click the image to see if full scale you'll see a several pixel error at 0.3, and perhaps a 1 pixel error at 0.4. If I drag the window to a different size I can make these errors larger or smaller.
Environment:
Windows 7
Anaconda Python 3.4, 64 bit installation.
matplotlib 1.4.3
Qt graphics back end
The text was updated successfully, but these errors were encountered: