Skip to content

Commit ea958f6

Browse files
committed
bug fix for plotting altvstime and proper y axis labels
1 parent 6d0ce5f commit ea958f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

movinglines/gui.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def gui_plotalttime(self,surf_alt=True,no_extra_axes=False,multi=False):
328328
from matplotlib.figure import Figure
329329
import tkinter as tk
330330
root = tk.Toplevel()
331+
root.geometry('1000x550')
331332
root.wm_title('Alt vs. Time: {}'.format(self.line.ex.name))
332333
fig = Figure()
333334
canvas = FigureCanvasTkAgg(fig, master=root)
@@ -370,7 +371,7 @@ def gui_plotalttime(self,surf_alt=True,no_extra_axes=False,multi=False):
370371
nm = self.line.ex.name
371372
surf_el_label_multi = ''
372373
ax1.set_xlabel('Flight duration [Hours]')
373-
time = self.line.ex.cumleg
374+
time = self.line.ex.cumlegt
374375
if surf_alt:
375376
try:
376377
try:
@@ -512,6 +513,7 @@ def gui_plotaltlat(self):
512513
ax3.set_yticks(ax1.get_yticks())
513514
alt_labels = ['%2.2f'%(a*3.28084/1000.0) for a in ax1.get_yticks()]
514515
ax3.set_yticklabels(alt_labels)
516+
ax3.set_ylim(ax1.get_ylim())
515517
ax1.grid()
516518
ax1.legend(frameon=True,loc='center left', bbox_to_anchor=(1.05, 0.75))
517519
if self.noplt:

0 commit comments

Comments
 (0)