File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -200,15 +200,14 @@ def draw_legend(data, obj):
200
200
)
201
201
202
202
# Set color of lines in legend
203
- data ['legend colors' ] = []
204
203
for handle in obj .legendHandles :
205
204
try :
206
205
data , legend_color , _ = mycol .mpl_color2xcolor (data ,
207
206
handle .get_color ())
208
207
data ['legend colors' ].append ('\\ addlegendimage{no markers, %s}\n '
209
208
% legend_color )
210
209
except AttributeError :
211
- data [ 'legend colors' ] = []
210
+ pass
212
211
213
212
# Write styles to data
214
213
if legend_style :
Original file line number Diff line number Diff line change @@ -124,6 +124,7 @@ def get_tikz_code(
124
124
data ['pgfplots libs' ] = set ()
125
125
data ['font size' ] = textsize
126
126
data ['custom colors' ] = {}
127
+ data ['legend colors' ] = []
127
128
data ['extra tikzpicture parameters' ] = extra_tikzpicture_parameters
128
129
# rectangle_legends is used to keep track of which rectangles have already
129
130
# had \addlegendimage added. There should be only one \addlegenimage per
You can’t perform that action at this time.
0 commit comments