[bugfix] dataprocessing, xml
[update] save images as svg/jpg
This commit is contained in:
parent
9764e12b19
commit
b21b113edd
@ -196,7 +196,7 @@ class Metadata(object):
|
|||||||
for network in inventory.networks:
|
for network in inventory.networks:
|
||||||
for station in network.stations:
|
for station in network.stations:
|
||||||
station_name = station.code
|
station_name = station.code
|
||||||
network_name = network_name.code
|
network_name = network.code
|
||||||
if not station_name in self.stations_dict.keys():
|
if not station_name in self.stations_dict.keys():
|
||||||
st_id = '{}.{}'.format(network_name, station_name)
|
st_id = '{}.{}'.format(network_name, station_name)
|
||||||
self.stations_dict[st_id] = {'latitude': station[0].latitude,
|
self.stations_dict[st_id] = {'latitude': station[0].latitude,
|
||||||
|
@ -1117,10 +1117,10 @@ class PylotCanvas(FigureCanvas):
|
|||||||
def saveFigure(self):
|
def saveFigure(self):
|
||||||
if self.figure:
|
if self.figure:
|
||||||
fd = QtGui.QFileDialog()
|
fd = QtGui.QFileDialog()
|
||||||
fname, filter = fd.getSaveFileName(self.parent(), filter='Images (*.png)')
|
fname, filter = fd.getSaveFileName(self.parent(), filter='Images (*.png *.svg *.jpg)')
|
||||||
if not fname:
|
if not fname:
|
||||||
return
|
return
|
||||||
if not fname.endswith('.png'):
|
if not any([fname.endswith(item) for item in ['.png', '.svg', '.jpg']]):
|
||||||
fname += '.png'
|
fname += '.png'
|
||||||
self.figure.savefig(fname)
|
self.figure.savefig(fname)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user