File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,11 +39,11 @@ def _is_in_legend(obj):
39
39
40
40
def _patch_legend (obj , draw_options , legend_type ):
41
41
""" Decorator for handling legend of mpl.Patch """
42
- legend = "\n "
42
+ legend = ""
43
43
if _is_in_legend (obj ):
44
44
# Unfortunately, patch legend entries need \addlegendimage in Pgfplots.
45
45
do = ", " .join ([legend_type ] + draw_options ) if draw_options else ""
46
- legend = "\\ addlegendimage{{{}}}\n \\ addlegendentry{{{}}}\n \n " .format (
46
+ legend + = "\\ addlegendimage{{{}}}\n \\ addlegendentry{{{}}}\n \n " .format (
47
47
do , obj .get_label ()
48
48
)
49
49
@@ -85,7 +85,7 @@ def draw_patchcollection(data, obj):
85
85
content .append (cont )
86
86
87
87
legend_type = "area legend" if is_area else "line legend"
88
- legend = _patch_legend (obj , draw_options , legend_type )
88
+ legend = _patch_legend (obj , draw_options , legend_type ) or " \n "
89
89
content .append (legend )
90
90
91
91
return data , content
You can’t perform that action at this time.
0 commit comments