Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

constrained_layout and colorbar for a subset of axes #11641

Copy link
Copy link
Closed
@dcherian

Description

@dcherian
Issue body actions

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 layoutLayoutEngine, Constrained layout, Tight layout

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.