Skip to content

[Feature request] span axis labels #464  #11

@cvanelteren

Description

@cvanelteren

I want to revive the issue raised here:

proplot-dev/proplot#464

The feature request describes a more flexible approach to sharing axis labels. I haven't found a clean way to use the mpl /uplt syntax to easily share labels in a "complex" plot, i.e. a plot in which not all axis are shared but some.

I would propose that we can have something like

import ultraplot as plt
layout = [
[1, 2, 3],
[4, 5, 3]
]
fig, ax = plt.subplots(layout, share = 0, figsize = (4,4))
ax[0:2].format(xlabel = "shared group 1")

Yielding:
image

In this way we could capitalize on the existing format function but extend its functionality to share formatting only on certain properties and not all.

However what I wish to achieve is this:

image

which can be achieved by

layout = [
    [1, 2, 3],
    [4, 5, 3]
]
fig, ax = plt.subplots(layout, share = 0, figsize = (4,4))

shared = fig.add_subplot(2, 3, (1, 2))
shared.set_xticks([])
shared.set_yticks([])
shared.set_frame_on(False)
shared.grid(False)
shared.set_xlabel("Testing this out", labelpad = 20)

Happy to hear your thoughts in this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions