pyrho.vis.scatter#

Helper functions to visualize the data in plotly.

Module Contents#

Functions#

get_scatter_plot(...)

Return a plotly fig object for plotting.

_scatter_plotly(xx, yy, zz, cc, ndim, marker_size, opacity)

Return the plotly object.

_scatter_matplotlib(→ matplotlib.axes.Axes)

Return the matplotlib object.

pyrho.vis.scatter.get_scatter_plot(data_in: numpy.ndarray, lat_mat: numpy.ndarray, skips: int = 1, logcolor: bool = False, mask: numpy.ndarray = None, opacity: float = 1.0, marker_size: int = 5, plotter: str = 'matplotlib') plotly.graph_objs.Figure | matplotlib.axes.Axes[source]#

Return a plotly fig object for plotting.

Parameters:
  • data_in – Structured grid data to be plotted

  • lat_mat – Lattice vectors of the cell this must be a 2d array

  • skips – Reduction factor of the grid points for plotting, only show [::skips] in each direction

  • logcolor – If True, assign the color in log scale

  • mask – Filter the points to plot

  • opacity – Opacity of each point being plotted

  • marker_size – Size of the markers in the 3D scatter plot

  • marker_size – Marker size for the scatter plot

  • plotter – Plotter to use, either “matplotlib” or “plotly”

Returns:

Figure object or Axes object from matplotlib to be rendered in a notebook

Return type:

Figure | Axes

pyrho.vis.scatter._scatter_plotly(xx, yy, zz, cc, ndim, marker_size, opacity)[source]#

Return the plotly object.

pyrho.vis.scatter._scatter_matplotlib(xx, yy, zz, cc, ndim, marker_size, opacity) matplotlib.axes.Axes[source]#

Return the matplotlib object.