-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add bbox support to quiverkey #30148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
It is now possible to add a bbox (bounding box) around the entire quiverkey label — including both the arrow and the text — using the bbox keyword argument. Previously, bounding boxes could only be added manually or were limited to wrapping just the text, not the full key. This enhancement allows users to apply background color, border, and padding around the complete key for better visibility and styling. Co-authored-by: Mehak Khosa <mehakpreet.khosa@tecnico.ulisboa.pt>
I will resolve the problems with newlines and blankspaces but, the problems with Tests/ Python 3.12, it's not because of something I did right? |
@@ -3,10 +3,14 @@ | |||
|
|||
import numpy as np | |||
import pytest | |||
import cartopy.crs as ccrs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing because we do not have cartopy in the test environment. You need to simplify the test example and not use cartopy. Similarly for the new gallery example.
Oh ok thank you, I will work on that! |
I'm not really sure it's actually a good idea to add bbox support in each artist class one at a time. Instead, it may be more viable to have something like |
Which artists would it make sense to have a bbox for?
Depends - if a method is added to fancy box then yes, if the implementation is in base artist than you'll move the solution into the artist class but you still need to propose the arguments and show examples. attn @timhoffm |
Please understand that not all developers read all discussions at the same time nor do we all necessarily agree immediately on the best way to implement a feature (or whether we even want it to be added). It is not so rare to have multiple rounds of back and forth between the API-design side and the actual implementation work.
A more general reason why I raised this point is that the current implementation seems to be very tied down to QuiverKey implementation details, but a more generic one (based on get_window_extent) may be possible. |
I have not followed all the details here, but currently |
Yes, that makes sense, I'm still new at this. So @story645, @rcomer, in summary, what do you want me to do? I understood your points and views, but I'm unsure what the final decision is. |
I don't think anyone wants you to do anything. Again, the tricky part is figuring out what to do, not so much how to do it. |
Like @anntzer said, we've gotta come to consensus for quiverbox. I think for now, you can work on @rcomer 's suggestion of creating a |
Yes, I know, I was talking about the part of being more generic. Ok, thank you, @story645 . |
-This change was necessary to resolve the issue #29704.
-It is now possible to add a bbox (bounding box) around the entire quiverkey label — including both the arrow and the text — using the bbox keyword argument. Previously, bounding boxes could only be added manually or were limited to wrapping just the text, not the full key. This enhancement allows users to apply background color, border, and padding around the complete key for better visibility and styling.
PR checklist