'annotate' ignores path_effects argument. #2032

merged 1 commit into from May 21, 2013


None yet

3 participants


With current master, annotate ignores path_effects argument.

import matplotlib.pyplot as plt
from matplotlib.patheffects import withStroke
myeffect = withStroke(foreground="y", linewidth=3)
kwargs = dict(path_effects=[myeffect])

plt.annotate("test", (0.5, 0.5), path_effects=[myeffect])

text is drawn, but without path_effects.

@leejjoon leejjoon referenced this pull request in mdboom/matplotlib May 21, 2013
@mdboom mdboom Add xkcd() function to set up a number of parameters to create plots …
…that look like xkcd. Add an example, and a what's new. Expose path effects as an rcParam so that they can be set globally.
@mdboom mdboom Handle setting path_effects in the constructor using the setp infrast…
…ructure, so it doesn't have to be duplicated in each subclass. Modify a test to make sure this continues to work.
Matplotlib Developers member

Indeed, I had intended for everything to be handled in the base class, so therefore the path_effects kwarg should be removed and it should be handled by the calling setp instead. I've attached a fix, and modified a test so we test setting a path_effect directly in the constructor.

@pelson pelson merged commit cadcefc into matplotlib:master May 21, 2013

1 check passed

Details default The Travis CI build passed
@mdboom mdboom deleted the mdboom:fix-path-effect-construction branch Aug 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment