Repository navigation
Carry the canvas caption on the drawn figures - #97
Merged
Merged
Conversation
max-models
force-pushed
the
cloud/youthful-thompson-hdhhz4
branch
from
November 14, 2026 10:07
19ee06a to
888f08a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Canvas(caption=...)was stored but never used. Now:plot_matplotlibsetsfig.captionon the Matplotlib figure;plot_plotlyputs it inlayout.meta["caption"];web_figuretakesmeta["caption"]as the title hint (the caption the docs page shows) when no title is given, socanvas.to_json()andsavefig("x.plotly.json")carry it.Docs and gallery tools read
fig.captionto write the caption under the figure.Also a fix for Python 3.14, which the CI runner now uses (two import tests failed on
develtoo):itertools.count, which Python 3.14 no longer copies: copying a categorical axis failed.itertools.countis made copyable again from its repr.copy.deepcopyon 3.14 returns functions and builtin methods before reading the memo, so a snapshot of an imported artist kept the source's_remove_methodand with it the source figure. The copies' removal and stale callbacks are now dropped explicitly.Tests pass on Python 3.13 and 3.14 (353 passed).