سؤال

I'm experiencing an issue for thick linewidths, as described here: https://github.com/matplotlib/matplotlib/issues/2542 I think the issue first appeared after I updated to MPL 1.3.

A minimum working example is:

import matplotlib.pylab as plt
plt.rcParams.update({"axes.linewidth": 20.0 })
plt.plot(range(5))
plt.show()

Basically, for thick lines, white squares appear in the corners. On Github, a fix has been recommended: "use projecting caps for axes spine". However, I can't see how to execute this command in the above code to fix the issue. Is this possible please?

I also note on github that a pull request was issued. What exactly does this mean for end-users of matplotlib - can we download a fix or do we have to wait for the next release of the MPB package?

هل كانت مفيدة؟

المحلول

On the topic of getting the fix from the git repository, you will want to use the command git cherry-pick. With it you can pull in the specific changes from that pull request. See: https://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top