tikzplotlib icon indicating copy to clipboard operation
tikzplotlib copied to clipboard

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

Open elicox0 opened this issue 2 years ago • 3 comments
trafficstars

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).

elicox0 avatar Mar 31 '23 01:03 elicox0

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.

FriedrichFroebel avatar Mar 31 '23 05:03 FriedrichFroebel

Why is this not merged?

GillesC avatar Jan 26 '24 08:01 GillesC

Because maintenance is more or less stalled at the moment.

FriedrichFroebel avatar Jan 26 '24 08:01 FriedrichFroebel