esda.LocalCrossPlot

class esda.LocalCrossPlot(connectivity=None, permuations=999, star=False, n_jobs=-1, seed=None, island_weight=0, inference=None, a=2)[source]

Combine local statistics into a G-I-LOSH cross plot.

The local G-I-LOSH cross plot is a joint diagnostic that places standardized Getis-Ord \(G_i\) values on the x-axis and standardized Local Moran statistics on the y-axis while scaling symbol sizes by local spatial heteroscedasticity (LOSH), proposed by Westerholt [2026]. This provides a compact view of local clustering, local association, and local variance structure in a single graphic.

For details refer to Westerholt [2026].

Parameters:
connectivity : W | Graph, optional

Spatial weights object aligned with the observed values.

permuations : int, default=999

Number of random permutations used when fitting Moran_Local and G_Local.

star : bool, default=False

Whether to include the focal observation in the Getis-Ord local statistic.

n_jobs : int, default=-1

Number of parallel workers for permutation-based inference in the local Moran and local Getis-Ord statistics.

seed : int, optional

Random seed forwarded to permutation-based local statistics.

island_weight : float, default=0

Weight assigned to the synthetic neighbor used for islands in the local Moran and local Getis-Ord calculations.

inference : str, optional

Inference method for LOSH. See LOSH for supported options.

a : int or float, default=2

Residual exponent passed to esda.losh.LOSH.fit(). The default corresponds to a variance-based LOSH measure.

connectivity[source]

Spatial weights object used to fit the component estimators.

Type:

W | Graph or None

permutations[source]

Number of permutations used for local Moran and local Getis-Ord inference.

Type:

int

losh_[source]

Fitted LOSH estimator.

Type:

LOSH

moran_local_[source]

Fitted local Moran estimator.

Type:

Moran_Local

g_local_[source]

Fitted local Getis-Ord estimator.

Type:

G_Local

Methods

fit(y)

Fit the component local statistics used in the plot.

from_estimators(g_local, moran_local, losh)

Construct a plotter from pre-fitted component estimators.

plot([crit_value, losh_scaling_factor, ...])

Draw the local cross plot.

fit(y)[source]

Fit the component local statistics used in the plot.

Parameters:
y : array_like

One-dimensional array of observed values aligned with connectivity.

Return type:

LocalCrossPlot

Notes

Fitting computes and stores:

  • LOSH for local spatial heteroscedasticity,

  • Moran_Local for local spatial association,

  • G_Local for local concentration.

classmethod from_estimators(g_local, moran_local, losh)[source]

Construct a plotter from pre-fitted component estimators.

Parameters:
g_local : G_Local

Fitted local Getis-Ord estimator.

moran_local : Moran_Local

Fitted local Moran estimator.

losh : LOSH

Fitted LOSH estimator.

Returns:

Plotter populated with the provided estimators.

Return type:

LocalCrossPlot

Notes

This constructor is useful when the component estimators have already been fit elsewhere or when custom settings were used for each statistic independently.

plot(crit_value=0.05, losh_scaling_factor=10, linewidth=0.5, ax=None, legend=False)[source]

Draw the local cross plot.

Parameters:
crit_value : float, default=0.05

The critical value for significance.

losh_scaling_factor : float, default=10

Multiplicative factor applied to exp(losh_.Hi) when converting LOSH values into marker areas.

linewidth : float, default=0.5

Line width for marker outlines.

ax : matplotlib.axes.Axes, optional

Axes on which to draw the plot. If omitted, a new figure and axes are created.

Returns:

Axes containing the plot.

Return type:

matplotlib.axes.Axes

Notes

The plot uses the following encodings:

  • x-axis: standardized local Getis-Ord \(G_i^*\),

  • y-axis: permutation-standardized Local Moran statistic,

  • marker size: exp(LOSH),

  • marker color: significance/sign combinations of local Getis-Ord and Local Moran results.