CrossPlot

petrophys.visualization.CrossPlot

class CrossPlot(figsize=(10, 8))[source]

Bases: Plot

Crossplot creator for petrophysics analysis.

Parameters:

figsize (tuple) – Figure size

Methods

add_line

Add a line to the crossplot.

add_matrix_points

Add matrix mineral end points.

create

Create the crossplot.

save

Save the plot to file.

show

Display the plot.

create(
x_data,
y_data,
color_data=None,
x_label='X',
y_label='Y',
color_label='Color',
title='Crossplot',
x_log=False,
y_log=False,
xlim=None,
ylim=None,
cmap='viridis',
marker_size=5,
alpha=0.7,
)[source]

Create the crossplot.

Parameters:
  • x_data (np.ndarray) – X-axis data

  • y_data (np.ndarray) – Y-axis data

  • color_data (np.ndarray, optional) – Data for color coding

  • x_label (str) – X-axis label

  • y_label (str) – Y-axis label

  • color_label (str) – Colorbar label

  • title (str) – Plot title

  • x_log (bool) – Logarithmic X-axis

  • y_log (bool) – Logarithmic Y-axis

  • xlim (tuple, optional) – X-axis limits

  • ylim (tuple, optional) – Y-axis limits

  • cmap (str) – Colormap name

  • marker_size (float) – Marker size

  • alpha (float) – Marker transparency

Returns:

(Figure, Axes)

Return type:

tuple

add_line(x, y, color='red', linestyle='-', linewidth=1, label=None)[source]

Add a line to the crossplot.

Parameters:
Return type:

None

add_matrix_points(matrix_lines)[source]

Add matrix mineral end points.

Parameters:

matrix_lines (dict) – Dictionary with mineral names and (x, y) positions

Return type:

None

show()[source]

Display the plot.

Return type:

None

save(filename, dpi=150)[source]

Save the plot to file.

Parameters:
Return type:

None