[change] fix legend locations to prevent them from bouncing on zoom

This commit is contained in:
2017-08-31 15:41:59 +02:00
parent 8e59845558
commit 9a61a7f27d
5 changed files with 18 additions and 18 deletions

View File

@@ -272,7 +272,7 @@ class map_projection(QtGui.QWidget):
for index, name in enumerate(self.station_names):
self.annotations.append(self.main_ax.annotate(' %s' % name, xy=(self.x[index], self.y[index]),
fontsize='x-small', color='white', zorder=12))
self.legend = self.main_ax.legend()
self.legend = self.main_ax.legend(loc=1)
def add_cbar(self, label):
cbar = self.main_ax.figure.colorbar(self.sc_picked, fraction=0.025)

View File

@@ -1245,7 +1245,7 @@ class PickDlg(QDialog):
self.get_arrivals(True)
ax = self.phaseplot.ax
self.arrivals.plot(ax=ax, show=False)
ax.legend()
ax.legend(loc=1)
self.phaseplot.new = False
self.phaseplot.draw()
self.phaseplot.show()
@@ -2553,7 +2553,7 @@ class TuneAutopicker(QWidget):
[y_bot, y_bot], linewidth=2, color='teal')
ax.plot([pick - 0.5, pick + 0.5],
[y_top, y_top], linewidth=2, color='teal')
ax.legend()
ax.legend(loc=1)
def plot_manual_Spick_to_ax(self, ax, pick):
y_top = 0.9 * ax.get_ylim()[1]
@@ -2564,7 +2564,7 @@ class TuneAutopicker(QWidget):
[y_bot, y_bot], linewidth=2, color='magenta')
ax.plot([pick - 0.5, pick + 0.5],
[y_top, y_top], linewidth=2, color='magenta')
ax.legend()
ax.legend(loc=1)
def fill_tabs(self, event=None, picked=False):
self.clear_all()