Skip to content

v1.50: Networks, lollipops and sharing

Compare
Choose a tag to compare
@beckermr beckermr released this 11 May 21:33
· 56 commits to main since this release
e6b1bc6

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