Thanks to visit codestin.com
Credit goes to github.com

Skip to content

pgf backend. Y-labels in subplot are not alligned after baseline but bottom of letter #1321

Closed
@jenshnielsen

Description

@jenshnielsen

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 ?

import matplotlib
matplotlib.use('pgf')
import matplotlib.pyplot as plt
import numpy as np

params = {
          'text.usetex': True,
          'pgf.texsystem': 'xelatex',
          }
plt.rcParams.update(params)

fig,ax = plt.subplots(2,2)

ax[0,0].set_ylabel('test',fontsize=30) #large font size to make it easier to see
ax[1,0].set_ylabel('testg',fontsize=30)
ax[1,0].set_xlabel('test',fontsize=30)
ax[1,1].set_xlabel('testg',fontsize=30)
fig.savefig('test.pdf')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions