You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. 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
fig, axs = plt.subplots(2)
axs[0].set(xlabel="foo"); axs[1].set(xlabel="foo")
the input dialog would not allow selecting the second axes.
2. 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
fig, axs = plt.subplots(2)
axs[0].imshow([[0]]); fig.colorbar(axs[0].images[0])
axs[1].imshow([[0]]); fig.colorbar(axs[1].images[0])
previously the input dialog would have the entries
<anonymous AxesSubplot (id: 0x...)>
<anonymous AxesSubplot (id: 0x...)>
<anonymous AxesSubplot (id: 0x...)>
<anonymous AxesSubplot (id: 0x...)>
but now it has the entries
<anonymous AxesSubplot> (id: 0x...)
<anonymous AxesSubplot> (id: 0x...)
(colorbar) (id: 0x...)
(colorbar) (id: 0x...)
0 commit comments