Skip to content
Snippets Groups Projects
Commit 394e96e8 authored by Kien Le's avatar Kien Le
Browse files

Add showing number of GPS points plotted

parent 54abddb9
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !53. Comments created here will be created in the context of that merge request.
......@@ -2,6 +2,10 @@ import sys
from pathlib import Path
from typing import List
import numpy as np
from matplotlib import pyplot as plt
from sohstationviewer.controller.util import displayTrackingInfo
from sohstationviewer.model.gps_point import GPSPoint
from sohstationviewer.model.mseed.mseed import MSeed
......@@ -21,6 +25,7 @@ class GPSWidget(QtWidgets.QWidget):
self.fig = Figure(figsize=(6, 6), dpi=100)
self.canvas = Canvas(self.fig)
self.canvas.mpl_connect('pick_event', self.on_pick_event)
self.ax: Axes = self.fig.add_axes((0, 0, 1, 1))
self.ax.set_facecolor("dimgray")
......@@ -59,6 +64,8 @@ class GPSWidget(QtWidgets.QWidget):
self.canvas.draw()
self.repaint()
msg = f'Plotted {len(self.gps_points)} points.'
displayTrackingInfo(self.tracking_box, msg)
class GPSDialog(QtWidgets.QWidget):
......@@ -157,8 +164,8 @@ if __name__ == '__main__':
os.chdir('/Users/kle/PycharmProjects/sohstationviewer')
app = QtWidgets.QApplication(sys.argv)
# data_path = '/Users/kle/PycharmProjects/sohstationviewer/tests/test_data/Q330-sample'
data_path = '/Users/kle/Documents/SOHView data/Q330/Q330_5281.sdr'
data_path = '/Users/kle/PycharmProjects/sohstationviewer/tests/test_data/Q330-sample'
# data_path = '/Users/kle/Documents/SOHView data/Q330/Q330_5281.sdr'
data = MSeed(QtWidgets.QTextBrowser(), data_path)
wnd = GPSDialog()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment