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
[Bug]: EPS export shows hidden tick labels when using tex for text rendering #21466
Comments
Looks like the same fix as in #10166 applies, i.e. diff --git i/lib/matplotlib/backends/backend_ps.py w/lib/matplotlib/backends/backend_ps.py
index c44f89c638..35c61b08f2 100644
--- i/lib/matplotlib/backends/backend_ps.py
+++ w/lib/matplotlib/backends/backend_ps.py
@@ -593,6 +593,9 @@ translate
@_log_if_debug_on
def draw_tex(self, gc, x, y, s, prop, angle, *, mtext=None):
# docstring inherited
+ if self._is_transparent(gc.get_rgb()):
+ return # Special handling for fully transparent.
+
if not hasattr(self, "psfrag"):
self._logwarn_once(
"The PS backend determines usetex status solely based on " seems to fix the problem? Probably the test_transparency intrroduced in #10166 could be parametrized to also test the usetex=True case. |
I looked at #10166 yesterday and also had the hunch that your proposed check is missing in the I have the dev environment set up now and can confirm that I can further confirm that my original problem is solved as well by the patch. So overall, your patch fixes the problem and a modified version of Will you prepare a PR for this? |
Usually when @anntzer adds that label, it's because he hasn't the time to do the full PR with tests/docs/etc. So feel free to open one yourself. |
OK, I went ahead and created a PR. |
Closed by #21470 |
Bug summary
When setting
text.usetex: True
, the EPS export produces spurious axis labels which are not visible in the PDF export.This seems somewhat similar to #10163.
Code for reproduction
Actual outcome
Expected outcome
Operating system
Arch
Matplotlib Version
3.4.3
Matplotlib Backend
Qt5Agg
Python version
3.9.7
Jupyter version
No response
Other libraries
texlive-core 2021.58710-2
texlive-bin 2021.58686-3
Installation
Linux package manager (Debian/Fedora/etc.)
Conda channel
No response
The text was updated successfully, but these errors were encountered: