We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 450712b commit 6b2c2ecCopy full SHA for 6b2c2ec
src/tikzplotlib/_legend.py
@@ -78,8 +78,11 @@ def draw_legend(data, obj):
78
if alignment:
79
data["current axes"].axis_options.append(f"legend cell align={{{alignment}}}")
80
81
- if obj._ncol != 1:
82
- data["current axes"].axis_options.append(f"legend columns={obj._ncol}")
+ try:
+ if obj._ncol != 1:
83
+ data["current axes"].axis_options.append(f"legend columns={obj._ncol}")
84
+ except AttributeError:
85
+ warnings.warn("Unable to interrogate the number of columns in legend. Using 1 as default.")
86
87
# Write styles to data
88
if legend_style:
0 commit comments