@@ -233,8 +233,19 @@ def draw_pathcollection(data, obj):
233
233
return data , content
234
234
235
235
236
- def get_draw_options (data , obj , ec , fc , style , width ):
236
+ def get_draw_options (data , obj , ec , fc , ls , lw ):
237
237
"""Get the draw options for a given (patch) object.
238
+ Get the draw options for a given (patch) object.
239
+ Input:
240
+ data -
241
+ obj -
242
+ ec - edge color
243
+ fc - face color
244
+ ls - linestyle
245
+ lw - linewidth
246
+ Output:
247
+ draw_options - list, to be ",".join(draw_options) to produce the
248
+ draw options passed to PGF
238
249
"""
239
250
draw_options = []
240
251
@@ -265,15 +276,15 @@ def get_draw_options(data, obj, ec, fc, style, width):
265
276
if fc is not None and 0 < fc_rgba [3 ] != 1.0 :
266
277
draw_options .append (("fill opacity=" + ff ).format (fc_rgba [3 ]))
267
278
268
- if width is not None :
269
- w = mpl_linewidth2pgfp_linewidth (data , width )
270
- if w :
271
- draw_options .append (w )
279
+ if lw is not None :
280
+ lw_ = mpl_linewidth2pgfp_linewidth (data , lw )
281
+ if lw_ :
282
+ draw_options .append (lw_ )
272
283
273
- if style is not None :
274
- ls = mpl_linestyle2pgfplots_linestyle (style )
275
- if ls is not None and ls != "solid" :
276
- draw_options .append (ls )
284
+ if ls is not None :
285
+ ls_ = mpl_linestyle2pgfplots_linestyle (ls )
286
+ if ls_ is not None and ls_ != "solid" :
287
+ draw_options .append (ls_ )
277
288
278
289
return data , draw_options
279
290
0 commit comments