DEMutilities.postprocessing.representation. cnh_specific_representation

In order to be able to use this module import it like this:

import DEMutilities.postprocessing.representation.cnh_specific_representation
#or assign it to a shorter name
import DEMutilities.postprocessing.representation.cnh_specific_representation as cnh

CNH_Specific_RepresentationSet

class DEMutilities.postprocessing.representation.cnh_specific_representation.CNH_Specific_RepresentationSet(cycle_cmap=None, N_colors=7, cycle_markers=None)

Bases: DEMutilities.postprocessing.representation.academic_representation.AcademicRepresentationSet

Representation set for plotting data stored in hdf5 or compatible files in various ways.

Parameters:
  • cycle_map (string referring to a matplotlib.cm colormap (e.g. ‘jet’) or an actual matplotlib.color.Colormap object.) – (optional) color map that should be used as the default ‘cycler’ for determining the color of subsequent graphic elements (e.g. lines)
  • cycle_markers – List of markers to cycle between when plotting subsequent graphic elements, as understood e.g. by the matplotlib.pyplot.plot() function, e.g. [‘o’, ‘s’, ‘^’, ‘v’, ‘h’, ‘d’, ‘p’]
CNH_Specific_RepresentationSet(name, parent, **kwargs)
bars_power_row(ds, *args, **kwargs)
bars_power_se(rotor_raw, path_rotor_std=None, path_se=None, path_se_std=None, label1='rotor power (kW)', label2='(1 - separation efficiency) (%)', **kwargs)
categorical_heatmap(ds, cbar_kw={}, cbarlabel='', **kwargs)

Create a heatmap from a numpy array and two lists of labels.

Arguments:
param ds:A group from an hdf5 file object containing a 2-dimensional array
type ds:h5py.Group or any object with a similar interface.
row_labels : A list or array of length N with the labels
for the rows
col_labels : A list or array of length M with the labels
for the columns
Optional arguments:
ax : A matplotlib.axes.Axes instance to which the heatmap
is plotted. If not provided, use current axes or create a new one.
cbar_kw : A dictionary with arguments to
matplotlib.Figure.colorbar().

cbarlabel : The label for the colorbar

All other arguments are directly passed on to the imshow call.

close(**kwargs)

Close the current matplotlib.pyplot.figure object. Calling this between subsequent plots will make sure that new data is called in a new figure canvas.

comparitive_bars(ds, select_data=(), labels=[''], unit='', Nstorages=1, use_diff_colors=False, N_colors=10, use_general_labels=True, **kwargs)
cylinder_unwrap(ds, show_colorbar=True, show_colorbar_title=True, show_xlabel=True, show_ylabel=True, show_xaxis=True, show_yaxis=True, **kwargs)
heightmap(ds, dsx=None, dsy=None, smooth=0.0, swap_axes=False, **kwargs)

Make a 3D plot of a matrix of z values as a function of a one-dimensional x and y array. This is a 3D representation of a 2D heatmap.

Parameters:
  • ds (h5py.Group or any object with a similar interface.) – A group from an hdf5 file object containing a 2-dimensional array
  • dsx (h5py.Group or any object with a similar interface.) – (optional) A group from an hdf5 file with a 1-dimensional array for the x-axis. If not given, the entry axis_0 from ds will be searched.
  • dsy (h5py.Group or any object with a similar interface.) – (optional) A group from an hdf5 file with a 1-dimensional array for the y-axis. If not given, the entry axis_1 from ds will be searched.
  • swap_axes (bool) – (optional) If True, the major axis in data will be the y-axis in the surface plot. If False, the major axis in data will be the x-axis in the surface plot.
  • **kwargs – Key word arguments passed to matplotlib.pyplot.pcolormesh(). Additionally, a ‘smooth’ key word argument can be specified that specifies the normalized degree of Gaussian smoothing that should be applied to the matrix in ds.
polar(ds, **kwargs)
DEMutilities.postprocessing.representation.cnh_specific_representation.make_axlab(varname, unitname)