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 66da89d commit 8a38582Copy full SHA for 8a38582
matplotlib2tikz/legend.py
@@ -202,8 +202,12 @@ def draw_legend(data, obj):
202
# Set color of lines in legend
203
for handle in obj.legendHandles:
204
try:
205
- data, legend_color, _ = mycol.mpl_color2xcolor(data,
206
- handle.get_color())
+ try:
+ data, legend_color, _ = mycol.mpl_color2xcolor(
207
+ data, handle.get_color())
208
+ except ValueError:
209
210
+ data, numpy.squeeze(numpy.array(handle.get_color())))
211
data['legend colors'].append('\\addlegendimage{no markers, %s}\n'
212
% legend_color)
213
except AttributeError:
0 commit comments