Improve Axes selection in Qt figure options. #13375
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make sure Axes "labels" in the input dialog are unique
(QInputDialog.getItem returns the selected string, but we'll get the
wrong index if two axes share e.g. the same title), by including the
axes id() if necessary; conversely, don't include the id() in the
user-facing UI unless necessary.
For example, previously, after
the input dialog would not allow selecting the second axes.
If the Axes artist has a "label" attached to it (per
Artist.set_label
), use it in priority for the input dialog.Normally, axes labels are not used (they are used for other artists
for the legend, for example). This change allows us to attach a
"(colorbar)" label to colorbar axes, which makes it easier to select
the right axes.
After
previously the input dialog would have the entries
but now it has the entries
PR Summary
PR Checklist