Skip to content

Side labels create unclear visual hierarchy #764

Closed

Description

@cvanelteren

When a spanning y-axis label is used together with categorical row labels, UltraPlot places the shared y-axis label between the row labels and the subplot grid. This pushes labels such as “Cropland,” “Forest,” “Grassland,” and “Savanna” farther away from their corresponding rows, creating an unclear visual hierarchy. The shared y-axis label should preferably be outermost, while the categorical row labels should remain closer to their panels. This behavior is reproducible in plain UltraPlot and is unaffected by the order of the formatting calls.

Minimal Reproducible Example

import matplotlib.pyplot as plt
import ultraplot as uplt

fig, axs = uplt.subplots(
    nrows=4,
    ncols=4,
    sharex=True,
    sharey=True,
)

axs.format(
    xlabel="Observed value",
    ylabel="Predicted value",
)

fig.format(
    rowlabels=[
        "Cropland",
        "Forest",
        "Grassland",
        "Savanna",
    ],
)

plt.show()

Originally posted by @lwq-star in #747 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions