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

Setting annotation background covers arrow #4400

Closed
ndevenish opened this issue May 3, 2015 · 3 comments
Closed

Setting annotation background covers arrow #4400

ndevenish opened this issue May 3, 2015 · 3 comments
Milestone

Comments

@ndevenish
Copy link
Contributor

Setting a background on the annotation covers the arrow also. This didn't happen in 1.4.2. I've been using it to separate the text from any plot data points in cases where they overlap. Resolvable for now by redrawing an empty annotation with an arrow.

Pre 1.4.2:
screen shot 2015-05-03 at 15 06 58
Current:
screen shot 2015-05-03 at 15 03 21
Example code:

import matplotlib.pyplot as plt
import numpy
a = numpy.zeros(100)
a[::2] = 1
plt.figure(figsize=(5.9,4.4))
plt.plot(a)
shared_args = {"xytext":(-15,0), "va":'center', "ha":"right", "textcoords":'offset points', "arrowprops":{"arrowstyle": "->"}}
plt.annotate("Test", xy=(20,0.5), **shared_args)
plt.annotate("Test", xy=(20,0.4), backgroundcolor="w", **shared_args)
plt.show()

And the actual introducing commit, in the middle of what appears to be other restructuring 9d1c876

@tacaswell
Copy link
Member

Suspect that this is related to #4139 #4140 and #4178.

@efiring took a look at these issues and I have been avoiding looking into these issues as this code is more than a bit hairy.

@tacaswell tacaswell added this to the Color overhaul milestone May 3, 2015
@ndevenish
Copy link
Contributor Author

Hmm, yes it is very closely related to #4139 - the root cause is the same, but with an extra ordering issue in this one.

@tacaswell tacaswell modified the milestones: Color overhaul, next major release (2.0) Oct 26, 2015
@tacaswell
Copy link
Member

so

This appears to be fixed, have not done forensics to sort out by what.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants