Project

General

Profile

Revision 843:0cd675f4b244

ID0cd675f4b244
Parent 842:dc2e941442e0
Child 844:916e817cf769

Added by Maarten Sneep almost 2 years ago

Add translation of parameter names to histoplot.

View differences:

src/pycama/cama_plot_time.py
158 158
        ax.xaxis.set_major_locator(date_loc)
159 159
        fig.autofmt_xdate()
160 160
    else:
161
        translation = {'stddev':'standard_deviation',
162
                       'iqr':'inter_quartile_range'}
161 163
        ylabel = []
162 164
        yunits = set()
163 165
        for var_name in data['variables']:
164 166
            variable = data[var_name]
165 167
            time_ax = time_transform(variable['time'])
166 168
            if parameters is not None:
167
                actions = parameters
169
                actions = [translation.get(p, p) for p in parameters]
168 170
            else:
169 171
                actions = ['mean', 'median', 'mode', 'inter_quartile_range', 'standard_deviation', 'q01', 'q05', 'q10', 'q25', 'q75', 'q90', 'q95', 'q99']
170 172
                if not disable_min_max:

Also available in: Unified diff