Skip to content

Commit

Permalink
Fix lousy legend location
Browse files Browse the repository at this point in the history
  • Loading branch information
astrojuanlu committed Nov 3, 2018
1 parent 7d6c970 commit 1cc004a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/poliastro/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def plot_trajectory(self, trajectory, *, label=None, color=None):
lines.append(a)
if label:
a.set_label(label)
self.ax.legend(bbox_to_anchor=(1.05, 1), title="Names and epochs")
self.ax.legend(loc="upper left", bbox_to_anchor=(1.05, 1), title="Names and epochs")

return lines

Expand Down Expand Up @@ -206,7 +206,7 @@ def plot(self, orbit, label=None, color=None, method=mean_motion):
self.ax.figure.set_size_inches(size)
label = _generate_label(orbit, label)
l.set_label(label)
self.ax.legend(bbox_to_anchor=(1.05, 1), title="Names and epochs")
self.ax.legend(loc="upper left", bbox_to_anchor=(1.05, 1), title="Names and epochs")

self.ax.set_xlabel("$x$ (km)")
self.ax.set_ylabel("$y$ (km)")
Expand Down

0 comments on commit 1cc004a

Please sign in to comment.