spateo.tdr.models.models_migration.arrow_model ============================================== .. py:module:: spateo.tdr.models.models_migration.arrow_model Functions --------- .. autoapisummary:: spateo.tdr.models.models_migration.arrow_model._construct_arrow spateo.tdr.models.models_migration.arrow_model.construct_arrow spateo.tdr.models.models_migration.arrow_model.construct_arrows Module Contents --------------- .. py:function:: _construct_arrow(start_point: Union[list, tuple, numpy.ndarray] = (0.0, 0.0, 0.0), direction: Union[list, tuple, numpy.ndarray] = (1.0, 0.0, 0.0), tip_length: float = 0.25, tip_radius: float = 0.1, tip_resolution: int = 20, shaft_radius: float = 0.05, shaft_resolution: int = 20, scale: Optional[Union[str, float]] = 'auto') -> pyvista.PolyData Create a 3D arrow model. :param start_point: Start location in [x, y, z] of the arrow. :param direction: Direction the arrow points to in [x, y, z]. :param tip_length: Length of the tip. :param tip_radius: Radius of the tip. :param tip_resolution: Number of faces around the tip. :param shaft_radius: Radius of the shaft. :param shaft_resolution: Number of faces around the shaft. :param scale: Scale factor of the entire object. ``'auto'`` scales to length of direction array. :returns: Arrow model. .. py:function:: construct_arrow(start_point: Union[list, tuple, numpy.ndarray], direction: Union[list, tuple, numpy.ndarray], arrow_scale: Optional[Union[int, float]] = None, key_added: Optional[str] = 'arrow', label: str = 'arrow', color: str = 'gainsboro', alpha: float = 1.0, **kwargs) -> Tuple[pyvista.PolyData, Optional[str]] Create a 3D arrow model. :param start_point: Start location in [x, y, z] of the arrow. :param direction: Direction the arrow points to in [x, y, z]. :param arrow_scale: Scale factor of the entire object. 'auto' scales to length of direction array. :param key_added: The key under which to add the labels. :param label: The label of arrow model. :param color: Color to use for plotting model. :param alpha: The opacity of the color to use for plotting model. :param \*\*kwargs: Additional parameters that will be passed to ``_construct_arrow`` function. :returns: Arrow model. plot_cmap: Recommended colormap parameter values for plotting. :rtype: model .. py:function:: construct_arrows(start_points: numpy.ndarray, direction: numpy.ndarray = None, arrows_scale: Optional[numpy.ndarray] = None, n_sampling: Optional[Union[int, numpy.ndarray]] = None, sampling_method: str = 'trn', factor: float = 1.0, key_added: Optional[str] = 'arrow', label: Union[str, list, numpy.ndarray] = 'arrows', color: Union[str, list, dict, numpy.ndarray] = 'gainsboro', alpha: Union[float, int, list, dict, numpy.ndarray] = 1.0, **kwargs) -> Tuple[pyvista.PolyData, Optional[str]] Create multiple 3D arrows model. :param start_points: List of Start location in [x, y, z] of the arrows. :param direction: Direction the arrows points to in [x, y, z]. :param arrows_scale: Scale factor of the entire object. :param n_sampling: n_sampling is the number of coordinates to keep after sampling. If there are too many coordinates in start_points, the generated arrows model will be too complex and unsightly, so sampling is used to reduce the number of coordinates. :param sampling_method: The method to sample data points, can be one of ``['trn', 'kmeans', 'random']``. :param factor: Scale factor applied to scaling array. :param key_added: The key under which to add the labels. :param label: The label of arrows models. :param color: Color to use for plotting model. :param alpha: The opacity of the color to use for plotting model. :param \*\*kwargs: Additional parameters that will be passed to ``_construct_arrow`` function. :returns: Arrows model. plot_cmap: Recommended colormap parameter values for plotting. :rtype: model