| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
I also realized that there is a change here that may not really be wanted (or it may be). Earlier, passing e.g. orientation='horizontal' always gave ticklocation 'bottom'. Now, if passing orientation='horizontal' and a valid location, the ticklocation depends on if the location is 'top' or 'bottom'. Which makes sense and is consistent with what location does for make_axis and make_axis_gridspec. |
Sorry, something went wrong.
|
This is awesome and I'm fairly sure should get a new feature/what's new write up. |
Sorry, something went wrong.
There was a problem hiding this comment.
Agree with the need for a what's-new.
Sorry, something went wrong.
|
|
||
| The ``colorbar`` method now supports a ``location`` keyword argument | ||
| to more easily position the color bar. This is useful when providing | ||
| your own inset axes using the ``cax`` keyword argument and behaves |
There was a problem hiding this comment.
this sounds like this kwarg only works with a passed in cax & if that's not the case than please also add an example for the not-cax case
Sorry, something went wrong.
There was a problem hiding this comment.
The earlier version is documented, but is not used by colorbar (passed to either make_axes or make_axes_gridspec. I agree, however, that the current formulation is not ideal. Will try to modify it (now that I reminded myself of the differences).
Sorry, something went wrong.
There was a problem hiding this comment.
I've not yet followed the details here, but I would have expected that this can build on top of _normalize_location_orientation. Am I wrong there?
Sorry, something went wrong.
|
_normalize_location_orientation also sets anchor, panchor and pad. I wasn't sure that one wanted those to be modified here? Also, here we need to keep the original value of location to keep track of if location and orientation was passed. So while it could be used, it couldn't just be used to update the kwargs and it would do some additional stuff as well, which seemed redundant to me (but now there is redundant code instead...). |
Sorry, something went wrong.
|
I'll think it through more carefully, but the rationale at the time was this. |
Sorry, something went wrong.
You could also introduce a lower-level function that is used here and inside of _normalize_location_orientation to avoid duplication - if that helps. |
Sorry, something went wrong.
|
Got around to this and at least now it is checked and set in a single location. |
Sorry, something went wrong.
|
Finally got back to this. The unrelated test is dropped. |
Sorry, something went wrong.
There was a problem hiding this comment.
Just a small documentation concern
Sorry, something went wrong.
|
|
||
| filled : bool | ||
|
|
||
| location : None or {'left', 'right', 'top', 'bottom'} |
There was a problem hiding this comment.
I think this needs some description about how it interacts with orientation and ticklocation?
Sorry, something went wrong.
There was a problem hiding this comment.
I've added a bit of text (copied from the top) and updated the docs for ticklocation. There should maybe be another way to describe how all these are related if only some are given.
Sorry, something went wrong.
|
Thanks @oscargus - definitely useful addition! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
Closes #22676
Is this an API change or a user change?
Will add an unrelated test for #23260 here as well. Added. However, they do not look great... The png looks OK, but locally I get in Spyder:

so there it seems like there is a bit of overlap that is not visible in the test image. For the svg there is a gap instead, although this seems to depend on the renderer...
Also, I do not understand why the test images are not just four squares as the pasted image...
PR Checklist
Tests and Styling
Documentation