easyclimate.plot.significance_plot

Mapping areas of significance

Functions

draw_significant_area_contourf(...)

Draw significant area by matplotlib.axes.Axes.contourf.

get_significance_point(→ pandas.DataFrame)

Obtain longitude and latitude array values that meet the conditions within the threshold from a two-dimensional array of p-values

draw_significant_area_scatter(significant_points_dataframe)

Draw significant area by matplotlib.axes.Axes.scatter.

Module Contents

easyclimate.plot.significance_plot.draw_significant_area_contourf(p_value: xarray.DataArray, thresh: float = 0.05, lon_dim: str = 'lon', lat_dim: str = 'lat', ax: matplotlib.axes.Axes = None, hatches: str = '...', hatch_colors: str = 'k', reverse_level_plot: bool = False, **kwargs) matplotlib.contour.QuadContourSet

Draw significant area by matplotlib.axes.Axes.contourf.

Parameters

p_value: xarray.DataArray.

The p value data.

thresh: float.

The threshold value.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

axmatplotlib.axes.Axes, optional.

Axes on which to plot. By default, use the current axes. Mutually exclusive with size and figsize.

hatches: list[str], default:

A list of cross hatch patterns to use on the filled areas. If None, no hatching will be added to the contour. Hatching is supported in the PostScript, PDF, SVG and Agg backends only.

hatch_colors: str, default: k.

The colors of the hatches.

Warning

The parameter hatch_colors is not support to changed now.

reverse_level_plot: bool, default: False.

Whether to reverse the drawing area.

**kwargs, optional:

Additional keyword arguments to xarray.plot.contourf.

Returns

matplotlib.contour.QuadContourSet.

easyclimate.plot.significance_plot.get_significance_point(p_value: xarray.DataArray, thresh: float = 0.05, lon_dim: str = 'lon', lat_dim: str = 'lat') pandas.DataFrame

Obtain longitude and latitude array values that meet the conditions within the threshold from a two-dimensional array of p-values

Parameters

p_value: xarray.DataArray.

The p value data.

thresh: float.

The threshold value.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

Returns

pandas.DataFrame.

easyclimate.plot.significance_plot.draw_significant_area_scatter(significant_points_dataframe: pandas.DataFrame, lon_dim: str = 'lon', lat_dim: str = 'lat', ax: matplotlib.axes.Axes = None, **kwargs)

Draw significant area by matplotlib.axes.Axes.scatter.

Parameters

significant_points_dataframe: pandas.DataFrame.

The data contains the significant points, which is obtained by the easyclimate.plot.get_significance_point.

lon_dim: str, default: lon.

Longitude coordinate dimension name. By default extracting is applied over the lon dimension.

lat_dim: str, default: lat.

Latitude coordinate dimension name. By default extracting is applied over the lat dimension.

axmatplotlib.axes.Axes, optional

Axes on which to plot. By default, use the current axes. Mutually exclusive with size and figsize.

**kwargs, optional:

Additional keyword arguments to matplotlib.axes.Axes.scatter.

Attention

You must specify kwargs = {‘transform’: ccrs.PlateCarree()} (import cartopy.crs as ccrs) in the cartopy GeoAxes or GeoAxesSubplot, otherwise projection errors may occur.