Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #503 from AntoniiaK/fix-legend-layout
Browse files Browse the repository at this point in the history
Fix legend layout, fix #482
  • Loading branch information
astrojuanlu committed Dec 1, 2018
2 parents 941d99e + d05df9a commit 9cc569e
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.015), 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.015), title="Names and epochs")

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

0 comments on commit 9cc569e

Please sign in to comment.