docs: draw the example plots in the qc-core ledger style - #803
Merged
Merged
Conversation
use_style applies the qc-core Calibrated Ledger style when qc-core is installed, and the GPJax Matplotlib style that now ships in the package when it is not. Matplotlib is imported only inside the function, so it stays an optional dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every example notebook now calls gpx.plotting.use_style(), replacing the local use_mpl_style helper and docs/examples/gpjax.mplstyle. The docs extra needs qc-core>=0.0.3 (the first release with a valid scatter edge colour), which is exempt from the 7-day exclude-newer cooldown because it is QuantClimate's own trusted-published package. A hidden cell in each notebook hides matplotlib's font fallback messages, as impulso does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switch shibuya's accent_color to crimson and re-tone the whole crimson scale to ledger oxblood, copied from impulso's extra.css. Before, only --accent-9 was pinned over the Radix red ramp, so washes, borders and hovers stayed red, and dark mode used #d07b76 instead of the ledger's #cf6f60. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
📖 Docs preview: https://pr-803--endearing-crepe-c2d5fe.netlify.app Smoke render — the expensive notebooks run with reduced budgets, so |
qc-core 0.0.4 bundles Noto Sans and moves the second cycle colour to a brighter blue (QuantClimate/core#3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
The example notebooks now draw their plots in the QuantClimate "Calibrated Ledger" style from qc-core, as the Impulso docs do. The docs site uses Impulso's oxblood accent scale.
The new public helper picks the style that it can load:
Notes:
qc-core>=0.0.4is needed: 0.0.1 and 0.0.2 setscatter.edgecolorsto a bare hex, which makes everyax.scatter()raise (fixed in QuantClimate/core#2), and 0.0.4 adds the bundled Noto Sans font and a brighter second cycle colour (QuantClimate/core#3).exclude-newercooldown (exclude-newer-package = { qc-core = false }), because it is our own package, published by trusted publishing. All other packages keep the cooldown.remove-cellin each notebook hides matplotlib's font-fallback log messages (the build host has no Public Sans/Spectral), as Impulso does.#d07b76to the ledger's#cf6f60.Evidence
poe docs-cifailed with 12 warnings. 4 notebooks (classification, constructing_new_kernels, graph_kernels, spatial_linear_gp) raisedValueError: 'faf9f7' is not a valid color valueinax.scatter(), and 16 pages showedfindfontmessages.After: with qc-core 0.0.4 from PyPI,
poe docs-cipasses with 0 warnings, and 0 pages showfindfontoutput.tests/test_plotting.py:poe test: 3233 passed, 1 skipped.poe lintandpoe docstringspass. The built wheel containsgpjax/plotting.pyandgpjax/gpjax.mplstyle.Merge Danger
Door: two-way
The docs and CSS changes revert cleanly.
gpjax.plottingis a new public module: it is additive, but after a release, removing it would be a breaking change.Blast Radius: docs
Every example figure changes appearance: new colours, fonts, and the paper background. The 5-colour ledger cycle replaces the 8-colour GPJax cycle (no notebook uses more than 5). Scatter markers change from
xto circles, and the default colormap changes frominfernoto Matplotlib's default (plots that setcmapexplicitly keep it). Site links, hovers, and focus rings change to oxblood tints in both colour modes. Library users are not affected unless they calluse_style(); matplotlib and qc-core stay optional.🤖 Generated with Claude Code