Skip to content

Releases: Ultraplot/UltraPlot

v1.56 🐝 Feature addition: Beeswarm plot

13 Jun 10:04

Choose a tag to compare

We are introducing a new plot type with this release: a beeswarm plot. A beeswarm plot is a data visualization technique that displays individual data points in a way that prevents overlap while maintaining their relationship to categorical groups, creating a distinctive "swarm" pattern that resembles bees clustering around a hive.

Unlike traditional box plots or violin plots that aggregate data, beeswarm plots show every individual observation, making them ideal for datasets with moderate sample sizes where you want to see both individual points and overall distribution patterns, identify outliers clearly, and compare distributions across multiple categories without losing any information through statistical summaries.

This plot mimics the beeswarm from SHAP library, but lacks the more sophisticated patterns they apply such as inline group clustering. UltraPlot does not aim to add these features but instead provide an interface that is simpler that users can tweak to their hearts desires.

tmp

snippet
import ultraplot as uplt, numpy as np

# Create mock data
n_points, n_features = 50, 4
features = np.arange(n_features)
data = np.empty((n_points, n_features))
feature_values = np.repeat(
    features,
    n_points,
).reshape(data.shape)

for feature in features:
    data[:, feature] = np.random.normal(feature * 1.5, 0.6, n_points)

cmap = uplt.Colormap(uplt.rc["cmap.diverging"])

# Create plot and style
fig, (left, right) = uplt.subplots(ncols=2, share=0)
left.beeswarm(
    data,
    orientation="vertical",
    alpha=0.7,
    cmap=cmap,
)
left.format(
    title="Traditional Beeswarm Plot",
    xlabel="Category",
    ylabel="Value",
    xticks=features,
    xticklabels=["Group A", "Group B", "Group C", "Group D"],
)
right.beeswarm(
    data,
    feature_values=feature_values,
    cmap=cmap,
    colorbar="right",
)
right.format(
    title="Feature Value Beeswarm Plot",
    xlabel="SHAP Value",
    yticks=features,
    yticklabels=["A", "B", "C", "D"],
    ylabel="Feature",
)
uplt.show(block=1)

What's Changed

Full Changelog: V1.55...v1.56

V1.55. Bug fixes.

04 Jun 13:42
3c6b0fa

Choose a tag to compare

This release continues our ongoing mission to squash pesky bugs and make your plotting experience smoother and more intuitive.

✨ New Features

  • Centered Labels for pcolormesh
    You can now enable center_labels when using pcolormesh, making it easier to annotate discrete diverging colormapsβ€”especially when including zero among the label values. Ideal for visualizing data with meaningful central thresholds.

  • Direct Bar Labels for bar and hbar
    Bar labels can now be added directly via the bar and hbar commands. No more extra stepsβ€”just call the method and get your labeled bars out of the box.

🐞 Bug Fixes

Various internal improvements and minor bug fixes aimed at ensuring a more robust and predictable plotting experience.

As always, thank you for using UltraPlot! Feedback, issues, and contributions are welcome.

What's Changed

Full Changelog: v1.50.2...V1.55

v1.50.2

20 May 11:31

Choose a tag to compare

What's Changed

Full Changelog: v1.50.1...v1.50.2

v1.50.1

12 May 13:03

Choose a tag to compare

What's Changed

  • fix: specify import exception type and add typing-extensions to deps by @beckermr in #212

Full Changelog: v1.50...v1.50.1

v1.50: Networks, lollipops and sharing

11 May 21:33

Choose a tag to compare

UltraPlot v1.50

Version v1.50 is a major milestone for UltraPlot. As we become more familiar with the codebase, we’ve opened the door to new featuresβ€”balancing innovation with continuous backend improvements and bug fixes.


🌍 GeoAxes Sharing

You can now share axes between subplots using GeoAxes, as long as they use the same rectilinear projection. This enables cleaner, more consistent layouts when working with geographical data.


πŸ•ΈοΈ Network Graphs

UltraPlot now supports network visualizations out of the box. With smart defaults and simple customization options, creating beautiful network plots is easier than ever.

Network plotting code
import networkx as nx, ultraplot as uplt
n = 100
g = nx.random_geometric_graph(n, radius=0.2)
c = uplt.colormaps.get_cmap("viko")
c = c(np.linspace(0, 1, n))
node = dict(
    node_size=np.random.rand(n) * 100,
    node_color=c,
)
fig, ax = uplt.subplots()
ax.graph(g, layout="kamada_kawai", node_kw=node)
fig.show()

🍭 Lollipop Graphs

A sleek alternative to bar charts, lollipop graphs are now available directly through UltraPlot. They shine when visualizing datasets with many bars, reducing visual clutter while retaining clarity.

Lollipop example code
import ultraplot as uplt, pandas as pd, numpy as np
data = np.random.rand(5, 5).cumsum(axis=0).cumsum(axis=1)[:, ::-1]
data = pd.DataFrame(
    data,
    columns=pd.Index(np.arange(1, 6), name="column"),
    index=pd.Index(["a", "b", "c", "d", "e"], name="row idx"),
)
fig, ax = uplt.subplots(ncols=2, share=0)
ax[0].lollipop(
    data,
    stemcolor="green",
    stemwidth=2,
    marker="d",
    edgecolor="k",
)
ax[1].lollipoph(data, linestyle="solid")

What's Changed

Full Changelog: v1.11...v1.5

Various bug fixes

25 Apr 07:40

Choose a tag to compare

What's Changed

Full Changelog: v1.10.0...v1.11

v1.10.0 Ticks for Geoaxes

20 Mar 07:23

Choose a tag to compare

This release marks a newly added feature: ticks on GeoAxes
image
This allows for users to set ticks for the x and or y axis. These can be controlled by lonticklen, latticklen or ticklen for controlling the x, y or both axis at the same time. This works independently to the major and minor gridlines allow for optimal control over the look and feel of your plots.

What's Changed

New Contributors

Full Changelog: v1.0.9...v1.10.0

v1.0.9: IPython 9.0.0 compatibility and numerous backend fixes.

05 Mar 14:03

Choose a tag to compare

What's Changed

Full Changelog: v1.0.8...v1.0.9

v1.0.8-2: Hotfix cycling properties

27 Feb 07:46

Choose a tag to compare

Hot fix for cycle not recognizing color argument

What's Changed

Full Changelog: v1.0.8...v1.0.8-2

v1.0.8: Minor bug fixes

23 Feb 15:47

Choose a tag to compare

Fixes an issue where ticks were not properly set when giving levels and ticks in pcolormesh and related functions in the colorbar. See more of the changes below.

What's Changed

Full Changelog: v1.0.7...v1.0.8