scatter_mesh_grid


This function creates a scatter mesh grid chart with filled contours and overlayed scatter points.

scatter_mesh_grid(**kwargs)

Input variables

Name Description Type
plot_setup

Setup chart Dictionary with the following keys:

  • name: Path + name of the figure
  • width: Figure width in SI units
  • height: Figure height in SI units
  • marker_size: Size of the scatter markers
  • color_map: Color map for the mesh grid
  • y_axis_label: Label for the y axis
  • y_axis_size: Font size for the y axis label
  • x_axis_label: Label for the x axis
  • x_axis_size: Font size for the x axis label
  • labels_size: Font size for labels
  • labels_color: Color of the labels
  • axises_color: Color of the axes
  • on_grid: Whether to display grid lines
  • y_log: Whether to use a logarithmic scale for the y axis
  • x_log: Whether to use a logarithmic scale for the x axis
  • dots_per_inch: Resolution in dots per inch
  • extension: File extension for saving the figure
Dictionary
dataset

Dataset to plot

List or array

Output variables

Name Description Type
None The function displays the scatter mesh grid plot on the screen and saves it to the local folder of the .ipynb or .py None

Example 1

Use the scatter_mesh_grid function to create a scatter mesh grid plot with filled contours and scatter points overlayed.

import numpy as np

x = np.linspace(-5, 5, 100)
y = np.linspace(-5, 5, 100)
z = np.sin(np.sqrt(np.add.outer(x**2, y**2))) # Exemplo de função para o mesh grid

# Data
df = {
    'x': y,
    'y': x,
    'z': z,  
    'x_points': np.random.uniform(-5, 5, 100),
    'y_points': np.random.uniform(-5, 5, 100),
}

# Chart setup
chart_config = {
                'name': 'scatter_mesh_grid_plot',
                'width': 8,
                'height': 6,
                'extension': 'jpg',
                'dots_per_inch': 100,
                'marker_size': 10,
                'color_map': 'viridis',
                'y_axis_label': 'Axis Y',
                'y_axis_size': 12,
                'x_axis_label': 'Axis X',
                'x_axis_size': 12,
                'labels_size': 10,
                'labels_color': 'black',
                'axises_color': 'gray',
                'on_grid': True,
                'y_log': False,
                'x_log': False,
            }

# Call function
scatter_mesh_grid(dataset=df, plot_setup=chart_config)

Figure 1. Scatter Mesh Grid Plot with Filled Contours and Scatter Points.

Notebook example