Repository navigation
Release v0.0.2
Added
Plot kinds
step: likeline, drawn as steps centred on each x.area: filled areas, overlapping and semi-transparent by default.area-stackstackszon top ofy, so the top edge is the total.area-normdraws a 100% stack with a percent y axis. Withleg, the legend goes outside on the right.
band: ayline with a shadedy ± zband in the same colour.zis required.scatterwith a text, bool or pandas categoricalzdraws one colour per category with a legend titled afterz. A numericzstill gets a colorbar.
Flags
stackandnorm. Both work withareaonly for now.
Themes
science: one journal column (3.5 in), 8 pt serif, inward ticks on all four sides, minor ticks, Paul Tol bright colours, saves at 600 dpi.talk: slides (16:9), 18 pt sans, thick lines, Okabe-Ito colours.poster: 12 × 9 in, 26 pt sans, very thick lines, saves at 300 dpi.thesis: A4 text width (160 mm), Computer Modern 10/9 pt without needing LaTeX, saves as PDF when the file name has no extension.
Palettes
- Named palettes live in
styles/palettes/<name>.txt, one hex colour per line. Any file added there is found automatically. okabe: the Okabe-Ito palette, 8 colours that stay distinguishable for every common type of colour blindness.kx.palettes()lists the palettes andkx.palette(name)returns a palette's colours.kx.use(theme, palette="okabe")accepts a palette name as well as a list of colours.
Colormaps
kx.use(theme, cmap=...)sets the colormap for continuous colour.- The supported matplotlib colormaps are
viridis,magma,plasma,inferno,cividis,turbo,twilight,coolwarm,berlin,managuaandvanimo. kx.cmaps()lists only the ones the installed matplotlib has.berlin,managuaandvanimoneed matplotlib 3.10 or newer.