diff --git a/schainpy/model/graphics/jroplot_base.py b/schainpy/model/graphics/jroplot_base.py index 638c789..612164d 100644 --- a/schainpy/model/graphics/jroplot_base.py +++ b/schainpy/model/graphics/jroplot_base.py @@ -33,22 +33,15 @@ from matplotlib.patches import Polygon from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.ticker import FuncFormatter, LinearLocator, MultipleLocator +from .plotting_codes import * + from schainpy.model.data.jrodata import PlotterData from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation, MPDecorator from schainpy.utils import log -jet_values = matplotlib.pyplot.get_cmap('jet', 100)(numpy.arange(100))[10:90] -blu_values = matplotlib.pyplot.get_cmap( - 'seismic_r', 20)(numpy.arange(20))[10:15] -ncmap = matplotlib.colors.LinearSegmentedColormap.from_list( - 'jro', numpy.vstack((blu_values, jet_values))) -matplotlib.pyplot.register_cmap(cmap=ncmap) - -rwg=matplotlib.colors.LinearSegmentedColormap.from_list('rwg',["r", "w", "g"], N=256) -matplotlib.pyplot.register_cmap(cmap=rwg) - -CMAPS = [plt.get_cmap(s) for s in ('jro', 'jet', 'viridis', - 'plasma', 'inferno', 'Greys', 'seismic', 'bwr', 'coolwarm','rwg')] +for name, cb_table in sophy_cb_tables: + ncmap = matplotlib.colors.ListedColormap(cb_table, name=name) + matplotlib.pyplot.register_cmap(cmap=ncmap) EARTH_RADIUS = 6.3710e3 diff --git a/schainpy/model/graphics/plotting_codes.py b/schainpy/model/graphics/plotting_codes.py index 3432f0c..6f7eafc 100644 --- a/schainpy/model/graphics/plotting_codes.py +++ b/schainpy/model/graphics/plotting_codes.py @@ -26,3 +26,53 @@ MOMENTS_CODE = 25 PARMS_CODE = 26 SPECFIT_CODE = 27 EWDRIFT_CODE = 28 + + +#COLOR TABLES + +reflectivity = [ + "#000000", # -30 + "#15191d", # -25 + "#2a323b", # -20 + "#3f4c59", # -15 + "#556576", # -10 + "#6a7f94", # -5 + "#7f99b2", # 0 + "#00ffff", # 5 + "#007fff", # 10 + "#0000ff", # 15 + "#00ff00", # 20 + "#00bf00", # 25 + "#007f00", # 30 + "#ffff00", # 35 + "#ffbf00", # 40 + "#ff7f00", # 45 + "#ff0000", # 50 + "#bf0000", # 55 + "#7f0000", # 60 + "#fe00fe", # 65 + "#8e59ff", # 70 + "#f0f0f0", # 75 + "#cccccc" # 80 + ] + +velocity = [ + "#003300", "#005500", "#007700", "#009900", "#00bb00", "#24ce24", "#6cd26c", "#b4d6b4", + "#d6b4b4", "#d26c6c", "#ce2424", "#bb0000", "#980000", "#760000", "#540000", "#330000", +] + +spc_width = [ + "#00ffff", "#00aaf2", "#0055e5", "#0000d8", + "#007f00", "#00aa00", "#00d400", "#00ff00", + "#ffff00", "#ffd400", "#ffaa00", "#ff7f00", + "#ff0000", "#d40000", "#aa0000", "#7f0000", + "#ff00ff", "#d400d4", "#aa00aa", "#7f007f", + "#9938ff", "#832ed8", "#6e25b2", "#591c8c", + "#aaaaaa", "#8e8e8e" +] + +sophy_cb_tables = [ + ('sophy_r', reflectivity), + ('sophy_v', velocity), + ('sophy_w', spc_width), +] \ No newline at end of file