sphere3d — QuadratiK 1.0.0 documentation

Skip to main content
`Ctrl`+`K`

# sphere3d

QuadratiK.tools.sphere3d(x, y=None)

  The function sphere3d creates a 3D scatter plot with a sphere as the surface and data points plotted on it.

  ## Parameters

  > xnumpy.ndarray, pandas.DataFrame

  >   The parameter x represents the input data for the scatter plot. It should be a 2D array-like object with shape (n_samples, 3), where each row represents the coordinates of a point in 3D space

  > ynumpy.ndarray, list, optional

  >   The parameter y is an optional input that determines the color and shape of each data point in the plot. If y is not provided, the scatter plot will have the default marker symbol and color.

  ## Returns

  > Returns a 3D plot of a sphere with data points plotted on it.

  ## Examples

      >>> from QuadratiK.tools import sphere3d
      >>> np.random.seed(42)
      >>> X = np.random.randn(100,3)
      >>> sphere3d(X)