You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Saving as a pdf shifts the bounding box to the right for text with subscripts #2627
In the png, the vertical alignment of the bounding box is too low for the \theta in the top box, as I previously reported in Issue #2527, but otherwise it is fine. Here is Test.pdf:
In the pdf, the horizontal alignment of the bounding box for \theta_1 and \alpha_2 have been shifted to the right. In addition, the right side of the 0 in the lower right of the pdf has been cut off in the pdf, but it was not cut off in the png.
In case it matters, I generated these using Matplotlib 1.3.0 with the TkAgg backend.
The original PDF screenshot is no longer accessible. When I run the example, there is a slight shift, but that happens for all the text between the two versions. The bounding boxes seem right, but I don't know what the original problem was.
I tried to run the example in an old version of matplotlib version I had on my hard drive (1.5.dev1) to see if I could recreate the original issue, but pyplot failed to import. With matplotib 2.2.3, I can confirm that subtle differences exist between the png and pdf, but the bounding boxes seem reasonably centered in both. Either I am less picky 6.5 years later, or something got fixed between now and then. Thanks for looking into this.
Activity
efiring commentedon May 22, 2016
With master and classic style there are still subtle (but smaller) differences in positioning between pdf and png, but the 0 is not being cut off.
breedlun commentedon May 23, 2016
Ok, good to hear the problem has been reduced.
QuLogic commentedon Apr 22, 2020
The original PDF screenshot is no longer accessible. When I run the example, there is a slight shift, but that happens for all the text between the two versions. The bounding boxes seem right, but I don't know what the original problem was.
breedlun commentedon Apr 24, 2020
I tried to run the example in an old version of matplotlib version I had on my hard drive (1.5.dev1) to see if I could recreate the original issue, but pyplot failed to import. With matplotib 2.2.3, I can confirm that subtle differences exist between the png and pdf, but the bounding boxes seem reasonably centered in both. Either I am less picky 6.5 years later, or something got fixed between now and then. Thanks for looking into this.