-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Hatch line width ignored with pgf backend #15491
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
Starting point for fix is likely Note: |
Calling |
Looks like this is fixed by diff --git i/lib/matplotlib/backends/backend_pgf.py w/lib/matplotlib/backends/backend_pgf.py
index d68c743b7..38589ad65 100644
--- i/lib/matplotlib/backends/backend_pgf.py
+++ w/lib/matplotlib/backends/backend_pgf.py
@@ -487,6 +487,10 @@ class RendererPgf(RendererBase):
r"{\pgfqpoint{0in}{0in}}{\pgfqpoint{1in}{1in}}")
writeln(self.fh, r"\pgfusepath{clip}")
scale = mpl.transforms.Affine2D().scale(self.dpi)
+ lw = (mpl.rcParams["hatch.linewidth"]
+ * mpl_pt_to_in * latex_in_to_pt)
+ writeln(self.fh, r"\pgfsetlinewidth{%fpt}" % lw)
self._print_pgf_path(None, gc.get_hatch_path(), scale)
self._pgf_path_draw(stroke=True)
writeln(self.fh, r"\end{pgfscope}") Feel free to pick up the patch :) |
Has this issue been fixed in some later PR ? If yes we should close this |
Likely not, otherwise the PR would be linked here. Have you any reason to believe this has been fixed? |
The change needed seems to be a few lines , too low for a dedicated PR . If needed I can make a PR and close this issue. |
Developer resources are limited. Therefore also seemingly simple fixes may sometimes lie around or fall through the cracks. You're are very welcome to provide a PR. Please provide a test if possible as well. |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
There is an open PR for this. |
Just adding enthusiastic support behind this issue being resolved. It's continuing to cause problems. |
Bug report
Bug summary
The hatch line width does not take effect when saving figure with the
pgf
backend. It is always drawn with a width of 1.Code for reproduction
Actual outcome
Expected outcome
Matplotlib version
Matplotlib installed via
pip
.The text was updated successfully, but these errors were encountered: