@@ -22,7 +22,7 ncmap = matplotlib.colors.LinearSegmentedColormap.from_list( | |||
|
22 | 22 | 'jro', numpy.vstack((blu_values, jet_values))) |
|
23 | 23 | matplotlib.pyplot.register_cmap(cmap=ncmap) |
|
24 | 24 | |
|
25 |
CMAPS = [plt.get_cmap(s) for s in ('jro', 'jet', ' |
|
|
25 | CMAPS = [plt.get_cmap(s) for s in ('jro', 'jet', 'viridis', 'plasma', 'inferno', 'Greys', 'seismic', 'bwr', 'coolwarm')] | |
|
26 | 26 | |
|
27 | 27 | |
|
28 | 28 | def figpause(interval): |
@@ -45,8 +45,7 class PlotData(Operation, Process): | |||
|
45 | 45 | CODE = 'Figure' |
|
46 | 46 | colormap = 'jro' |
|
47 | 47 | bgcolor = 'white' |
|
48 | CONFLATE = False | |
|
49 | __MAXNUMX = 80 | |
|
48 | CONFLATE = False | |
|
50 | 49 | __missing = 1E30 |
|
51 | 50 | |
|
52 | 51 | __attrs__ = ['show', 'save', 'xmin', 'xmax', 'ymin', 'ymax', 'zmin', 'zmax', |
@@ -88,7 +87,7 class PlotData(Operation, Process): | |||
|
88 | 87 | self.ymin = kwargs.get('ymin', None) |
|
89 | 88 | self.ymax = kwargs.get('ymax', None) |
|
90 | 89 | self.xlabel = kwargs.get('xlabel', None) |
|
91 |
self. |
|
|
90 | self.decimation = kwargs.get('decimation', None) | |
|
92 | 91 | self.showSNR = kwargs.get('showSNR', False) |
|
93 | 92 | self.oneFigure = kwargs.get('oneFigure', True) |
|
94 | 93 | self.width = kwargs.get('width', None) |
@@ -328,7 +327,7 class PlotData(Operation, Process): | |||
|
328 | 327 | def decimate(self): |
|
329 | 328 | |
|
330 | 329 | # dx = int(len(self.x)/self.__MAXNUMX) + 1 |
|
331 |
dy = int(len(self.y) / self. |
|
|
330 | dy = int(len(self.y) / self.decimation) + 1 | |
|
332 | 331 | |
|
333 | 332 | # x = self.x[::dx] |
|
334 | 333 | x = self.x |
@@ -369,7 +368,7 class PlotData(Operation, Process): | |||
|
369 | 368 | ymin = self.ymin if self.ymin else numpy.nanmin(self.y) |
|
370 | 369 | ymax = self.ymax if self.ymax else numpy.nanmax(self.y) |
|
371 | 370 | |
|
372 | Y = numpy.array([10, 20, 50, 100, 200, 500, 1000, 2000]) | |
|
371 | Y = numpy.array([5, 10, 20, 50, 100, 200, 500, 1000, 2000]) | |
|
373 | 372 | i = 1 if numpy.where(ymax-ymin < Y)[0][0] < 0 else numpy.where(ymax-ymin < Y)[0][0] |
|
374 | 373 | ystep = Y[i] / 5 |
|
375 | 374 | |
@@ -712,8 +711,12 class PlotRTIData(PlotData): | |||
|
712 | 711 | self.z = self.data[self.CODE] |
|
713 | 712 | self.z = numpy.ma.masked_invalid(self.z) |
|
714 | 713 | |
|
715 | for n, ax in enumerate(self.axes): | |
|
714 | if self.decimation is None: | |
|
715 | x, y, z = self.fill_gaps(self.x, self.y, self.z) | |
|
716 | else: | |
|
716 | 717 | x, y, z = self.fill_gaps(*self.decimate()) |
|
718 | ||
|
719 | for n, ax in enumerate(self.axes): | |
|
717 | 720 | self.zmin = self.zmin if self.zmin else numpy.min(self.z) |
|
718 | 721 | self.zmax = self.zmax if self.zmax else numpy.max(self.z) |
|
719 | 722 | if ax.firsttime: |
@@ -916,9 +919,13 class PlotParamData(PlotRTIData): | |||
|
916 | 919 | |
|
917 | 920 | self.z = numpy.ma.masked_invalid(self.z) |
|
918 | 921 | |
|
919 | for n, ax in enumerate(self.axes): | |
|
920 | ||
|
922 | if self.decimation is None: | |
|
923 | x, y, z = self.fill_gaps(self.x, self.y, self.z) | |
|
924 | else: | |
|
921 | 925 | x, y, z = self.fill_gaps(*self.decimate()) |
|
926 | ||
|
927 | for n, ax in enumerate(self.axes): | |
|
928 | ||
|
922 | 929 | self.zmax = self.zmax if self.zmax is not None else numpy.max( |
|
923 | 930 | self.z[n]) |
|
924 | 931 | self.zmin = self.zmin if self.zmin is not None else numpy.min( |
General Comments 0
You need to be logged in to leave comments.
Login now