casys.visualization.figure
Low level drawing classes.
Functions
|
This function performs the computation of the inverse axis ticks positions for a logarithmic scale, relatively to the original axis values. |
|
Check whether the given property is a valid Text property or not. |
Classes
|
- class casys.visualization.figure.FigureHandler(figure, projection=None)
Bases:
object
- Parameters:
figure (
Figure
)projection (
Projection
|str
|None
)
- COLORS = ['blue', 'red', 'green', 'magenta', 'darkorange', 'cyan', 'darkblue', 'darkred', 'darkcyan', 'darkgreen', 'gold', 'black', 'yellow']
- COLORS_CODE = {'#000000': 'black', '#00008B': 'darkblue', '#0000FF': 'blue', '#006400': 'darkgreen', '#008000': 'green', '#008B8B': 'darkcyan', '#00FFFF': 'cyan', '#8B0000': 'darkred', '#FF0000': 'red', '#FF00FF': 'magenta', '#FF8C00': 'darkorange', '#FFD700': 'gold', '#FFFF00': 'yellow'}
- COLORS_SL = {'b': 'blue', 'c': 'cyan', 'g': 'green', 'k': 'black', 'm': 'magenta', 'r': 'red', 'w': 'white', 'y': 'yellow'}
- add_2d_scatter(*, x, y, z, params, discretized, ax=None)
Add a 2D scatter plot.
- Parameters:
- Return type:
- add_3d_scatter(*, x, y, z, params, discretized, ax=None)
Add a 3D scatter plot.
- Parameters:
- Return type:
- add_carto_color_mesh(*, x, y, z, params, ax=None)
Add a pcolormesh on a cartopy map.
- Parameters:
- Return type:
- add_carto_scatter(*, x, y, z, params, discretized, ax=None)
Add a scatter plot on a cartopy map.
- Parameters:
- Return type:
- add_color_bar(*, params, mappable)
Add a color bar to the figure.
- Parameters:
params (
AxeParams
) – Color bar’s properties.mappable (
_ScalarMappable
) – Color mappable to use.
- add_color_box_3d(*, x, y, z, params, ax=None)
Add a pcolormesh on a plot.
- Parameters:
- Return type:
- add_color_mesh(*, x, y, z, params, ax=None)
Add a pcolormesh on a plot.
- Parameters:
- Return type:
- add_color_mesh_3d(*, x, y, z, params, ax=None)
Add a pcolormesh on a plot.
- Parameters:
- Return type:
- add_count_density_mesh(*, x, y, n_vbins, params, ax=None)
Compute and add count density/binning ? from a 2D data.
- add_editing(*, x, y, editing, params, ax=None)
Add an editing plot.
- Parameters:
x (
ndarray
) – x-axis data.y (
ndarray
) – y-axis data.editing (
EditingResults
) – Editing properties to add.params (
PlotParams
) – Plot’s properties.
- add_grid(*, params=None, ax=None)
- Parameters:
params (
GridParams
)
- add_hist_bar(data, params, data_box=None, color_limits=(None, None), mappable=None)
Add a histogram bar to the figure.
- add_multi_curves(*, x, y, bin_name, bin_values, params, width=None, ax=None)
Add multiples lines or bars to the provided axes.
- Parameters:
x (
ndarray
) – x-axis data.y (
ndarray
) – y-axis data.bin_name (
str
) – Label associated to the second binning dimensionbin_values (
ndarray
) – Values of the second binning dimensionsparams (
PlotParams
) – Elements properties.
- add_scatter(*, x, y, z, normalized, legend, params, ax=None)
Add a scatter plot.
- Parameters:
- Return type:
- Returns:
Plot’s ScalarMappable and optional regression coefficients.
- add_single_curve(*, x, y, legend, params, width=None, ax=None)
Add a plot as a line or bar to the provided axes.
- add_stat_bar(*, data, params)
Add a statistic bar to the figure.
- add_stat_graph(abscissa, mean, std, params)
Add a statistic graph to the figure.
- add_ticks_space(*, space, position)
Add ticks space at the given position.
- add_trisurf(*, x, y, z, params, discretized, ax=None)
Add a 3D trisurf plot.
- Parameters:
- Return type:
- add_watermark(params)
Add watermark.
- Parameters:
params (
WatermarkParams
) – the parameters of the watermark
- draw_stat_bar(params)
Draw the statistic bar added to the figure.
- Parameters:
params (
AxeParams
) – Statistic bar properties.
- get_ax(axtype)
Return the requested axes.
- new_color(color=None)
Return color if not used, a new one otherwise.
- reset_colors()
Reset list of used colors.
- set_axes_params(*, axt, params)
Set the provided axes parameters.
- set_bounds(*, extent, ax=None)
Set the graph boundaries.
- set_color_used(color)
Add provided color to the list of used colors.
- set_features(template, ax=None)
Set additional cto.features.
- Parameters:
template (
PlotTemplate
) – Plot template.
- set_legends(*, params, force_display=False)
Set the figure legends.
- casys.visualization.figure.compute_inverse_axis_ticks(values)
This function performs the computation of the inverse axis ticks positions for a logarithmic scale, relatively to the original axis values.