Conversation
|
@tacaswell you asked for me to add a "whats new" entry and and "example". More than happy to do so, but not quite clear on how. For the example, something under I also note the above is not squashed properly. Working on it ;-) Thanks, Jody |
|
whats new entry goes in https://github.com/matplotlib/matplotlib/tree/master/doc/users/whats_new (see readme file) and is a quick blurb advertising the new feature. I think that is a good place for the example. If you are up for it, a longer tutorial showing the (many) ways to set up color bar axes would be great too! |
|
OK, I actually think that this should be closed and dropped. I tricked myself into thinking that this worked with The fundamental problem, I think, is that The previous change, #8739, is still useful, and I suggest is superior because it throws a warning when I guess this hearkens back to #1109. There needs to be ways to group artists together, and then let them expand or contract recursively to fill the space assigned to them. I have trouble even wrapping my head around how that would look. |
|
You are describing a layout manager which can be done with a linear constraint solver (ex https://github.com/nucleic/kiwi). This is basically what |
|
OK, closing this for now. I have another idea to do something similar using gridspec... |
PR Summary
Git-incompetence (again) makes this a dupe of #8755. @tacaswell already commented, and I made the suggested changes....
Similar to #8739, but modifies
make_axes_gridspecincolorbar.py.This is a change to make
figure.colorbar(ppm,ax=parents)accept a list of parents that areSubplotBase, and were created bygridspecand return a colorbar that isSubplotBase. So a call like:works with
axsas a list, andcolorbartaking space from all the axes listed byaxs, andtight_layout()able to operate on all axes including the colorbar.I think it works for most edge cases. I hesitated to edit the test suite, but could give that a try if desired.
PR Checklist