Skip to content

Commit

Permalink
BUG: fix legend in andrew_figures GH3278
Browse files Browse the repository at this point in the history
  • Loading branch information
y-p committed Apr 8, 2013
1 parent 0328706 commit 25ff267
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pandas/tools/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,10 @@ def random_color(column):
if com.pprint_thing(class_col[i]) not in used_legends:
label = com.pprint_thing(class_col[i])
used_legends.add(label)
ax.plot(x, y, color=random_color(class_col[i]), label=label)
ax.plot(x, y, color=random_color(class_col[i]), label=label)
else:
ax.plot(x, y, color=random_color(class_col[i]))

ax.legend(loc='upper right')
ax.grid()
return ax
Expand Down

0 comments on commit 25ff267

Please sign in to comment.