-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
API: consistencyDifficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!topic: hatchtopic: rcparams
Milestone
Description
Bug summary
The only way (that I am aware of) to control the linewidth of hatches is through an rc parameter. But temporarily modifying the parameter with plt.rc_context
has not effect.
Code for reproduction
import matplotlib.pyplot as plt
plt.figure().subplots().bar([0, 1], [1, 2], hatch=["/", "."], fc="r")
with plt.rc_context({"hatch.linewidth": 5}):
plt.figure().subplots().bar([0, 1], [1, 2], hatch=["/", "."], fc="g")
plt.rc("hatch", linewidth=5)
plt.figure().subplots().bar([0, 1], [1, 2], hatch=["/", "."], fc="b")
Actual outcome
Expected outcome
That second image (the green bars) should have thick hatches.
FWIW I think hatches ought to have an actual API, but given that they don't, this limitation makes them really hard to work with.
Operating system
macos
Matplotlib Version
3.4.3
Matplotlib Backend
inline
SKPsanjeevi and ste-lor
Metadata
Metadata
Assignees
Labels
API: consistencyDifficulty: Easyhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesGood first issueOpen a pull request against these issues if there are no active ones!Open a pull request against these issues if there are no active ones!topic: hatchtopic: rcparams