Skip to content

Improve tight layout algorithm handling of empty gridspec slots #313

@zxdawn

Description

@zxdawn

Description

When some subplots have colorbar and some don't, the position will be wrong.

Steps to reproduce

import proplot as pplt
import numpy as np

# Colorbars
fig, axs = pplt.subplots(nrows=2, ncols=2)
state = np.random.RandomState(51423)

m = axs.heatmap(state.rand(10, 10), cmap='dusk')
axs[0].colorbar(m[0], loc='r', label='test')
axs[1].colorbar(m[0], loc='r', label='test')
axs[3].colorbar(m[0], loc='l', label='test')
axs[3].colorbar(m[0], loc='r', label='test')
axs[3].colorbar(m[0], loc='r', label='test')

Actual behavior:

image

Proplot version

Paste the results of import matplotlib; print(matplotlib.__version__); import proplot; print(proplot.version)here.

3.5.0
0.9.5.post105

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions