pytopomap.plot_3d

This example doesn’t do much, it just makes a simple plot

Functions

plot_topo_3D(→ plotly.graph_objs._figure.Figure)

Plot 3D topography with hillshading.

plot_imshow_3D(→ plotly.graph_objs._figure.Figure)

3D imshow data

plot_data_on_topo_3D(→ plotly.graph_objs._figure.Figure)

Plot 3D array data on topo.

Module Contents

pytopomap.plot_3d.plot_topo_3D(z: numpy.ndarray, x: numpy.ndarray, y: numpy.ndarray, ndv: int | float = -9999, vert_exag: float = 1, light_source: tuple[int, int] = None, add_walls: bool = True, add_floor: bool = True, saving_path: str = None, auto_open: bool = False) plotly.graph_objs._figure.Figure

Plot 3D topography with hillshading.

Parameters:
  • z (np.ndarray) – 2D array of elevation values.

  • x (np.ndarray) – 1D array of X coordinates.

  • y (np.ndarray) – 1D array of Y coordinates.

  • ndv (int or float, optional) – No-data value in the elevation array. The default is -9999.

  • vert_exag (float, optional) – Vertical exaggeration factor. The default is 1.

  • light_source (tuple[int], optional) – Light source direction for shading (azimuth, degrees from North and altitude, degrees from horizon). The default is None.

  • add_walls (bool, optional) – If True, add walls under the figure. The default is True

  • add_floor (bool, optional) – If True, add floor under the figure. The default is True

  • saving_path (str, optional) – Folder path to save the html file. If None file saved in source folder. The default is None.

  • auto_open (bool, optional) – If True, open the result. The default is False.

Return type:

None

pytopomap.plot_3d.plot_imshow_3D(x: numpy.ndarray, y: numpy.ndarray, data: numpy.ndarray, cmap: str = None, minval: int | float = None, maxval: int | float = None, minval_abs: float = None, vert_exag: float = 1.0, saving_path: str = None, auto_open: bool = False) plotly.graph_objs._figure.Figure

3D imshow data

jfdqsjf

Parameters:
  • x (np.ndarray) – 1D array of X coordinates.

  • y (np.ndarray) – 1D array of Y coordinates.

  • data (np.ndarray) – 2D array of data values.

  • cmap (str, optional) – Name of the colormap to use. If None, use “Hot” or “Rdbu. The default is None.

  • minval (int or float, optional) – Minimum value to display. The default is None.

  • maxval (int or float, optional) – Maximum value to display. The default is None.

  • minval_abs (float, optional) – If set, masks values with absolute magnitude below this threshold. The default is None.

  • vert_exag (float, optional) – Vertical exaggeration factor. The default is 1.

  • saving_path (str, optional) – Folder path to save the html file. If None file saved in source folder. The default is None.

  • auto_open (bool, optional) – If True, open the result. The default is False.

Returns:

_description_

Return type:

_type_

pytopomap.plot_3d.plot_data_on_topo_3D(x: numpy.ndarray, y: numpy.ndarray, z: numpy.ndarray, data: numpy.ndarray, ndv: int | float = -9999, vert_exag: float = 1, light_source: tuple[int, int] = None, cmap: str = None, minval: int | float = None, maxval: int | float = None, minval_abs: float = None, add_walls: bool = True, add_floor: bool = True, saving_path: str = None, auto_open: bool = False) plotly.graph_objs._figure.Figure

Plot 3D array data on topo.

Parameters:
  • x (np.ndarray) – 1D array of X coordinates.

  • y (np.ndarray) – 1D array of Y coordinates.

  • z (np.ndarray) – 2D array of elevation values.

  • data (np.ndarray) – 2D array of data values.

  • ndv (int or float, optional) – No-data value in the elevation array. The default is -9999.

  • light_source (tuple[int], optional) – Light source direction for shading (azimuth, degrees from North and altitude, degrees from horizon). The default is None.

  • cmap (str, optional) – Name of the colormap to use. If None, use “Hot” or “Rdbu. The default is None.

  • minval (int or float, optional) – Minimum value to display. The default is None.

  • maxval (int or float, optional) – Maximum value to display. The default is None.

  • minval_abs (float, optional) – If set, masks values with absolute magnitude below this threshold. The default is None.

  • add_walls (bool, optional) – If True, add walls under the figure. The default is True

  • add_floor (bool, optional) – If True, add floor under the figure. The default is True

  • saving_path (str, optional) – Folder path to save the html file. If None file saved in source folder. The default is None.

  • auto_open (bool, optional) – If True, open the result. The default is False.

Return type:

None