-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
pgf backend. Y-labels in subplot are not alligned after baseline but bottom of letter #1321
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
It's not "yet" related to #1115. What I would like to do is to pass the position and alignment information to the backend and handle text layout there. At the moment, the positioning is fully determined by matplotlib and I do not see any difference using the PDF backend in your example. Using matplotlib's standard pdf output, I also see non-baseline aligned y-labels. This is not really a surprise, since matplotlib aligns text elements by the bounding box of the global coordinate system. The Y-Label is therefore aligned with its right edge, not with a baseline. Baseline alignment is not possible for rotated texts using this scheme. So the question is... why do you see baseline aligned y-labels on your system ^^ ? |
Oh, and the x-labels are not aligned to their base either. Their top line is aligned, which is the same for "test" and "testg". Also, in the usual case you don't really want baseline alignment. If your text (a formula maybe) exceeds the base or the top, you don't want it to overlap the ticks or the graph. I guess the only way to handle co-baseline-aligned labels like the ones in the example is to do implement it in gridspec. One has to iterate over all subplots, check the sizes of the text elements and determine a common baseline. |
Might be important to remember such a use-case for the re-design of matplotlibs layout technique #1109 |
I was sure that it worked with the pdf backend but cant seem to reproduce it now. Sorry for the noise. |
In the following example the baseline of the y labels are not aligned, rather it seems like the bottom of the g in one is aligned to the baseline of the other label. (The xlabels seems right) Using the pdf backend it appears correct. The issue does not seem to depend on the xelatex vs pdflatex and different fonts.
@pwuertz is this related to #1115 ?
The text was updated successfully, but these errors were encountered: