scatterd

1.4.2 · active · verified Thu Apr 16

scatterd is a Python package designed for the easy and fast creation of beautiful scatter plots. It simplifies the process of data visualization, currently at version 1.4.2, with an active release cadence.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to create a simple scatter plot using `scatterd` with a Pandas DataFrame. It generates random data for X, Y, point size, and a categorical variable, then calls the `scatterd` function with appropriate arguments to visualize the data. It's assumed that `scatterd` internally uses or is compatible with Matplotlib for rendering, hence `matplotlib.pyplot.show()` is included to display the plot.

import pandas as pd
import numpy as np
from scatterd import scatterd
import matplotlib.pyplot as plt

# Sample data
np.random.seed(42)
data = {
    'X': np.random.rand(100) * 10,
    'Y': np.random.rand(100) * 10 + np.random.rand(100) * 2,
    'Size': np.random.rand(100) * 50 + 10, # Example for variable point sizes
    'Category': np.random.choice(['A', 'B', 'C'], 100)
}
df = pd.DataFrame(data)

# Create a basic scatter plot using the scatterd function
# Assuming scatterd function accepts common plotting arguments like Matplotlib's scatter
scatterd(x=df['X'], y=df['Y'], title='My First Scatter Plot',
         xlabel='Feature X', ylabel='Feature Y', s=df['Size'], c=df['Category'],
         colorbar_title='Category' # Example for categorical coloring
        )

# Display the plot. scatterd often leverages Matplotlib internally.
plt.show()

view raw JSON →