Closed tariks closed 1 year ago
This should be fixed by d44b25b. Axis label keyword args are now run through the rc
setting validators, so that xlabelpad
and ylabelpad
unit-strings get converted to points. Example:
fig, ax = pplt.subplots()
ax.format(xlabel='xlabel', ylabel='ylabel')
ax.format(labelcolor='red', xlabelpad='1em', ylabelpad='3em')
Description
Bug on savefig when xlabelpad != ylabelpad (I think). Would complete all plotting code but throw: TypeError: can't multiply sequence by non-int of type 'float' when savefig is called. vscode traceback leads to this line:
self.label.set_position( (x, bottom - self.labelpad * self.figure.dpi / 72) )
I think self.labelpad is a list in this case, or similar, causing the error on multiplication. This resolved after changing subplots call from
xlabelpad='.5em', ylabelpad='.3em',
to
labelpad='.3em',
Steps to reproduce
a 1x2 figure with a panel, axes creation/format calls were:
Expected behavior: To render and save fig normally if separate label pads are given.
Actual behavior: Crash on savefig