MCPcopy Create free account
hub / github.com/NatLabRockies/windtools / plot_timeheight

Function plot_timeheight

windtools/plotting.py:128–389  ·  view source on GitHub ↗

Plot time-height contours for different datasets and fields Usage ===== datasets : pandas.DataFrame or dict Dataset(s). If more than one set, datasets should be a dictionary with entries : dataset fields : str, list, 'all' (or None) Fieldn

(datasets,
                    fields=None,
                    fig=None,ax=None,
                    colorschemes={},
                    fieldlimits=None,
                    heightlimits=None,
                    timelimits=None,
                    fieldlabels={},
                    labelsubplots=False,
                    showcolorbars=True,
                    fieldorder='C',
                    ncols=1,
                    subfigsize=(12,4),
                    plot_local_time=False,
                    local_time_offset=0,
                    datasetkwargs={},
                    **kwargs
                    )

Source from the content-addressed store, hash-verified

126debug = False
127
128def plot_timeheight(datasets,
129 fields=None,
130 fig=None,ax=None,
131 colorschemes={},
132 fieldlimits=None,
133 heightlimits=None,
134 timelimits=None,
135 fieldlabels={},
136 labelsubplots=False,
137 showcolorbars=True,
138 fieldorder='C',
139 ncols=1,
140 subfigsize=(12,4),
141 plot_local_time=False,
142 local_time_offset=0,
143 datasetkwargs={},
144 **kwargs
145 ):
146 """
147 Plot time-height contours for different datasets and fields
148
149 Usage
150 =====
151 datasets : pandas.DataFrame or dict
152 Dataset(s). If more than one set, datasets should
153 be a dictionary with entries <dataset_name>: dataset
154 fields : str, list, 'all' (or None)
155 Fieldname(s) corresponding to particular column(s) of
156 the datasets. fields can be None if input are MultiIndex Series.
157 'all' means all fields will be plotted (in this case all
158 datasets should have the same fields)
159 fig : figure handle
160 Custom figure handle. Should be specified together with ax
161 ax : axes handle, or list or numpy ndarray with axes handles
162 Customand axes handle(s).
163 Size of ax should equal ndatasets*nfields
164 colorschemes : str or dict
165 Name of colorschemes. If only one field is plotted, colorschemes
166 can be a string. Otherwise, it should be a dictionary with
167 entries <fieldname>: name_of_colorschemes
168 Missing colorschemess are set to 'viridis'
169 fieldlimits : list or tuple, or dict
170 Value range for the various fields. If only one field is
171 plotted, fieldlimits can be a list or tuple. Otherwise, it
172 should be a dictionary with entries <fieldname>: fieldlimit.
173 Missing fieldlimits are set automatically
174 heightlimits : list or tuple
175 Height axis limits
176 timelimits : list or tuple
177 Time axis limits
178 fieldlabels : str or dict
179 Custom field labels. If only one field is plotted, fieldlabels
180 can be a string. Otherwise it should be a dictionary with
181 entries <fieldname>: fieldlabel
182 labelsubplots : bool, dict, string, or list-like
183 Label subplots as (a), (b), (c), ... If set to True, then labels
184 will be created inside of axes with default options (see the
185 `addLabels` function). If a dictionary is provided, then this is

Callers

nothing calls this directly

Calls 13

PlottingInputClass · 0.85
_get_dim_valuesFunction · 0.85
_get_staggered_gridFunction · 0.85
_get_pivot_tableFunction · 0.85
_get_pivoted_fieldFunction · 0.85
_format_time_axisFunction · 0.85
_align_labelsFunction · 0.85
addLabelsFunction · 0.85
set_titleMethod · 0.80

Tested by

no test coverage detected