8000 constrained_layout and colorbar for a subset of axes · Issue #11641 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
constrained_layout and colorbar for a subset of axes #11641
Closed
@dcherian

Description

@dcherian

Bug report

Bug summary

constrained_layout seems to place colorbars at the "extreme right" of the image. (not sure how to phrase this; see below)

Code for reproduction

f, ax = plt.subplots(2,2, constrained_layout=True)

data = np.random.randn(10, 10)
    
for aa in ax.flat:
    mappable = aa.pcolormesh(data)
    
f.colorbar(mappable, ax=ax[:, 0])

Actual outcome

image

Expected outcome

I would like the constrained_layout version of this --- which results when setting constrained_layout=False in the plt.subplots call above

image

Matplotlib version

  • Operating system: Ubuntu 16.04
  • Matplotlib version: 2.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.6.5
  • Jupyter version (if applicable): 5.5.0
  • Other libraries:

Metadata

Metadata

Assignees

Labels

topic: geometry managerLayoutEngine, Constrained layout, Tight layout

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0