nschloe / tikzplotlib

:bar_chart: Save matplotlib figures as TikZ/PGFplots for smooth integration into LaTeX.
MIT License
2.42k stars 218 forks source link

fix typo in _legend.py : obj.ncol should be obj.ncols #579

Open elicox0 opened 1 year ago

elicox0 commented 1 year ago

This fixes an AttributeError when a user calls plt.legend() and then saves a figure with tikzplotlib.save. Since obj in the relevant line is of type matplotlib.legend.Legend(), the attribute is ncols and not ncol (see https://matplotlib.org/stable/api/legend_api.html#matplotlib.legend.Legend).

FriedrichFroebel commented 1 year ago

This duplicates (at least) #574, #565 and #558 and just has not been merged yet, see https://github.com/nschloe/tikzplotlib/pull/574#issuecomment-1461865449 as well. This is no typo, but a change from matplotlib 3.6.0.

GillesC commented 9 months ago

Why is this not merged?

FriedrichFroebel commented 9 months ago

Because maintenance is more or less stalled at the moment.