plot-io 0.6.0__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plot_io-0.6.0 → plot_io-0.7.0}/API.md +434 -146
- {plot_io-0.6.0 → plot_io-0.7.0}/EXAMPLES.md +109 -2
- {plot_io-0.6.0 → plot_io-0.7.0}/PKG-INFO +13 -7
- {plot_io-0.6.0 → plot_io-0.7.0}/README.md +10 -5
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/bars.py +1 -1
- plot_io-0.7.0/examples/colorbars.py +42 -0
- plot_io-0.7.0/examples/shared_legend.py +50 -0
- plot_io-0.7.0/examples/titles.py +45 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/__init__.py +1 -1
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/axis.py +2 -7
- plot_io-0.7.0/plot_io/colorbar.py +1040 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/defaults.py +41 -29
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/facets.py +5 -2
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/figure.py +112 -40
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/genome/sources.py +16 -19
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/genome/tracks.py +4 -3
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/geometry.py +78 -7
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/groups.py +12 -3
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/core.py +0 -2
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layout.py +862 -107
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/legend.py +222 -50
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/mapped.py +2 -0
- plot_io-0.7.0/plot_io/markup.py +128 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/plot.py +78 -28
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/heatmap.py +0 -1
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/render.py +65 -16
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/rows.py +72 -55
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/settings.py +19 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/sharing.py +13 -4
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/spec.py +3 -1
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/states.py +6 -7
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/styles/__init__.py +7 -5
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/styles/library.py +22 -20
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/text.py +62 -19
- plot_io-0.7.0/plot_io/titles.py +140 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/units.py +2 -1
- {plot_io-0.6.0 → plot_io-0.7.0}/pyproject.toml +4 -1
- plot_io-0.7.0/tests/golden.json +186 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/helpers.py +4 -2
- plot_io-0.7.0/tests/test_colorbars.py +519 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_decorations.py +1 -1
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_defaults.py +6 -6
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_density.py +9 -4
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_figure_title.py +11 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_fonts.py +68 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_genome.py +30 -16
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_geometry.py +3 -3
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_golden.py +139 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_heatmap.py +1 -1
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_layout.py +9 -2
- plot_io-0.7.0/tests/test_markup.py +243 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_output.py +58 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_rows.py +40 -2
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_settings.py +1 -1
- plot_io-0.7.0/tests/test_shared_legends.py +381 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_simplify.py +17 -4
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_style_settings.py +5 -5
- plot_io-0.7.0/tests/test_titles.py +625 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_units.py +3 -3
- {plot_io-0.6.0 → plot_io-0.7.0}/tools/settings_doc.py +6 -4
- plot_io-0.6.0/plot_io/colorbar.py +0 -451
- plot_io-0.6.0/tests/golden.json +0 -111
- {plot_io-0.6.0 → plot_io-0.7.0}/LICENSE +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/annotated.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/box_plots.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/density.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/distributions.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/error_bars.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/facets.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/genome_tracks.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/grids2d.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/groups.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/heatmap.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/large_data.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/layouts.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/line_band.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/scales.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/scatter_groups.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/shared_colorbar.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/shared_sizes.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/styles.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/time_twin.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/units.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/examples/variable_fonts.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_backend.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/README.md +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/__init__.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/_api.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/bin/linux-aarch64.so +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/bin/linux-x86_64.so +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/bin/macos-arm64.dylib +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/bin/windows-arm64.dll +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/bin/windows-x86_64.dll +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/kernels.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/manifest.json +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/alloc.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/colormap.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/data.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/math.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/plio.h +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/plio_api.h +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/plot.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/rt.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/signatures.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_native/src/stats.c +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/_threads.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/color/__init__.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/color/data.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/color/maps.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/color/palettes.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/color/values.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/decorations.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/density.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/genome/__init__.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/genome/layout.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/genome/pack.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/genome/regions.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/genome/scale.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/kernels.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/labels.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/__init__.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/base.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/context.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/geoms.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/paint.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/pipeline.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/positions.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/layers/stats.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/limits.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/lines.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/markers.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/numbers.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/occupancy.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/__init__.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/_util.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/area.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/bar.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/box.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/catpoints.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/contour.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/curves.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/ecdf.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/errorbar.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/errors.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/fill.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/hexbin.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/hist.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/hist2d.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/kde.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/kde2d.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/line.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/pie.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/regression.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/scatter.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/stem.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/presets/violin.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/py.typed +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/scales.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/seams.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/shapes.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/sizemaps.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/stats.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/tables.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/ticks.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/times.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/transform.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/plot_io/values.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/fonts/PioTest-Bold.ttf +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/fonts/PioTest-Regular.ttf +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/fonts/VarTest.ttf +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/stats_reference.json +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_bars.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_box.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_distributions.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_docs.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_entry.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_grids.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_jxl_output.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_layers.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_limits.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_maps.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_markers.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_native.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_numbers.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_occupancy.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_palettes.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_pie.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_reflines.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_series.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_sharing.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_stats.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_style_types.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_styles.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_tables.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_ticks.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_time_twin.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_transform.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_values.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tests/test_vocabulary.py +0 -0
- {plot_io-0.6.0 → plot_io-0.7.0}/tools/build_native.py +0 -0
|
@@ -17,8 +17,8 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
|
|
|
17
17
|
|
|
18
18
|
## 1. Conventions
|
|
19
19
|
|
|
20
|
-
* **Model.** A `Figure` holds plots (and colorbars) in a grid; a `Plot` holds
|
|
21
|
-
|
|
20
|
+
* **Model.** A `Figure` holds plots (and colorbars) in a grid, and titles; a `Plot` holds
|
|
21
|
+
series, two axes, titles, a legend and colorbars; a series holds data and style. Nothing is
|
|
22
22
|
computed until the figure is drawn (`save`, `to_bytes`, `draw`), so settings can change
|
|
23
23
|
in any order.
|
|
24
24
|
* **Settings.** Every object takes its settings as keywords when created and in
|
|
@@ -52,7 +52,7 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
|
|
|
52
52
|
`"calc(1.4 * inherit)"`, a fill's opacity `"calc(0.3 * inherit)"`). `"XAxis.name"` and
|
|
53
53
|
`"YAxis.name"` give one axis its own default.
|
|
54
54
|
* **`"auto"`.** A setting whose default is `"auto"` documents its rule. Rules that follow
|
|
55
|
-
from the model (a colorbar's orientation from its
|
|
55
|
+
from the model (a colorbar's orientation from its side, a legend's inner pad from
|
|
56
56
|
its frame, a genome track's gap) are resolved with the setting: `resolve()` returns the
|
|
57
57
|
result and `get()` `"auto"`. Rules that need the data or the layout (axis limits,
|
|
58
58
|
padding, tick count and rotation, number formats, legend placement) are resolved when
|
|
@@ -86,8 +86,8 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
|
|
|
86
86
|
`Swarm` `width`) are `"80%"` of the slot or `"0.8d"` in data units. Positions along an
|
|
87
87
|
axis (a decoration's `min`/`max`) take bare numbers as data values. See
|
|
88
88
|
[values](#values).
|
|
89
|
-
Images are `dpi` pixels per inch: `dpi=96` gives one image pixel per px, the default
|
|
90
|
-
|
|
89
|
+
Images are `dpi` pixels per inch: `dpi=96` gives one image pixel per px, the default 384
|
|
90
|
+
four. A dpi up to 16 is a multiple of 96: `dpi=2` is 192. PDF pages are sized in pt (× 0.75).
|
|
91
91
|
* **Data.** Sequences (`None` = missing), `array.array`, or any buffer (numpy arrays are
|
|
92
92
|
read without importing numpy). NaN or `None` values are missing: scatter skips them,
|
|
93
93
|
line and fill break there, box ignores them, heatmap cells take `nan_color`.
|
|
@@ -95,7 +95,15 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
|
|
|
95
95
|
([tables](#tables-data)); dates make time axes ([dates](#dates-and-times)).
|
|
96
96
|
* **Text.** Titles, axis labels and legend entries are strings or rich content: a list of
|
|
97
97
|
strings and `pl.Span` (vec_io's), e.g. `["Area (m", pl.Span("2",
|
|
98
|
-
baseline_shift="super", font_scale=0.7), ")"]`.
|
|
98
|
+
baseline_shift="super", font_scale=0.7), ")"]`. Strings take markup:
|
|
99
|
+
`"Growth of <i>E. coli</i> at <b>37 °C</b>"`, `"Area (m<sup>2</sup>)"`. Tags: `<i>`/`<em>`
|
|
100
|
+
italic, `<b>`/`<strong>` bold, `<u>` underline, `<s>`/`<del>` strikethrough, `<sup>` and
|
|
101
|
+
`<sub>` (0.7 of the size, raised 0.33 em or lowered 0.2 em), in either case, nested,
|
|
102
|
+
each closed by its own end tag; an unclosed or crossed tag is an error. Styles add to the text's own (`<b>`
|
|
103
|
+
in a bold title stays bold). Any other `<` is text (`x < 5`, `<0.05`); `<`, `>` and
|
|
104
|
+
`&` write `<`, `>` and `&`. Strings inside rich content are read too; tick labels
|
|
105
|
+
take no markup. `markup=False` (inherited: on the figure, a plot or a text element) keeps
|
|
106
|
+
strings literal; `get()` returns the string as given.
|
|
99
107
|
* **Named colors.** `"blue"`, `"blue 0.45"`, `"blue 45%"`: 28 scales (`red`, `orange`,
|
|
100
108
|
`amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`,
|
|
101
109
|
`violet`, `purple`, `fuchsia`, `pink`, `rose`, `slate`, `gray`/`grey`, `zinc`, `neutral`,
|
|
@@ -125,9 +133,13 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
|
|
|
125
133
|
not installed tries its metric aliases first: Helvetica and Arial → Liberation Sans,
|
|
126
134
|
Arimo, …), then a generic family's list (`sans-serif`: Arial, Helvetica, Liberation
|
|
127
135
|
Sans, DejaVu Sans, Noto Sans, …), then any font with the character. The default
|
|
128
|
-
`"
|
|
129
|
-
else
|
|
130
|
-
|
|
136
|
+
`"Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo"` is Helvetica where
|
|
137
|
+
installed, else the first of the others installed (all have Helvetica's widths); with
|
|
138
|
+
none installed, vec_io downloads Nimbus Sans (URW's base 35 fonts). With no outline
|
|
139
|
+
font at all, output raises
|
|
140
|
+
`NoFontError` (a `ValueError`, from vec_io). A line of text is `line_height` tall (a
|
|
141
|
+
multiple of the font size; default 1), the glyphs centered in it, so the gaps around
|
|
142
|
+
text do not change with the font; `"normal"` takes the font's ascent and descent.
|
|
131
143
|
* **Names.** `pl.` holds the figure and plot classes, the plot types, the value types
|
|
132
144
|
(`ColorAxis`, `SizeAxis`, `ColorMap`, `SizeMap`, `Palette`, `Density`, `ErrorBars`,
|
|
133
145
|
`Span`), `facet`, the registries (`register_layer`, `register_marker`,
|
|
@@ -201,7 +213,8 @@ What `%` of a length can be of, besides another setting (the tables name it per
|
|
|
201
213
|
| `axes_length` | the axes length along the axis |
|
|
202
214
|
| `data_range` | the axis range |
|
|
203
215
|
| `bar_across` | the axes side across the colorbar |
|
|
204
|
-
| `
|
|
216
|
+
| `bar_thickness` | the span along a key, the axes side across a bar |
|
|
217
|
+
| `bar_along` | the span along the colorbar (the axes side of an attached one) |
|
|
205
218
|
| `figure` | the figure width (across) or height (down) |
|
|
206
219
|
| `slot` | the slot: one category, or the smallest gap between positions |
|
|
207
220
|
| `slot_part` | each series' part of a shared slot |
|
|
@@ -223,12 +236,14 @@ contours, genome signals and intervals); `"Marker.fill"` every marker fill.
|
|
|
223
236
|
| `Font` | `font_stretch` | `{p}font_stretch` | inherited |
|
|
224
237
|
| `Font` | `font_variations` | `{p}font_variations` | inherited |
|
|
225
238
|
| `Font` | `font_optical_sizing` | `{p}font_optical_sizing` | inherited |
|
|
239
|
+
| `Font` | `line_height` | `{p}line_height` | inherited |
|
|
240
|
+
| `Font` | `markup` | `{p}markup` | inherited |
|
|
226
241
|
| `TextStyle` | `font_size` | `{p}font_size` | '1em' |
|
|
227
242
|
| `TextStyle` | `font_weight` | `{p}weight` | 'normal' |
|
|
228
243
|
| `TextStyle` | `font_style` | `{p}style` | 'normal' |
|
|
229
244
|
| `TextStyle` | `color` | `{p}color` | 'var(text_color)' |
|
|
230
245
|
| `Stroke` | `color` | `{p}color` | — |
|
|
231
|
-
| `Stroke` | `line_width` | `{p}width` | 0.
|
|
246
|
+
| `Stroke` | `line_width` | `{p}width` | 0.5 |
|
|
232
247
|
| `Stroke` | `line_style` | `{p}style` | 'solid' |
|
|
233
248
|
| `Stroke` | `cap` | `{p}cap` | 'butt' |
|
|
234
249
|
| `Stroke` | `join` | `{p}join` | 'round' |
|
|
@@ -236,7 +251,7 @@ contours, genome signals and intervals); `"Marker.fill"` every marker fill.
|
|
|
236
251
|
| `Marker` | `size` | `{p}size` | 4.5 |
|
|
237
252
|
| `Marker` | `color` | `{p}color` | — |
|
|
238
253
|
| `Marker` | `edge_color` | `{p}edge_color` | 'auto' |
|
|
239
|
-
| `Marker` | `edge_width` | `{p}edge_width` | 0.
|
|
254
|
+
| `Marker` | `edge_width` | `{p}edge_width` | 0.5 |
|
|
240
255
|
| `Marker` | `fill` | `{p}fill` | True |
|
|
241
256
|
| `Marker` | `size_basis` | `size_basis (never prefixed)` | 'area' |
|
|
242
257
|
| `FillStyle` | `fill` | `{p}fill` | — |
|
|
@@ -262,7 +277,10 @@ pl.Figure(**settings)
|
|
|
262
277
|
fig.plot(id=None, **settings) # the plot with id (created if needed), or the next one
|
|
263
278
|
fig.scatter(x, y, **settings) # any plot type: a new plot holding it
|
|
264
279
|
fig.title(text, **settings) # figure title
|
|
280
|
+
fig.add_title(text, plots=None, side="top", **settings) # another, over plots
|
|
281
|
+
fig.add_legend(plots=None, side="right", **settings) # a legend of plots' entries
|
|
265
282
|
fig.x_axis(**settings) # settings of every plot's x axis (fig.y_axis: y)
|
|
283
|
+
fig.add_colorbar(source=None, plots=None, side="bottom", **settings) # beside plots
|
|
266
284
|
fig.colorbar(source, id=None, **settings) # the guide of a color axis, in its own area
|
|
267
285
|
fig.color_axis(**settings) # a shared color axis (fig.size_axis: size)
|
|
268
286
|
fig.size_legend(source, id=None, values=None, title=None)
|
|
@@ -271,6 +289,7 @@ fig.vline(x, rows=None, **settings) # through plots and the gaps between th
|
|
|
271
289
|
fig.vspan(x0, x1=None, rows=None, **settings)
|
|
272
290
|
fig.group(first, last=None, label=None, letter=None)
|
|
273
291
|
fig.plots # plots in creation order
|
|
292
|
+
fig.titles, fig.legends, fig.colorbars # figure titles (main first), legends, colorbars
|
|
274
293
|
```
|
|
275
294
|
|
|
276
295
|
A plot type called on the figure (`fig.scatter(…)`, `fig.hist(…)`, `fig.bigwig(…)`) makes
|
|
@@ -326,8 +345,8 @@ are names; `fig.plot()` gives 1, 2, 3, … skipping taken ids.
|
|
|
326
345
|
| `"axes"` | each cell's axes are `width` | the widest plot box of a column (axes plus the column's largest margins) is `width`; the axes are what is left | the figure is `width`; the axes share what the gutters leave |
|
|
327
346
|
| `"borders"` | a column's box is `width` plus the largest margins in it, so every axes rectangle is at least `width` | each cell's box is `width` | the figure is `width`; the boxes share what the gaps leave |
|
|
328
347
|
|
|
329
|
-
* Columns (rows) holding only vertical (horizontal) colorbars are as wide as the bar
|
|
330
|
-
unless `widths` (`heights`) is given.
|
|
348
|
+
* Columns (rows) holding only vertical (horizontal) colorbars are as wide as the bar (a
|
|
349
|
+
key: as wide as it is), unless `widths` (`heights`) is given.
|
|
331
350
|
* Margins come from the real text metrics of tick labels, axis labels, titles, outside
|
|
332
351
|
legends and attached colorbars ([layout](#layout)).
|
|
333
352
|
|
|
@@ -335,21 +354,24 @@ are names; `fig.plot()` gives 1, 2, 3, … skipping taken ids.
|
|
|
335
354
|
|
|
336
355
|
* **Bands.** A plot is its axes rectangle with four stacks of bands around it, from the
|
|
337
356
|
axes outward: tick marks, tick labels, the ×10ᵏ offset (above the y axis), the axis
|
|
338
|
-
label, twin axes, an outside legend, attached colorbars, the plot
|
|
339
|
-
plot's `space_above`; outermost on the left, the row label and
|
|
340
|
-
widest of the plot's grid column. Each band has a thickness and an overhang along its
|
|
357
|
+
label, twin axes, an outside legend, attached colorbars, the plot's titles and (on top)
|
|
358
|
+
the plot's `space_above`; outermost on the left, the row label band and the band of
|
|
359
|
+
[group](#rows) letters, as wide as the widest of the plot's grid column. Each band has a thickness and an overhang along its
|
|
341
360
|
side (tick labels past the ends of the axis, a wide title). A side's margin is its
|
|
342
361
|
bands' thicknesses, at least the overhangs of the bands across it. Bands stack: each
|
|
343
|
-
starts past the ones before it (mirrored ticks included), the
|
|
344
|
-
|
|
362
|
+
starts past the ones before it (mirrored ticks included), the titles past everything on
|
|
363
|
+
their side; only twin axes are drawn at the axes edge.
|
|
345
364
|
* **Grid.** Each line between cells takes the largest margin of the plots there
|
|
346
365
|
(`align="axes"`), or each plot's axes are what its margins leave of its box
|
|
347
366
|
(`"borders"`). Colorbars and size legends in their own areas are cells of the grid; the
|
|
348
|
-
figure title is a band at the top of the figure
|
|
367
|
+
figure title is a band at the top of the figure, and the other figure titles, the
|
|
368
|
+
figure legends and colorbars and the groups' labels sit in lanes in the lines between
|
|
369
|
+
cells ([figure title](#figure-title)).
|
|
349
370
|
* **Rounds.** Only what is circular is repeated: an axis' length sets its ticks, whose
|
|
350
371
|
labels set the margins, which (with `reference="plot"` or `"figure"`) set the length;
|
|
351
372
|
`data_ratio`; stats binned at the axes' resolution ([hexbin](#hexbin), genome
|
|
352
|
-
[bins](#9-genome-tracks)); the figure title's band in a figure of fixed height
|
|
373
|
+
[bins](#9-genome-tracks)); the figure title's band in a figure of fixed height; the
|
|
374
|
+
lanes of figure titles that wrap to the width of the plots they cover. A round
|
|
353
375
|
measures every plot for its axes size and solves the grid. Rounds stop when no axes size
|
|
354
376
|
moves by more than 1/3 px; after 5, a layout still moving (between two tick sets) keeps
|
|
355
377
|
the last. With `reference="axes"` one round suffices. `position="auto"` legends are
|
|
@@ -357,10 +379,13 @@ are names; `fig.plot()` gives 1, 2, 3, … skipping taken ids.
|
|
|
357
379
|
* **Geometry.** The layout ends in a frozen geometry: every axes rectangle, tick mark,
|
|
358
380
|
text run, legend entry and colorbar in px. Drawing reads it and measures nothing: a text
|
|
359
381
|
run holds its shaped line (shaped once per content and font, memoized in the font
|
|
360
|
-
database), which is what is drawn;
|
|
382
|
+
database), which is what is drawn; figure titles on top and bottom are laid out once as
|
|
383
|
+
paragraphs.
|
|
361
384
|
* **One plot.** `p.save()` lays out the whole figure and keeps the plot at its size in it:
|
|
362
385
|
its axes (`align="axes"`), or its box (`"borders"`: the axes are what its own margins
|
|
363
|
-
leave), with its outer tick labels
|
|
386
|
+
leave), with its outer tick labels, its own row label band, its own titles and its
|
|
387
|
+
whole legend and its attached colorbars (figure titles, legends and colorbars are left
|
|
388
|
+
out).
|
|
364
389
|
|
|
365
390
|
### Figure title
|
|
366
391
|
|
|
@@ -368,32 +393,84 @@ are names; `fig.plot()` gives 1, 2, 3, … skipping taken ids.
|
|
|
368
393
|
fig.title(text, **settings) # None removes it
|
|
369
394
|
```
|
|
370
395
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
`
|
|
379
|
-
|
|
396
|
+
```python
|
|
397
|
+
fig.add_title("Treated", plots=[a, b], side="top", **settings) # returns it
|
|
398
|
+
fig.titles # the main title first
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
The main title is a band at the top of the figure: the title's height (all lines,
|
|
402
|
+
wrapped within its width) plus `pad`. The figure grows by the band, except with
|
|
403
|
+
`reference="figure"`, where the plots shrink by it. `over="axes"` aligns it within the
|
|
404
|
+
leftmost to rightmost axes (a start-aligned title starts at the first y axis line),
|
|
405
|
+
`"plot"` within their boxes, `"figure"` within the figure minus `margin`. Rich content
|
|
406
|
+
styles a second line (`["Title\n", pl.Span("subtitle", font_size=7,
|
|
407
|
+
font_weight="normal")]`). It is drawn last and is not part of `Plot.save`. `title=` given
|
|
408
|
+
to `pl.Plot` sets the plot title. `rule` draws a line `rule_width` thick across its width:
|
|
409
|
+
`"outside"` above the title (The Economist's red bar, in the `economist` style), `True`
|
|
410
|
+
between the title and the plots.
|
|
411
|
+
|
|
412
|
+
`fig.add_title` makes a title over a set of plots (plots or their series, as
|
|
413
|
+
`fig.group` takes them; default every plot), which covers the grid rectangle of their
|
|
414
|
+
cells: a plot inside that rectangle but not given is an error naming it. Figure titles
|
|
415
|
+
share the settings of plot titles ([title](#title)).
|
|
416
|
+
|
|
417
|
+
```python
|
|
418
|
+
fig.add_title("Sites", plots=[a, b, c])
|
|
419
|
+
fig.add_title("Treated", plots=[a, b]) # nested: under "Sites"
|
|
420
|
+
fig.add_title("Control", plots=[d, e], rule=True) # beside another span: same lane
|
|
421
|
+
fig.add_title("Batch 1", plots=[a, d], side="left")
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
* **Lanes.** A figure title sits in the line between cells beside the plots it covers: a
|
|
425
|
+
top title above its topmost row, a bottom one below its bottommost, a left or right one
|
|
426
|
+
beside its first or last column. The titles of one side of a line stack outward from
|
|
427
|
+
the plots: a title whose plots are a subset of another's is nearer, titles over
|
|
428
|
+
disjoint spans share a lane, overlapping ones take lanes in creation order; `order`
|
|
429
|
+
overrides (lower nearer; unset counts as the lane the rules give): a title sits past
|
|
430
|
+
every lane of a lower order, and titles of one order share a lane where their spans
|
|
431
|
+
are disjoint. A lane is as thick
|
|
432
|
+
as its thickest title: `pad`, the text, and `rule_width + rule_gap` with a rule. Plot
|
|
433
|
+
titles are inside the plots' boxes, nearer than any figure title. Figure legends and
|
|
434
|
+
colorbars take lanes too ([figure legends](#figure-legends), [colorbars](#colorbars));
|
|
435
|
+
over the same plots, from the plots outward: legend, colorbar, title.
|
|
436
|
+
* **Gaps.** The gap at a line between rows (columns) is `spacing` plus its lanes, along
|
|
437
|
+
the whole line, so the titles in it line up. On the figure's edge, the lanes come between
|
|
438
|
+
two `margin`s, one at the edge and one between them and the plots, as the main title's
|
|
439
|
+
band does. With `reference="figure"` the plots shrink by the lanes; otherwise the
|
|
440
|
+
figure grows.
|
|
441
|
+
* **Text.** Titles on top and bottom wrap to their span (`over`); titles on the left and
|
|
442
|
+
right do not (`\n` starts a line) and read upward on the left, downward on the right.
|
|
443
|
+
* A [group](#rows)'s `label` is a left figure title over its plots.
|
|
444
|
+
* The main title is the outermost lane of the top, over every plot. On another side,
|
|
445
|
+
rotated, or with an `order`, it is laid out in the lanes as the others are.
|
|
446
|
+
Style keys `"MainTitle.name"` apply to it alone, `"FigureTitle.name"` to every figure
|
|
447
|
+
title.
|
|
448
|
+
* `p.save()` (one plot alone) leaves out the figure titles, legends and colorbars.
|
|
380
449
|
|
|
381
450
|
<!-- settings:FigureTitle -->
|
|
382
451
|
| Setting | Default | Meaning |
|
|
383
452
|
|---|---|---|
|
|
384
453
|
| `text` | — | Title text: a string or rich content; `\n` starts a line. |
|
|
454
|
+
| `side` | 'top' | `top`, `bottom`, `left` or `right`. |
|
|
455
|
+
| `align` | 'center' | Alignment along the side: `start`, `center`, `end` (`left` and `right`: `start` and `end`); along the left and right sides, `start` is where rotated text begins (the bottom at 90, the top at −90 and 0). |
|
|
456
|
+
| `over` | 'axes' | Span it is aligned and wrapped within: from the first to the last axes of its plots, their boxes, or the whole figure. |
|
|
457
|
+
| `rotation` | 'auto' | `auto`: 0 on top and bottom, 90 on the left (reads upward), −90 on the right (reads downward); or 0, 90, −90. |
|
|
458
|
+
| `pad` | '0.5em' | Gap between the title and the plots. Length. |
|
|
459
|
+
| `order` | — | Place in its side's lanes: lower is nearer the plots; unset: a title nested in another nearer, then creation order. |
|
|
460
|
+
| `rule` | False | A line along the span: `True` or `"inside"` between the title and what it covers, `"outside"` beyond the title, `False` none. |
|
|
461
|
+
| `rule_color` | 'var(color)' | Color of the rule. |
|
|
462
|
+
| `rule_width` | 'var(line_width)' | Thickness of the rule. Length. |
|
|
463
|
+
| `rule_gap` | '0.5em' | Gap between the rule and the title. Length; `%`: of the font size. |
|
|
385
464
|
| `font_size` | '1em' | Font size; default the base font size. Length; `%`: of the parent's font size. |
|
|
386
465
|
| `font_weight` | 'bold' | `normal`, `bold` or a weight 1–1000. |
|
|
387
466
|
| `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
|
|
388
|
-
| `align` | 'center' | Alignment. |
|
|
389
|
-
| `over` | 'axes' | Width it is aligned and wrapped within: from the leftmost to the rightmost axes, or the whole figure. |
|
|
390
|
-
| `pad` | '0.5em' | Gap between the title and the plots; default half the font size. Length. |
|
|
391
467
|
| `color` | 'var(text_color)' | Text color. |
|
|
392
|
-
| `
|
|
393
|
-
| `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
|
|
468
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
394
469
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
395
470
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
396
471
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
472
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
473
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
397
474
|
|
|
398
475
|
Groups: `TextStyle`, `Font`.
|
|
399
476
|
<!-- /settings -->
|
|
@@ -411,7 +488,8 @@ the same column span) or `"row"` (the same row span). `share` sets both; `"grid"
|
|
|
411
488
|
per column and y per row. A plot's own `share_x`, `share_y` or `share` (another plot)
|
|
412
489
|
overrides the figure's groups for it; groups chain. Colorbars and plots without axes are
|
|
413
490
|
never in a group. `share_color` and `share_size` group plots the same way for their
|
|
414
|
-
series' color and size axes ([color and size axes](#6-color-and-size-axes))
|
|
491
|
+
series' color and size axes ([color and size axes](#6-color-and-size-axes)), and
|
|
492
|
+
`share_legend` for one legend of their entries ([figure legends](#figure-legends)).
|
|
415
493
|
|
|
416
494
|
Within a group the scale (which must be equal), the limits (from all members' series,
|
|
417
495
|
then padding, `include_zero` and `snap`; one explicit `limits` applies to the group, two
|
|
@@ -451,9 +529,15 @@ fig.vspan(-1, 1) # under every plot
|
|
|
451
529
|
label: beside its axis or in the band. Tracks put theirs in the band. A plot's
|
|
452
530
|
`space_above` adds space above it.
|
|
453
531
|
* **Groups.** `fig.group(first, last=None, **settings)`: plots `first` to `last` (plots
|
|
454
|
-
or their series, in creation order)
|
|
455
|
-
|
|
456
|
-
|
|
532
|
+
or their series, in creation order). Its `label` is a left [figure title](#figure-title)
|
|
533
|
+
over them, reading upward, centered on their axes, in the group's font settings
|
|
534
|
+
(`font_size`, `font_family`, `text_color`, `markup`; normal weight) and `pad` from the
|
|
535
|
+
plots; it is made at each layout, in the group's creation order, and is not in
|
|
536
|
+
`fig.titles`. The plots must fill the grid rectangle they span. A bold panel `letter`
|
|
537
|
+
sits in a band left of the row labels, level with the top of the first plot's axes.
|
|
538
|
+
With a shared x axis and `label_outer`, the group's last plot shows the tick labels too
|
|
539
|
+
(the axis title stays under the bottom plot). `p.save()` leaves out the label, as other
|
|
540
|
+
figure titles.
|
|
457
541
|
* **Lines and bands.** `fig.vline(x, rows=None)` and `fig.vspan(x0, x1, rows=None)` run
|
|
458
542
|
from the top of the first of the plots `rows` (a plot, a series, or a list; all by
|
|
459
543
|
default) to the bottom of the last one, gaps included, in each grid column; `x` is in
|
|
@@ -467,7 +551,7 @@ FigureVLine:
|
|
|
467
551
|
| Setting | Default | Meaning |
|
|
468
552
|
|---|---|---|
|
|
469
553
|
| `color` | '#4d4d4d' | Line color. |
|
|
470
|
-
| `line_width` | inherited (0.
|
|
554
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
471
555
|
| `line_style` | 'dashed' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
|
|
472
556
|
| `alpha` | 1.0 | Opacity. |
|
|
473
557
|
|
|
@@ -488,16 +572,17 @@ FigureGroup:
|
|
|
488
572
|
<!-- settings:FigureGroup -->
|
|
489
573
|
| Setting | Default | Meaning |
|
|
490
574
|
|---|---|---|
|
|
491
|
-
| `label` | — | Group label
|
|
492
|
-
| `letter` | — | Panel letter at the group's top left. |
|
|
575
|
+
| `label` | — | Group label: a left figure title over the group's plots, reading upward, centered on their axes. |
|
|
576
|
+
| `letter` | — | Panel letter at the group's top left, left of the row labels. |
|
|
493
577
|
| `font_size` | '1em' | Font size of the label. Length; `%`: of the parent's font size. |
|
|
494
578
|
| `letter_font_size` | '1.4em' | Font size of the letter. Length; `%`: of the font size. |
|
|
495
579
|
| `letter_weight` | 'bold' | Weight of the letter. |
|
|
496
|
-
| `pad` | '0.5em' | Gap right of the
|
|
497
|
-
| `font_family` | inherited ('
|
|
580
|
+
| `pad` | '0.5em' | Gap right of the letter, and the label's `pad` (its gap to the plots). Length; `%`: of the font size. |
|
|
581
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
498
582
|
| `text_color` | inherited ('black') | Text color. |
|
|
583
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
499
584
|
|
|
500
|
-
Groups: `TextStyle` (`letter_`)
|
|
585
|
+
Groups: `TextStyle` (`letter_`), `Font`.
|
|
501
586
|
<!-- /settings -->
|
|
502
587
|
|
|
503
588
|
### Facets
|
|
@@ -526,9 +611,10 @@ panels. `wrap` wraps `col` alone into rows of that many panels. Panels are title
|
|
|
526
611
|
column, y per row, outer labels only), `share_color` (default `"all"`: the panels'
|
|
527
612
|
color axes train as one; a `color_map`, `color_limits` or `color_scale` given to the
|
|
528
613
|
call goes to each series alike) and `share_size` (default `"all"`: one size axis, so
|
|
529
|
-
one size key
|
|
614
|
+
one size key) and `share_legend` (default `"all"`: one legend for the panels' entries,
|
|
615
|
+
on the right, [figure legends](#figure-legends)).
|
|
530
616
|
* **Colorbar.** `colorbar="right"`, `"left"`, `"top"` or `"bottom"` adds a column (or a
|
|
531
|
-
row, with a horizontal
|
|
617
|
+
row, with a horizontal colorbar) to the grid, holding the colorbar of the first call that maps
|
|
532
618
|
colors (`panels.colorbar`): the guide of the panels' shared color axis.
|
|
533
619
|
* `panels.panels` maps facet keys (a value, or `(row value, col value)`) to plots;
|
|
534
620
|
`panels.plot(key)` returns one; iterating the set gives the plots; `panels.subsets()`
|
|
@@ -553,26 +639,27 @@ panels. `wrap` wraps `col` alone into rows of that many panels. Panels are title
|
|
|
553
639
|
| `spacing` | 13.0 | Minimum gap between neighbouring plots. Length; `%`: of the figure width (across) or height (down). |
|
|
554
640
|
| `margin` | 5.0 | Space around the figure. Length; `%`: of the figure width (across) or height (down). |
|
|
555
641
|
| `background` | 'white' | Figure background, default white; `None` or `"none"`: transparent (white in JPEG, which has no transparency). |
|
|
556
|
-
| `dpi` |
|
|
642
|
+
| `dpi` | 384.0 | Resolution of PNG, JPEG, JPEG XL and AVIF output: `96` gives one image pixel per px, the default `384` four; up to 16, a multiple of 96 (`2` is 192). |
|
|
557
643
|
| `quality` | 'auto' | Quality (1–100), as vec_io's: of PNG output (a lossy palette of at most 256 colors), JPEG, JPEG XL and AVIF output, and of rasterized content in PDFs (stored as JPEG); `"lossless"` (not JPEG); `"auto"`: 90 for PNG and JPEG, lossless for JPEG XL, AVIF and PDF content. |
|
|
558
|
-
| `title_rule_color` | — | Color of a rule above the figure title, across its width (The Economist's red bar); default none. |
|
|
559
|
-
| `title_rule_width` | 4.0 | Thickness of the title rule. Length. |
|
|
560
644
|
| `share_x` | — | Plots sharing their x axis: `False`, `True`/`"all"`, `"col"` (same column span) or `"row"` (same row span). |
|
|
561
645
|
| `share_y` | — | Plots sharing their y axis, as `share_x`. |
|
|
562
646
|
| `share` | — | Both axes at once: as `share_x`, or `"grid"` (x per column, y per row); `share_x`/`share_y` override it. |
|
|
563
647
|
| `share_color` | False | Plots whose series' own color axes are one (limits over all their values), as `share_x`. |
|
|
564
648
|
| `share_size` | False | Plots whose series' own size axes are one (limits over all their values, one size key), as `share_x`. |
|
|
649
|
+
| `share_legend` | False | Legends shared by plots, made by the figure: `False`, `True`/`"all"` (one on the right of the figure), `"row"` (one on the right of each row), `"col"` (one at the bottom of each column). |
|
|
565
650
|
| `label_outer` | — | Tick labels and axis titles of shared axes only on the outer plots (bottom of each column, left of each row); default `True` for groups from the figure's settings, `False` for plots paired with `share_x=plot`. |
|
|
566
651
|
| `style` | — | A style name (`"ggplot2"`, …) or a dict of settings with an optional `"base"`; default: the session style (`set_style`, `use_style`), else `"default"`. |
|
|
567
652
|
| `vars` | — | Custom variables, read by `var(--name)` in any setting here and below: `{"accent": "#c00"}`. |
|
|
568
653
|
| `scaling` | 1.0 | Multiplies every font size, line width, marker size, tick length and pad of the style; default 1. |
|
|
569
654
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
570
|
-
| `font_family` | inherited ('
|
|
655
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
571
656
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
572
657
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
573
658
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
659
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
660
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
574
661
|
| `text_color` | inherited ('black') | Text color. |
|
|
575
|
-
| `line_width` | inherited (0.
|
|
662
|
+
| `line_width` | inherited (0.5) | Default line width. Length. |
|
|
576
663
|
| `palette` | inherited ('tab10_custom') | Colors of series without one. |
|
|
577
664
|
| `alpha` | inherited (1.0) | Default opacity of series. |
|
|
578
665
|
| `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
|
|
@@ -586,7 +673,7 @@ panels. `wrap` wraps `col` alone into rows of that many panels. Panels are title
|
|
|
586
673
|
| `suffix` | inherited ('') | Text after every number. |
|
|
587
674
|
| `precision` | inherited (None) | Significant digits of `auto`, `sci`, `eng`, `si` (unset: as needed). |
|
|
588
675
|
|
|
589
|
-
Groups: `
|
|
676
|
+
Groups: `Font`, `NumberFormat`.
|
|
590
677
|
<!-- /settings -->
|
|
591
678
|
|
|
592
679
|
## 3. Plots
|
|
@@ -596,7 +683,8 @@ pl.Plot(figure=None, id=None, **settings) # title="…", x_axis={…}, y_axis=
|
|
|
596
683
|
p.scatter(x, y, **s) p.line(x, y=None, **s) p.fill(x, y1, y2=0, **s)
|
|
597
684
|
p.box(values, **s) p.heatmap(values, **s) p.colorbar(source=None, **s)
|
|
598
685
|
p.title(text, **s) p.x_axis(label, **s) p.y_axis(label, **s) p.legend(position, **s)
|
|
599
|
-
p.
|
|
686
|
+
p.add_title(text, side="top", **s) # another title, returned
|
|
687
|
+
p.series p.titles p.colorbars p.figure p.id
|
|
600
688
|
```
|
|
601
689
|
|
|
602
690
|
`p.title`, `p.x_axis`, `p.y_axis` and `p.legend` are objects; calling one sets its
|
|
@@ -612,7 +700,7 @@ axes clip.
|
|
|
612
700
|
| `data_ratio` | — | Data aspect ratio: 1 makes one unit as long on both axes. |
|
|
613
701
|
| `background` | — | Background color of the axes area. |
|
|
614
702
|
| `border_color` | — | Color of a frame around the axes area (drawn under the axis lines); default none. |
|
|
615
|
-
| `border_width` | 0.
|
|
703
|
+
| `border_width` | 0.5 | Width of the frame. Length. |
|
|
616
704
|
| `clip` | True | Clip series to the axes area. |
|
|
617
705
|
| `axes` | True | Draw axes; `False` hides both axes, drops padding and fixes the aspect to 1 (set by pie charts). |
|
|
618
706
|
| `share_x` | — | Another plot of the figure whose x axis this plot shares (groups chain); overrides the figure's `share_x`. |
|
|
@@ -621,12 +709,14 @@ axes clip.
|
|
|
621
709
|
| `share` | — | Another plot whose x and y axes this plot shares. |
|
|
622
710
|
| `space_above` | 0.0 | Space above the plot, beyond the figure's `spacing`. Length; `%`: of the font size. |
|
|
623
711
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
624
|
-
| `font_family` | inherited ('
|
|
712
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
625
713
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
626
714
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
627
715
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
716
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
717
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
628
718
|
| `text_color` | inherited ('black') | Text color. |
|
|
629
|
-
| `line_width` | inherited (0.
|
|
719
|
+
| `line_width` | inherited (0.5) | Default line width. Length. |
|
|
630
720
|
| `palette` | inherited ('tab10_custom') | Colors of series without one. |
|
|
631
721
|
| `alpha` | inherited (1.0) | Default opacity of series. |
|
|
632
722
|
| `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
|
|
@@ -645,21 +735,49 @@ Groups: `Stroke` (`border_`), `Font`, `NumberFormat`.
|
|
|
645
735
|
|
|
646
736
|
### Title
|
|
647
737
|
|
|
738
|
+
```python
|
|
739
|
+
p.title("Yield") # the main title
|
|
740
|
+
p.add_title("Subtitle", order=-1) # between the main title and the axes
|
|
741
|
+
p.add_title("n = 120", side="bottom", align="start")
|
|
742
|
+
p.add_title("Batch 1", side="left", rule=True)
|
|
743
|
+
```
|
|
744
|
+
|
|
745
|
+
A plot has a main title (`p.title`) and any number of others (`p.add_title`, which
|
|
746
|
+
returns the title; `p.titles` lists them, main first), each on a `side` of the plot.
|
|
747
|
+
The titles of one side stack outward from the axes, outermost of the side's bands (past
|
|
748
|
+
the axis, twin axes, an outside legend and attached colorbars): the main title nearest,
|
|
749
|
+
then the others in creation order; `order` places a title elsewhere, lower nearer
|
|
750
|
+
(`order=-1`: a subtitle between the main title and the axes). Each takes a band of its
|
|
751
|
+
`pad`, its text across the side and, with a `rule`, `rule_width + rule_gap`; the rule runs
|
|
752
|
+
along its span (`over`). `\n` starts a line, `line_height` apart; the last line is
|
|
753
|
+
nearest the axes on top and on the left and right, the first at the bottom. Left titles
|
|
754
|
+
read upward, right titles downward (`rotation="auto"`); `rotation=0` sets them
|
|
755
|
+
horizontal, beside the axes.
|
|
756
|
+
|
|
648
757
|
<!-- settings:Title -->
|
|
649
758
|
| Setting | Default | Meaning |
|
|
650
759
|
|---|---|---|
|
|
651
|
-
| `text` | — | Title text: a string or rich content. |
|
|
760
|
+
| `text` | — | Title text: a string or rich content; `\n` starts a line. |
|
|
761
|
+
| `side` | 'top' | `top`, `bottom`, `left` or `right`. |
|
|
762
|
+
| `align` | 'center' | Alignment along the side: `start`, `center`, `end` (`left` and `right`: `start` and `end`); along the left and right sides, `start` is where rotated text begins (the bottom at 90, the top at −90 and 0). |
|
|
763
|
+
| `over` | 'axes' | Span the title is aligned within: the axes, or the axes and the axis labels beside them (the y axis' on top and bottom, the x axis' on the left and right). |
|
|
764
|
+
| `rotation` | 'auto' | `auto`: 0 on top and bottom, 90 on the left (reads upward), −90 on the right (reads downward); or 0, 90, −90. |
|
|
765
|
+
| `pad` | 5.0 | Gap between the title and what it covers. Length; `%`: of the axes height. |
|
|
766
|
+
| `order` | — | Place in its side's stack: lower is nearer; unset: the main title nearest, then the others in creation order. |
|
|
767
|
+
| `rule` | False | A line along the span: `True` or `"inside"` between the title and what it covers, `"outside"` beyond the title, `False` none. |
|
|
768
|
+
| `rule_color` | 'var(color)' | Color of the rule. |
|
|
769
|
+
| `rule_width` | 'var(line_width)' | Thickness of the rule. Length. |
|
|
770
|
+
| `rule_gap` | '0.5em' | Gap between the rule and the title. Length; `%`: of the font size. |
|
|
652
771
|
| `font_size` | '1em' | Font size; default the base font size. Length; `%`: of the parent's font size. |
|
|
653
772
|
| `font_weight` | 'normal' | `normal`, `bold` or a weight 1–1000. |
|
|
654
773
|
| `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
|
|
655
774
|
| `color` | 'var(text_color)' | Text color. |
|
|
656
|
-
| `
|
|
657
|
-
| `pad` | 5.0 | Gap above the axes. Length; `%`: of the axes height. |
|
|
658
|
-
| `over` | 'axes' | Width the title is aligned within: the axes, or the axes and the y axis labels. |
|
|
659
|
-
| `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
|
|
775
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
660
776
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
661
777
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
662
778
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
779
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
780
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
663
781
|
|
|
664
782
|
Groups: `TextStyle`, `Font`.
|
|
665
783
|
<!-- /settings -->
|
|
@@ -720,14 +838,67 @@ candidate covers more than 2 % marked cells; else the candidate covering the few
|
|
|
720
838
|
| `column_gap` | '1em' | Gap between columns. Length; `%`: of the font size. |
|
|
721
839
|
| `title_gap` | '0.3em' | Gap below the title. Length; `%`: of the font size. |
|
|
722
840
|
| `inner_pad` | 'auto' | Space inside the box; `"auto"`: 0.5em with a frame, 0.15em without. Length; `%`: of the font size. |
|
|
723
|
-
| `font_family` | inherited ('
|
|
841
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
724
842
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
725
843
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
726
844
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
845
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
846
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
727
847
|
|
|
728
848
|
Groups: `TextStyle`, `Stroke` (`frame_`), `Font`.
|
|
729
849
|
<!-- /settings -->
|
|
730
850
|
|
|
851
|
+
#### Figure legends
|
|
852
|
+
|
|
853
|
+
```python
|
|
854
|
+
fig.add_legend(plots=[a, b], side="right", **settings) # returns it
|
|
855
|
+
fig.add_legend() # every plot, on the right
|
|
856
|
+
fig.legends
|
|
857
|
+
fig = pl.Figure(cols=2, share_legend="row") # one legend per row
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
A figure legend shows the entries of a set of plots (plots or their series; default every
|
|
861
|
+
plot) in one legend, in the lanes beside them as [figure titles](#figure-title) are: its
|
|
862
|
+
plots' cells must fill the grid rectangle they span (a plot inside it but not given is an
|
|
863
|
+
error naming it).
|
|
864
|
+
|
|
865
|
+
* **Entries.** Its plots' entries, in plot order (row by row), then in series order.
|
|
866
|
+
Entries with the same label and the same symbol (what the legend draws for them: kind,
|
|
867
|
+
colors, marker, line style and width) are one entry; the same label with another
|
|
868
|
+
symbol keeps both. A size key whose series' plots the legend all covers goes into it
|
|
869
|
+
(the first such legend), one key per shared size axis as in a plot legend.
|
|
870
|
+
* **Plot legends.** Its plots' legends lose those entries, and a plot left without
|
|
871
|
+
entries shows no legend. A plot whose `legend.position` is set keeps its legend whole
|
|
872
|
+
(the figure legend shows its entries too).
|
|
873
|
+
* **Place.** `side` (`top`, `bottom`, `left`, `right`) and `align` along the side
|
|
874
|
+
(`start`, `center`, `end`) within the axes of its plots, kept within the figure; the
|
|
875
|
+
figure grows when the legend is longer than its content. On top and bottom, entries
|
|
876
|
+
are side by side in rows as wide as the span (unless `columns` is set); on the left and
|
|
877
|
+
right, in a column (`columns`).
|
|
878
|
+
* **Lanes.** Legends and figure titles share the lanes and their rules (nesting, then
|
|
879
|
+
shared lanes for disjoint spans, then creation order; `order` overrides); over the same
|
|
880
|
+
plots, a legend is nearer the plots than a title. A legend without entries takes no
|
|
881
|
+
lane.
|
|
882
|
+
* **`share_legend`** (`False`, `True`/`"all"`, `"row"`, `"col"`) makes figure legends for
|
|
883
|
+
the groups `share_color` would make (two plots or more): one on the right of the
|
|
884
|
+
figure (`"all"`), of each row (`"row"`), one at the bottom of each column (`"col"`).
|
|
885
|
+
A group with a plot an `add_legend` legend covers gets none. They take the
|
|
886
|
+
`FigureLegend` (and `Legend`) keys of the style, but their `side`.
|
|
887
|
+
* `p.save()` (one plot alone) leaves out figure legends: the plot's legend shows all its
|
|
888
|
+
entries.
|
|
889
|
+
|
|
890
|
+
Figure legends have the settings of plot legends but `position`, `orientation`, and:
|
|
891
|
+
|
|
892
|
+
<!-- settings:FigureLegend -->
|
|
893
|
+
| Setting | Default | Meaning |
|
|
894
|
+
|---|---|---|
|
|
895
|
+
| `side` | 'right' | `top`, `bottom`, `left` or `right` of its plots. |
|
|
896
|
+
| `align` | 'center' | Alignment along the side: `start` (left, or top), `center`, `end` (right, or bottom). |
|
|
897
|
+
| `order` | — | Place in its side's lanes, as figure titles' `order`: lower is nearer the plots. |
|
|
898
|
+
| `pad` | 5.0 | Gap between the legend and the plots. Length. |
|
|
899
|
+
| `title` | 'auto' | Legend title; `"auto"`: the `group` column name of its plots' series, if any. |
|
|
900
|
+
<!-- /settings -->
|
|
901
|
+
|
|
731
902
|
### Decorations
|
|
732
903
|
|
|
733
904
|
Reference lines, bands, text and annotations. They take no palette color, are in the
|
|
@@ -755,7 +926,7 @@ HLine:
|
|
|
755
926
|
| Setting | Default | Meaning |
|
|
756
927
|
|---|---|---|
|
|
757
928
|
| `color` | '#4d4d4d' | Line color. |
|
|
758
|
-
| `line_width` | inherited (0.
|
|
929
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
759
930
|
| `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
|
|
760
931
|
| `min` | '0%' | Start: a data value, or `%` (or a length) from the start of the axes. Length; `%`: of the axes length along the axis; bare numbers: data units. |
|
|
761
932
|
| `max` | '100%' | End: a data value, or `%` (or a length) from the start of the axes. Length; `%`: of the axes length along the axis; bare numbers: data units. |
|
|
@@ -774,7 +945,7 @@ AxLine:
|
|
|
774
945
|
| Setting | Default | Meaning |
|
|
775
946
|
|---|---|---|
|
|
776
947
|
| `color` | '#4d4d4d' | Line color. |
|
|
777
|
-
| `line_width` | inherited (0.
|
|
948
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
778
949
|
| `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
|
|
779
950
|
| `name` | — | Legend entry; unset: not in the legend. |
|
|
780
951
|
| `alpha` | 1.0 | Opacity. |
|
|
@@ -815,10 +986,12 @@ Text:
|
|
|
815
986
|
| `coords` | 'data' | `data`, `axes` (0–1) or `figure` (0–1). |
|
|
816
987
|
| `color` | 'var(text_color)' | Text color; default `text_color`. |
|
|
817
988
|
| `font_size` | inherited (11.0) | Font size. Length; `%`: of the parent's font size. |
|
|
818
|
-
| `font_family` | inherited ('
|
|
989
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
819
990
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
820
991
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
821
992
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
993
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
994
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
822
995
|
| `font_weight` | 'normal' | `normal`, `bold` or a weight 1–1000. |
|
|
823
996
|
| `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
|
|
824
997
|
| `text_color` | inherited ('black') | Text color. |
|
|
@@ -842,7 +1015,7 @@ Annotate:
|
|
|
842
1015
|
| `arrow` | True | Draw an arrow from the text to `xy`. |
|
|
843
1016
|
| `arrow_style` | '->' | `->` (open head), `-\|>` (filled head) or `-` (no head). |
|
|
844
1017
|
| `arrow_color` | 'var(color)' | Arrow color; default the text color. |
|
|
845
|
-
| `arrow_width` | 0.
|
|
1018
|
+
| `arrow_width` | 0.5 | Arrow line width. Length. |
|
|
846
1019
|
| `head_length` | 7.0 | Arrowhead length. Length. |
|
|
847
1020
|
| `shrink` | 3.0 | Gap left at both ends of the arrow. Length. |
|
|
848
1021
|
|
|
@@ -944,9 +1117,6 @@ grid only when its axis asks). `p.save` includes its twins.
|
|
|
944
1117
|
* `tick_format` takes any [number format](#number-formats); the default `"auto"` is the
|
|
945
1118
|
rule above.
|
|
946
1119
|
|
|
947
|
-
Category axes of heatmaps draw labels only (no axis line or ticks) unless `tick_length`
|
|
948
|
-
or the plot's `spines` is set.
|
|
949
|
-
|
|
950
1120
|
* **Grid lines:** `grid` at the major ticks, `minor_grid` at the minor ticks (or halfway
|
|
951
1121
|
between major ticks on linear axes without minor ticks), and `zero_line` at 0 (when 0
|
|
952
1122
|
is within the limits), under the series.
|
|
@@ -990,19 +1160,19 @@ or the plot's `spines` is set.
|
|
|
990
1160
|
| `category_label_spacing` | ('1.6em', '1.3em') | Distance between category labels: rotated (horizontal axes) and stacked (vertical axes); labels closer than it are thinned out. Length; `em` and `%`: of `tick_label_font_size`. |
|
|
991
1161
|
| `auto_max_ticks` | (10, 8) | Most automatic ticks on numeric and time axes. |
|
|
992
1162
|
| `sci_limits` | (-4, 5) | Exponents beyond which labels become mantissas × 10ᵏ. |
|
|
993
|
-
| `tick_length` |
|
|
1163
|
+
| `tick_length` | 6.0 | Tick length. Length; `%`: of the axes side across the axis. |
|
|
994
1164
|
| `minor_tick_length` | '60%' | Minor tick length; default 0.6 × `tick_length`. Length; `%`: of `tick_length`. |
|
|
995
1165
|
| `tick_direction` | 'out' | `out`, `in` or `both`. |
|
|
996
1166
|
| `tick_color` | 'var(color)' | Tick color. |
|
|
997
|
-
| `tick_width` | 0.
|
|
1167
|
+
| `tick_width` | 0.5 | Tick line width. Length. |
|
|
998
1168
|
| `tick_label_font_size` | '1em' | Font size of tick labels. Length; `%`: of the font size. |
|
|
999
1169
|
| `tick_label_weight` | 'normal' | Tick label weight: `normal`, `bold` or 1–1000. |
|
|
1000
1170
|
| `tick_label_color` | 'var(color)' | Tick label color. |
|
|
1001
|
-
| `tick_pad` |
|
|
1002
|
-
| `label_pad` |
|
|
1171
|
+
| `tick_pad` | 5.0 | Gap between ticks and labels. Length; `%`: of the axes side across the axis. |
|
|
1172
|
+
| `label_pad` | 5.0 | Gap between tick labels and the label. Length; `%`: of the axes side across the axis. |
|
|
1003
1173
|
| `color` | 'var(text_color)' | Color of the axis line, ticks and labels (the default of `line_color`, `tick_color`, `tick_label_color`, `label_color`). |
|
|
1004
1174
|
| `line_color` | 'var(color)' | Axis line color. |
|
|
1005
|
-
| `line_width` | 0.
|
|
1175
|
+
| `line_width` | 0.5 | Axis line width. Length. |
|
|
1006
1176
|
| `side` | x: 'bottom' / y: 'left' | Where the ticks, labels and axis line go: `bottom` or `top` (x axis), `left` or `right` (y axis). |
|
|
1007
1177
|
| `mirror` | False | Ticks also on the opposite side of the axes. |
|
|
1008
1178
|
| `spine_offset` | 0.0 | Distance the axis line (with its ticks and labels) is moved away from the axes. Length; `%`: of the axes side across the axis. |
|
|
@@ -1022,10 +1192,12 @@ or the plot's `spines` is set.
|
|
|
1022
1192
|
| `minor_grid_style` | 'var(grid_style)' | Minor grid style; default `grid_style`. Length. |
|
|
1023
1193
|
| `visible` | True | Draw the axis (ticks, labels). |
|
|
1024
1194
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1025
|
-
| `font_family` | inherited ('
|
|
1195
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1026
1196
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1027
1197
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1028
1198
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1199
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1200
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1029
1201
|
| `text_color` | inherited ('black') | Text color. |
|
|
1030
1202
|
| `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
|
|
1031
1203
|
| `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
|
|
@@ -1160,7 +1332,7 @@ the style's map); numbers in `size` are diameters, or values mapped through `siz
|
|
|
1160
1332
|
| `size` | 4.5 | Marker size: the diameter of the circle of equal area; one value or one per point; numbers per point are values to map when `size_map` is set; or `"density"`. Length. |
|
|
1161
1333
|
| `color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
|
|
1162
1334
|
| `edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
|
|
1163
|
-
| `edge_width` | 0.
|
|
1335
|
+
| `edge_width` | 0.5 | Outline width; 0: no outline. Length. |
|
|
1164
1336
|
| `fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color; an opacity (0–1): filled at that opacity and outlined in the color. |
|
|
1165
1337
|
| `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
|
|
1166
1338
|
| `color_map` | inherited ('rainbow_llhh') | The gradient numbers given as colors are drawn with: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
|
|
@@ -1184,10 +1356,12 @@ the style's map); numbers in `size` are diameters, or values mapped through `siz
|
|
|
1184
1356
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1185
1357
|
| `text_color` | inherited ('black') | Text color. |
|
|
1186
1358
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1187
|
-
| `font_family` | inherited ('
|
|
1359
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1188
1360
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1189
1361
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1190
1362
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1363
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1364
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1191
1365
|
|
|
1192
1366
|
Groups: `Marker`, `Font`.
|
|
1193
1367
|
<!-- /settings -->
|
|
@@ -1219,7 +1393,7 @@ gradient's middle color.
|
|
|
1219
1393
|
| Setting | Default | Meaning |
|
|
1220
1394
|
|---|---|---|
|
|
1221
1395
|
| `color` | — | Line color; default: the next palette color. |
|
|
1222
|
-
| `line_width` | inherited (0.
|
|
1396
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
1223
1397
|
| `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list; named styles scale with the width. Length. |
|
|
1224
1398
|
| `cap` | 'butt' | Line cap. |
|
|
1225
1399
|
| `join` | 'round' | Line join. |
|
|
@@ -1229,7 +1403,7 @@ gradient's middle color.
|
|
|
1229
1403
|
| `marker_size` | 4.5 | Marker size: the diameter of the circle of equal area, in px; one value or one per point. Length. |
|
|
1230
1404
|
| `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
|
|
1231
1405
|
| `marker_edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
|
|
1232
|
-
| `marker_edge_width` | 0.
|
|
1406
|
+
| `marker_edge_width` | 0.5 | Outline width; 0: no outline. Length. |
|
|
1233
1407
|
| `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color; an opacity (0–1): filled at that opacity and outlined in the color. |
|
|
1234
1408
|
| `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
|
|
1235
1409
|
| `color_map` | inherited ('rainbow_llhh') | The gradient numbers given as colors are drawn with: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
|
|
@@ -1247,10 +1421,12 @@ gradient's middle color.
|
|
|
1247
1421
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1248
1422
|
| `text_color` | inherited ('black') | Text color. |
|
|
1249
1423
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1250
|
-
| `font_family` | inherited ('
|
|
1424
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1251
1425
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1252
1426
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1253
1427
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1428
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1429
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1254
1430
|
|
|
1255
1431
|
Groups: `Stroke`, `Marker` (`marker_`), `Font`.
|
|
1256
1432
|
<!-- /settings -->
|
|
@@ -1284,10 +1460,12 @@ each side in its color).
|
|
|
1284
1460
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1285
1461
|
| `text_color` | inherited ('black') | Text color. |
|
|
1286
1462
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1287
|
-
| `font_family` | inherited ('
|
|
1463
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1288
1464
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1289
1465
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1290
1466
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1467
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1468
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1291
1469
|
|
|
1292
1470
|
Groups: `Stroke` (`edge_`), `Font`.
|
|
1293
1471
|
<!-- /settings -->
|
|
@@ -1315,7 +1493,7 @@ category.
|
|
|
1315
1493
|
| `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
|
|
1316
1494
|
| `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
|
|
1317
1495
|
| `edge_color` | 'series' | Box outline, whiskers, caps and median: a color, `"series"` (each box's own color) or `"auto"` (a grey 0.6 × as light as the series' lightest color, as seaborn). |
|
|
1318
|
-
| `edge_width` | 0.
|
|
1496
|
+
| `edge_width` | 0.5 | Outline width. Length. |
|
|
1319
1497
|
| `whisker_color` | — | Whisker and cap color; default `edge_color`. |
|
|
1320
1498
|
| `whisker_width` | 'var(edge_width)' | Whisker and cap width; default `edge_width`. Length. |
|
|
1321
1499
|
| `whisker_style` | 'solid' | Whisker line style: `solid`, `dashed`, `dotted`, `dashdot` or a dash list (caps stay solid). Length. |
|
|
@@ -1349,10 +1527,12 @@ category.
|
|
|
1349
1527
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1350
1528
|
| `text_color` | inherited ('black') | Text color. |
|
|
1351
1529
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1352
|
-
| `font_family` | inherited ('
|
|
1530
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1353
1531
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1354
1532
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1355
1533
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1534
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1535
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1356
1536
|
|
|
1357
1537
|
Groups: `Stroke` (`edge_`), `Stroke` (`whisker_`), `Stroke` (`median_`), `FillStyle`, `Marker` (`marker_`), `Font`.
|
|
1358
1538
|
<!-- /settings -->
|
|
@@ -1393,10 +1573,12 @@ all cells), in black or white, whichever contrasts more (at most 2,500 cells unl
|
|
|
1393
1573
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1394
1574
|
| `text_color` | inherited ('black') | Text color. |
|
|
1395
1575
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1396
|
-
| `font_family` | inherited ('
|
|
1576
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1397
1577
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1398
1578
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1399
1579
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1580
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1581
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1400
1582
|
| `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
|
|
1401
1583
|
| `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
|
|
1402
1584
|
| `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
|
|
@@ -1437,7 +1619,7 @@ pl.Bar(x, height=None, plot=None, **settings)
|
|
|
1437
1619
|
| `saturation` | 1.0 | Saturation of the fills (seaborn: 0.75). |
|
|
1438
1620
|
| `error` | — | Error bars at the bar ends: a value, a sequence, `(low, high)` or `ErrorBars`. |
|
|
1439
1621
|
| `error_color` | '#333333' | Error bar color. |
|
|
1440
|
-
| `error_width` | 0.
|
|
1622
|
+
| `error_width` | 0.5 | Error bar line width. Length. |
|
|
1441
1623
|
| `value_labels` | False | Value labels: `True`/`"outside"`, `"inside"`, `"center"`. Outside labels widen automatic limits so they fit in the axes; a label too large for its bar goes outside, or is left out on a stacked bar. |
|
|
1442
1624
|
| `value_label_format` | 'auto' | Number format of the value labels. |
|
|
1443
1625
|
| `name` | — | Legend entry; unset: not in the legend. |
|
|
@@ -1447,10 +1629,12 @@ pl.Bar(x, height=None, plot=None, **settings)
|
|
|
1447
1629
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1448
1630
|
| `text_color` | inherited ('black') | Text color. |
|
|
1449
1631
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1450
|
-
| `font_family` | inherited ('
|
|
1632
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1451
1633
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1452
1634
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1453
1635
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1636
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1637
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1454
1638
|
| `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
|
|
1455
1639
|
| `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
|
|
1456
1640
|
| `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
|
|
@@ -1486,7 +1670,7 @@ pl.Hist(values, plot=None, **settings)
|
|
|
1486
1670
|
| `edge_color` | — | Bar outline color; default none. |
|
|
1487
1671
|
| `edge_width` | 0.0 | Bar outline width. Length. |
|
|
1488
1672
|
| `line_color` | — | Step and outline color; default each set's color. |
|
|
1489
|
-
| `line_width` | inherited (0.
|
|
1673
|
+
| `line_width` | inherited (0.5) | Step line width. Length. |
|
|
1490
1674
|
| `outline` | True | `bar` and `stepfilled` kinds: the outer outline of each set, in `line_color` (dodged bars: each bar's outline). |
|
|
1491
1675
|
| `alpha` | 'auto' | Opacity; `"auto"`: 0.5 for overlaid sets, else the plot's. |
|
|
1492
1676
|
| `saturation` | 1.0 | Saturation of the fills. |
|
|
@@ -1498,10 +1682,12 @@ pl.Hist(values, plot=None, **settings)
|
|
|
1498
1682
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1499
1683
|
| `text_color` | inherited ('black') | Text color. |
|
|
1500
1684
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1501
|
-
| `font_family` | inherited ('
|
|
1685
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1502
1686
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1503
1687
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1504
1688
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1689
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1690
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1505
1691
|
| `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
|
|
1506
1692
|
| `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
|
|
1507
1693
|
| `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
|
|
@@ -1534,7 +1720,7 @@ A Gaussian kernel density of each set on a common grid of `points` points, exten
|
|
|
1534
1720
|
| `orientation` | 'vertical' | `vertical` (values along x) or `horizontal`. |
|
|
1535
1721
|
| `stack` | False | Stack the sets (seaborn's `multiple="stack"`). |
|
|
1536
1722
|
| `color` | — | Color, or one per set; default palette colors. |
|
|
1537
|
-
| `line_width` | inherited (0.
|
|
1723
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
1538
1724
|
| `line_style` | 'solid' | Line style. Length. |
|
|
1539
1725
|
| `name` | — | Legend entry; unset: not in the legend. |
|
|
1540
1726
|
| `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
|
|
@@ -1543,10 +1729,12 @@ A Gaussian kernel density of each set on a common grid of `points` points, exten
|
|
|
1543
1729
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1544
1730
|
| `text_color` | inherited ('black') | Text color. |
|
|
1545
1731
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1546
|
-
| `font_family` | inherited ('
|
|
1732
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1547
1733
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1548
1734
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1549
1735
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1736
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1737
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1550
1738
|
|
|
1551
1739
|
Groups: `FillStyle`, `Stroke`, `Font`.
|
|
1552
1740
|
<!-- /settings -->
|
|
@@ -1596,7 +1784,7 @@ A step line through the sorted values of each set: `stat` `proportion`, `count`
|
|
|
1596
1784
|
| `complementary` | False | Plot 1 − F (survival). |
|
|
1597
1785
|
| `orientation` | 'vertical' | `vertical`: values along x; `horizontal`: along y. |
|
|
1598
1786
|
| `color` | — | Line color, or one per set; default palette colors. |
|
|
1599
|
-
| `line_width` | inherited (0.
|
|
1787
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
1600
1788
|
| `line_style` | 'solid' | Line style. Length. |
|
|
1601
1789
|
| `name` | — | Legend entry; unset: not in the legend. |
|
|
1602
1790
|
| `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
|
|
@@ -1605,10 +1793,12 @@ A step line through the sorted values of each set: `stat` `proportion`, `count`
|
|
|
1605
1793
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1606
1794
|
| `text_color` | inherited ('black') | Text color. |
|
|
1607
1795
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1608
|
-
| `font_family` | inherited ('
|
|
1796
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1609
1797
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1610
1798
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1611
1799
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1800
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1801
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1612
1802
|
|
|
1613
1803
|
Groups: `Stroke`, `Font`.
|
|
1614
1804
|
<!-- /settings -->
|
|
@@ -1630,7 +1820,7 @@ pl.Violin(values, positions=None, plot=None, **settings)
|
|
|
1630
1820
|
| `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
|
|
1631
1821
|
| `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
|
|
1632
1822
|
| `edge_color` | 'series' | Outline and inner color: a color or `"series"` (each violin's own color, at `alpha`). |
|
|
1633
|
-
| `edge_width` | 0.
|
|
1823
|
+
| `edge_width` | 0.5 | Outline width. Length. |
|
|
1634
1824
|
| `saturation` | 1.0 | Saturation of the fills. |
|
|
1635
1825
|
| `alpha` | 1.0 | Opacity of the violins. |
|
|
1636
1826
|
| `fill` | 0.25 | Fill: an opacity of each violin's color, times `alpha` (outlines keep `alpha`); `True` (opaque), a color, or `False`. |
|
|
@@ -1653,10 +1843,12 @@ pl.Violin(values, positions=None, plot=None, **settings)
|
|
|
1653
1843
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1654
1844
|
| `text_color` | inherited ('black') | Text color. |
|
|
1655
1845
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1656
|
-
| `font_family` | inherited ('
|
|
1846
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1657
1847
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1658
1848
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1659
1849
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1850
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1851
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1660
1852
|
|
|
1661
1853
|
Groups: `Stroke` (`edge_`), `FillStyle`, `Font`.
|
|
1662
1854
|
<!-- /settings -->
|
|
@@ -1677,7 +1869,7 @@ Points of each category's values: `Strip` spreads them by uniform jitter (± `ji
|
|
|
1677
1869
|
| `size` | 4.5 | Marker size: the diameter of the circle of equal area; one value or one per point; numbers per point are values to map when `size_map` is set; or `"density"`. Length. |
|
|
1678
1870
|
| `color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
|
|
1679
1871
|
| `edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
|
|
1680
|
-
| `edge_width` | 0.
|
|
1872
|
+
| `edge_width` | 0.5 | Outline width; 0: no outline. Length. |
|
|
1681
1873
|
| `fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color; an opacity (0–1): filled at that opacity and outlined in the color. |
|
|
1682
1874
|
| `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
|
|
1683
1875
|
| `color_map` | inherited ('rainbow_llhh') | The gradient numbers given as colors are drawn with: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
|
|
@@ -1706,10 +1898,12 @@ Points of each category's values: `Strip` spreads them by uniform jitter (± `ji
|
|
|
1706
1898
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1707
1899
|
| `text_color` | inherited ('black') | Text color. |
|
|
1708
1900
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1709
|
-
| `font_family` | inherited ('
|
|
1901
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1710
1902
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1711
1903
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1712
1904
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1905
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1906
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1713
1907
|
|
|
1714
1908
|
Groups: `Marker`, `Font`.
|
|
1715
1909
|
<!-- /settings -->
|
|
@@ -1740,10 +1934,12 @@ Layers (rows of `ys`, or a dict `{name: values}`, one legend entry each) stacked
|
|
|
1740
1934
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1741
1935
|
| `text_color` | inherited ('black') | Text color. |
|
|
1742
1936
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1743
|
-
| `font_family` | inherited ('
|
|
1937
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1744
1938
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1745
1939
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1746
1940
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1941
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1942
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1747
1943
|
|
|
1748
1944
|
Groups: `Stroke` (`edge_`), `Font`.
|
|
1749
1945
|
<!-- /settings -->
|
|
@@ -1763,7 +1959,7 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
|
|
|
1763
1959
|
| `marker_size` | 4.5 | Marker size: the diameter of the circle of equal area, in px; one value or one per point. Length. |
|
|
1764
1960
|
| `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
|
|
1765
1961
|
| `marker_edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
|
|
1766
|
-
| `marker_edge_width` | 0.
|
|
1962
|
+
| `marker_edge_width` | 0.5 | Outline width; 0: no outline. Length. |
|
|
1767
1963
|
| `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color; an opacity (0–1): filled at that opacity and outlined in the color. |
|
|
1768
1964
|
| `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
|
|
1769
1965
|
| `color_map` | inherited ('rainbow_llhh') | The gradient numbers given as colors are drawn with: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
|
|
@@ -1771,7 +1967,7 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
|
|
|
1771
1967
|
| `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
|
|
1772
1968
|
| `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
|
|
1773
1969
|
| `color` | — | Bar color; default: the next palette color. |
|
|
1774
|
-
| `line_width` | inherited (0.
|
|
1970
|
+
| `line_width` | inherited (0.5) | Bar width. Length. |
|
|
1775
1971
|
| `cap_length` | 4.0 | Cap width (`data`: in data units across the bar); 0: no caps. Length; `d`: data units. |
|
|
1776
1972
|
| `x_error` | — | Horizontal errors. |
|
|
1777
1973
|
| `y_error` | — | Vertical errors. |
|
|
@@ -1785,10 +1981,12 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
|
|
|
1785
1981
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1786
1982
|
| `text_color` | inherited ('black') | Text color. |
|
|
1787
1983
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1788
|
-
| `font_family` | inherited ('
|
|
1984
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1789
1985
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1790
1986
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1791
1987
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
1988
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
1989
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1792
1990
|
|
|
1793
1991
|
Groups: `Marker` (`marker_`), `Font`.
|
|
1794
1992
|
<!-- /settings -->
|
|
@@ -1816,10 +2014,10 @@ Stems from `baseline` to each value with a marker (lollipops), and a baseline li
|
|
|
1816
2014
|
| `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
|
|
1817
2015
|
| `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
|
|
1818
2016
|
| `color` | — | Stem and marker color; default: the next palette color. |
|
|
1819
|
-
| `line_width` | inherited (0.
|
|
2017
|
+
| `line_width` | inherited (0.5) | Stem width. Length. |
|
|
1820
2018
|
| `baseline` | 0.0 | Value the stems start from. |
|
|
1821
2019
|
| `baseline_color` | '#4d4d4d' | Baseline color; `none`: no baseline. |
|
|
1822
|
-
| `baseline_width` | 0.
|
|
2020
|
+
| `baseline_width` | 0.5 | Baseline width. Length. |
|
|
1823
2021
|
| `orientation` | 'vertical' | `vertical` stems (values on y) or `horizontal`. |
|
|
1824
2022
|
| `name` | — | Legend entry; unset: not in the legend. |
|
|
1825
2023
|
| `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
|
|
@@ -1828,10 +2026,12 @@ Stems from `baseline` to each value with a marker (lollipops), and a baseline li
|
|
|
1828
2026
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1829
2027
|
| `text_color` | inherited ('black') | Text color. |
|
|
1830
2028
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1831
|
-
| `font_family` | inherited ('
|
|
2029
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1832
2030
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1833
2031
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1834
2032
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
2033
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
2034
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1835
2035
|
|
|
1836
2036
|
Groups: `Marker` (`marker_`), `Stroke` (`baseline_`), `Font`.
|
|
1837
2037
|
<!-- /settings -->
|
|
@@ -1863,7 +2063,7 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
|
|
|
1863
2063
|
| `marker_size` | 4.5 | Marker size: the diameter of the circle of equal area, in px; one value or one per point. Length. |
|
|
1864
2064
|
| `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
|
|
1865
2065
|
| `marker_edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
|
|
1866
|
-
| `marker_edge_width` | 0.
|
|
2066
|
+
| `marker_edge_width` | 0.5 | Outline width; 0: no outline. Length. |
|
|
1867
2067
|
| `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color; an opacity (0–1): filled at that opacity and outlined in the color. |
|
|
1868
2068
|
| `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
|
|
1869
2069
|
| `color_map` | inherited ('rainbow_llhh') | The gradient numbers given as colors are drawn with: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
|
|
@@ -1878,10 +2078,12 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
|
|
|
1878
2078
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1879
2079
|
| `text_color` | inherited ('black') | Text color. |
|
|
1880
2080
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1881
|
-
| `font_family` | inherited ('
|
|
2081
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1882
2082
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1883
2083
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1884
2084
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
2085
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
2086
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1885
2087
|
|
|
1886
2088
|
Groups: `Stroke`, `Marker` (`marker_`), `Font`.
|
|
1887
2089
|
<!-- /settings -->
|
|
@@ -1938,10 +2140,12 @@ the axes are not counted. Colored by `cmap`; a colorbar source.
|
|
|
1938
2140
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1939
2141
|
| `text_color` | inherited ('black') | Text color. |
|
|
1940
2142
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1941
|
-
| `font_family` | inherited ('
|
|
2143
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1942
2144
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1943
2145
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1944
2146
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
2147
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
2148
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1945
2149
|
|
|
1946
2150
|
Groups: `Stroke` (`edge_`), `Font`.
|
|
1947
2151
|
<!-- /settings -->
|
|
@@ -1979,10 +2183,12 @@ Iso-lines (`lines`) and filled bands (`fill`) of a grid at nodes `x`/`y`. `level
|
|
|
1979
2183
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
1980
2184
|
| `text_color` | inherited ('black') | Text color. |
|
|
1981
2185
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
1982
|
-
| `font_family` | inherited ('
|
|
2186
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
1983
2187
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
1984
2188
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
1985
2189
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
2190
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
2191
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
1986
2192
|
| `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
|
|
1987
2193
|
| `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
|
|
1988
2194
|
| `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
|
|
@@ -2026,10 +2232,12 @@ Wedges of `values` (a sequence or a dict `{label: value}`) from `start`, on a pl
|
|
|
2026
2232
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
2027
2233
|
| `text_color` | inherited ('black') | Text color. |
|
|
2028
2234
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
2029
|
-
| `font_family` | inherited ('
|
|
2235
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
2030
2236
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
2031
2237
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
2032
2238
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
2239
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
2240
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
2033
2241
|
| `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
|
|
2034
2242
|
| `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
|
|
2035
2243
|
| `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
|
|
@@ -2081,7 +2289,7 @@ fig = pl.Figure(cols=3, share_size="all") # one size axis, one size ke
|
|
|
2081
2289
|
* **`share_size`** does the same for the own size axes: limits over all the group's
|
|
2082
2290
|
values, one `size_limits` (or `size_scale`) for the group, and one size key for the
|
|
2083
2291
|
group ([legend](#legend)). Each series keeps its `size_map`. Facet figures share size
|
|
2084
|
-
too (`"all"`).
|
|
2292
|
+
too (`"all"`). A figure legend covering every plot of a key takes the key.
|
|
2085
2293
|
* **Training.** Before the layout, each axis is resolved from the values it maps, by the
|
|
2086
2294
|
code of x and y axes: the scale's domain, `limits` and quantiles, `include_zero`, no
|
|
2087
2295
|
padding (unless `padding` is set). Values past the limits take the gradient's
|
|
@@ -2106,37 +2314,103 @@ Color and size axes have the settings of [axes](#4-axes); these differ:
|
|
|
2106
2314
|
### Colorbars
|
|
2107
2315
|
|
|
2108
2316
|
```python
|
|
2109
|
-
p.colorbar(source=None, **settings)
|
|
2110
|
-
fig.
|
|
2111
|
-
|
|
2317
|
+
p.colorbar(source=None, side="bottom", **settings) # attached to a side of the plot
|
|
2318
|
+
fig.add_colorbar(source=None, plots=None, side="bottom", **settings) # beside plots
|
|
2319
|
+
fig.colorbar(source, id=None, **settings) # in its own grid area
|
|
2320
|
+
fig.colorbars # those of add_colorbar
|
|
2321
|
+
cb.axis # the color axis shown
|
|
2112
2322
|
```
|
|
2113
2323
|
|
|
2114
|
-
`source` is a mapped series (its color axis; default: the plot's last mapped series
|
|
2115
|
-
a color axis.
|
|
2116
|
-
|
|
2117
|
-
the name of the color column or density.
|
|
2118
|
-
|
|
2119
|
-
|
|
2324
|
+
`source` is a mapped series (its color axis; default: the plot's last mapped series, or
|
|
2325
|
+
that of the first covered plot with one) or a color axis. A colorbar draws the axis'
|
|
2326
|
+
gradient between its trained limits, with a label: `label`, else the axis' `label`, else
|
|
2327
|
+
the name of the color column or density.
|
|
2328
|
+
|
|
2329
|
+
* **Key** (`style="key"`, the default): one line of the low limit, a short bar with round
|
|
2330
|
+
ends filled with the gradient (`thickness` 4 px, `length` 40 px), the high limit, then
|
|
2331
|
+
the label; `value_gap` (0.6em) between a limit and the bar, `label_gap` (1.2em) before
|
|
2332
|
+
the label. The texts are centered on the bar's middle line, in the axis' tick label font
|
|
2333
|
+
(the label in its label font); `em` is the axis' tick label font size. When the limits
|
|
2334
|
+
clip the data (`extend`), a dot as wide as the bar, in the gradient's under or over
|
|
2335
|
+
color, sits half the thickness past that end (`extend_shape`: `dot`, `block`,
|
|
2336
|
+
`triangle`). `frame` outlines the bar and the dots, following their shapes.
|
|
2337
|
+
* **Values.** `values="limits"`: the axis' limits in its `tick_format` (`"auto"`: rounded
|
|
2338
|
+
to two digits of their range); `"ticks"`: the axis' ticks along the bar instead, under
|
|
2339
|
+
it (right of a vertical one); `"signs"`: a bold − (always U+2212, whatever `minus`) and
|
|
2340
|
+
a bold +; or a pair of texts with markup, `("Low", "High")`, `None` keeping that end's
|
|
2341
|
+
number: `(None, "max")`.
|
|
2342
|
+
* **Vertical** (on the left and right): the high limit above the bar, the low limit below
|
|
2343
|
+
it, the label above everything, horizontal, all centered on the bar.
|
|
2344
|
+
`label_position`: `end` (after the high end; above a vertical key), `start` (before
|
|
2345
|
+
the low end; below a vertical key), `top` (above the key), `side` (under a horizontal
|
|
2346
|
+
key; beside a vertical one, reading upward).
|
|
2347
|
+
* **Bar** (`style="bar"`): a long bar (`length` `100%`, `thickness` 13 px) with the axis'
|
|
2348
|
+
ticks, tick labels and label beside it, for many ticks (log scales, diverging maps).
|
|
2349
|
+
`values`, the gaps and `label_position` are a key's.
|
|
2350
|
+
* **Attached.** A band of the plot's box on its `side` (default `bottom`;
|
|
2351
|
+
`orientation="auto"`: horizontal on top and bottom, vertical on the left and right),
|
|
2352
|
+
placed along the side by `align` (`"auto"`: the end on top and bottom, the center on
|
|
2353
|
+
the left and right). On one side, from the axes outward: an outside legend, the
|
|
2354
|
+
colorbars (by `order`, else in creation order), the titles. A key longer than its axes
|
|
2355
|
+
side passes its ends, and the margins there grow.
|
|
2356
|
+
* **Lanes.** `fig.add_colorbar` puts a colorbar beside a set of plots (plots or their
|
|
2357
|
+
series; default every plot) in the lanes of [figure titles](#figure-title) and
|
|
2358
|
+
[legends](#figure-legends), with their rules (the plots' grid rectangle, nesting, shared
|
|
2359
|
+
lanes for disjoint spans, creation order, `order`); over the same plots, a legend is
|
|
2360
|
+
nearer the plots, then a colorbar, then a title. `align` (default `center`) places it
|
|
2361
|
+
within the axes of its plots. A `%` `length` is of that span, and a key then fills
|
|
2362
|
+
that part of it (`length="100%"`: the bar takes what the texts leave of the span). The
|
|
2363
|
+
covered plots' attached colorbars of the same axis are left out.
|
|
2364
|
+
* **Shared color axes.** When plots sharing a color axis have attached colorbars of it,
|
|
2365
|
+
one colorbar in the lanes replaces them: per group of `share_color`, on the right of a
|
|
2366
|
+
row or of the figure, at the bottom of a column; then per axis that the attached
|
|
2367
|
+
colorbars of two plots or more show (`fig.color_axis()`), at the bottom of a column,
|
|
2368
|
+
else on the right. It takes the settings of the first one but its place. An attached
|
|
2369
|
+
colorbar whose `side` is set stays, as do those of plots that are not a grid
|
|
2370
|
+
rectangle.
|
|
2371
|
+
* **Own area.** `fig.colorbar(source, id=…)` is vertical in its grid area (`orientation`):
|
|
2372
|
+
a key placed along it by `align`, a bar running along the neighbouring axes
|
|
2373
|
+
(`align="axes"`) or boxes (`"borders"`).
|
|
2374
|
+
* `p.save()` (one plot alone) leaves out figure colorbars: the plot's attached colorbars
|
|
2375
|
+
show again.
|
|
2376
|
+
|
|
2377
|
+
Axis settings given to a colorbar go to its axis:
|
|
2120
2378
|
`p.colorbar(h, label="z", tick_format="{:.0%}")` sets `h.color_axis`'s tick format.
|
|
2121
2379
|
|
|
2122
2380
|
<!-- settings:Colorbar -->
|
|
2123
2381
|
| Setting | Default | Meaning |
|
|
2124
2382
|
|---|---|---|
|
|
2125
|
-
| `
|
|
2126
|
-
| `
|
|
2127
|
-
| `
|
|
2128
|
-
| `
|
|
2129
|
-
| `
|
|
2130
|
-
| `
|
|
2383
|
+
| `side` | 'bottom' | Side of the plot (or of the plots) it sits on. |
|
|
2384
|
+
| `align` | 'center' | Place along its side: `start` (left, or top), `center`, `end` (right, or bottom). |
|
|
2385
|
+
| `order` | — | Place among the colorbars of its side: lower is nearer the axes; unset: creation order. |
|
|
2386
|
+
| `style` | 'key' | `key`: one line of the limits around a short bar with round ends, then the label; `bar`: a long bar with the axis' ticks. |
|
|
2387
|
+
| `orientation` | 'auto' | Direction; `"auto"`: horizontal on top and bottom, vertical on the left and right and in an area of its own. |
|
|
2388
|
+
| `thickness` | 'auto' | Bar thickness; `"auto"`: 4 px on a key, 13 px on a bar. Length; `%`: of the span along a key, the axes side across a bar. |
|
|
2389
|
+
| `length` | 'auto' | Bar length; `"auto"`: 40 px on a key, `100%` on a bar. A key given in `%` fills that part of the span with its texts and bar. Length; `%`: of the span along the colorbar (the axes side of an attached one). |
|
|
2390
|
+
| `values` | 'limits' | A key's end texts: `limits` (the axis' limits in its `tick_format`), `ticks` (the axis' ticks along the bar, lengthened to show at least two), `signs` (a bold − and +) or a pair of texts (`None`: that end's number). |
|
|
2391
|
+
| `value_gap` | '0.6em' | Gap between a key's end texts and its bar (and above or below a label on top or under it). Length; `%`: of the font size. |
|
|
2392
|
+
| `label_gap` | '1.2em' | Gap between a key's texts and its label, along the key. Length; `%`: of the font size. |
|
|
2393
|
+
| `label_position` | 'end' | A key's label: after the high end (`end`; above a vertical key), before the low end (`start`; below a vertical key), beside the bar (`side`: under a horizontal key, rotated right of a vertical one) or above the key (`top`). |
|
|
2394
|
+
| `pad` | 'auto' | Gap between the axes and an attached colorbar; `"auto"`: 0.8em on a key, 11 px on a bar. Length; `%`: of the axes side across the colorbar. |
|
|
2395
|
+
| `label` | — | Label: a string or rich content; default: the axis' `label`, else the name of the color column or density. |
|
|
2131
2396
|
| `extend` | 'auto' | Ends in the under/over colors: `auto` shows them when the limits clip the data. |
|
|
2132
|
-
| `extend_shape` | '
|
|
2133
|
-
| `frame` | False | Outline the bar. |
|
|
2397
|
+
| `extend_shape` | 'auto' | `dot`: a dot past the key's end; `block`: a separate block at the end (within a bar's length); `triangle`: a triangle past the end; `"auto"`: `dot` on a key, `block` on a bar. |
|
|
2398
|
+
| `frame` | False | Outline the bar (and its ends), following its shape. |
|
|
2134
2399
|
| `frame_color` | '#666666' | Outline color. |
|
|
2135
2400
|
| `frame_width` | 0.5 | Outline width. Length. |
|
|
2136
2401
|
|
|
2137
2402
|
Groups: `Stroke` (`frame_`).
|
|
2138
2403
|
<!-- /settings -->
|
|
2139
2404
|
|
|
2405
|
+
Figure colorbars (`fig.add_colorbar`) have the settings of colorbars, and:
|
|
2406
|
+
|
|
2407
|
+
<!-- settings:FigureColorbar -->
|
|
2408
|
+
| Setting | Default | Meaning |
|
|
2409
|
+
|---|---|---|
|
|
2410
|
+
| `order` | — | Place in its side's lanes, as figure titles' `order`: lower is nearer the plots. |
|
|
2411
|
+
| `pad` | 'auto' | Gap between the colorbar and the plots; `"auto"`: 0.8em on a key, 11 px on a bar. Length. |
|
|
2412
|
+
<!-- /settings -->
|
|
2413
|
+
|
|
2140
2414
|
## 7. Colors, maps and markers
|
|
2141
2415
|
|
|
2142
2416
|
### Colors and palette
|
|
@@ -2360,7 +2634,7 @@ for vec_io's `draw_markers`; `plot_io.markers.marker_area(name)` its area.
|
|
|
2360
2634
|
## 8. Output
|
|
2361
2635
|
|
|
2362
2636
|
```python
|
|
2363
|
-
fig.save(path, **options) # .pdf, .png, .jpg/.jpeg, .jxl, .avif
|
|
2637
|
+
fig.save(path, **options) # .pdf, .eps, .png, .jpg/.jpeg, .jxl, .avif
|
|
2364
2638
|
fig.to_bytes(format="pdf", **options)
|
|
2365
2639
|
fig.draw(canvas, x=0, y=0) # on any vec_io canvas (its document's fonts); returns (width, height) in px
|
|
2366
2640
|
fig.size() # (width, height) in px
|
|
@@ -2374,13 +2648,18 @@ it with its own options:
|
|
|
2374
2648
|
|---|---|
|
|
2375
2649
|
| `title`, `author`, `subject`, `keywords`, `creator`, `creation_date`, `pdf_a`, `color_mode`, `ink_limit`, `icc_profile`, `base_dir` | the document (vec_io `Document`) |
|
|
2376
2650
|
| `font_dirs`, `system_fonts` | the fonts text is shaped and embedded with ([fonts](#1-conventions)) |
|
|
2651
|
+
| `text_as_paths` | text drawn as the outlines of its glyphs: no font embedded, text not selectable (default `False`) |
|
|
2377
2652
|
| `quality` | the figure's `quality` when not given: 1–100, `"lossless"` (not JPEG) or `"auto"`, the default: PNG 90, a palette of at most 256 colors; JPEG 90; JPEG XL, AVIF and rasterized content in a PDF lossless |
|
|
2378
2653
|
| `compression` | `"fast"`, `"balanced"` (default), `"best"`: the encoder's effort (PDF streams and images, PNG, JPEG, JPEG XL, AVIF) |
|
|
2379
2654
|
| `simplify` | the output's `simplify` for content without its own (series have theirs, below) |
|
|
2380
|
-
| `compress`, `font_hinting` | PDF: compressed streams (default) or a readable file; TrueType hinting kept in embedded subsets (default: left out) |
|
|
2381
|
-
| `
|
|
2382
|
-
|
|
2383
|
-
|
|
2655
|
+
| `compress`, `font_hinting` | PDF and EPS: compressed streams (default) or a readable file; TrueType hinting kept in embedded subsets (default: left out) |
|
|
2656
|
+
| `flatten_transparency`, `flatten_fallback`, `flatten_dpi`, `flatten_budget`, `flatten_cell` | PDF: translucent content drawn as opaque vectors (default off), and what cannot be (vec_io's transparency flattening: an image by default); EPS: always flattened, the others tune it |
|
|
2657
|
+
| `dpi`, `background` | images: resolution (default 384: four image pixels per px); a color under the figure (default the figure's, white; `None` is transparent, white in JPEG) |
|
|
2658
|
+
|
|
2659
|
+
EPS output (`.eps`) is vec_io's: one page of PostScript Level 3, its transparency (the
|
|
2660
|
+
`alpha` of bands, markers, …) flattened into opaque shapes, with an image where it cannot
|
|
2661
|
+
be (dense translucent scatters), and its fonts embedded (Type 42 or CFF). JPEG XL output
|
|
2662
|
+
(`.jxl`) needs libjxl, AVIF output (`.avif`) libavif 1.x. Images inside a
|
|
2384
2663
|
PDF (rasterized series, heatmaps) are stored losslessly or as JPEG (`quality`), never as
|
|
2385
2664
|
JPEG XL, so every PDF reader shows them. Fonts are embedded subsets without hinting: a
|
|
2386
2665
|
typical figure's text adds a few KB per face. A plot
|
|
@@ -2534,8 +2813,8 @@ readers, recognised by their `type` attribute (`"bigwig"`, `"bigbed"`, `"bed"`,
|
|
|
2534
2813
|
| Data | Methods called |
|
|
2535
2814
|
|---|---|
|
|
2536
2815
|
| signal (bigWig; the coverage of bigBed, BED and peaks readers) | `read_values([(chr, start, end)], bin_count=n, bin_mode=…, def_value=…, zoom="auto")`, or with `bin_size=b, snap_to_grid="expand"` and the row's bounds from `resolve_regions([(chr, start, end)], bin_size=b, snap_to_grid="expand")` (without it, `snap_to_grid=False, full_bin=True`): one row of values |
|
|
2537
|
-
| intervals (bigBed, BED, peaks) | `read_entries([(chr, start, end)],
|
|
2538
|
-
| annotation (GTF, GFF3) | `
|
|
2816
|
+
| intervals (bigBed, BED, peaks) | `read_entries([(chr, start, end)], columns=…)`: a table, a dict of columns; `columns` from `auto_sql` when the reader has it |
|
|
2817
|
+
| annotation (GTF, GFF3) | `read_entries([(chr, start, end)], model="transcript", gene_type=…, transcript_type=…)`: a table of transcripts: `start`, `end`, `strand`, `transcript_id`, `transcript_name`, `gene_id`, `gene_name`, `cds_start`, `cds_end` (−1 when non-coding); their exons are the table `nested["exons"]` (`start`, `end`), transcript `i`'s at rows `groups[i]:groups[i + 1]`. A reader is told for one by its `tss` method |
|
|
2539
2818
|
| contacts (Hi-C) | `bin_sizes`, `normalizations`, `read_values((chr, start, end), bin_size=b, snap_to_grid="expand", normalization=…, matrix_type=…, max_distance=…)` (or `bin_count=n` instead of the first two): a square matrix; bounds from `resolve_regions((chr, start, end), bin_size=b, snap_to_grid="expand")["rows"]` |
|
|
2540
2819
|
|
|
2541
2820
|
Results are read as buffers (numpy arrays included) without importing numpy. A path
|
|
@@ -2585,13 +2864,15 @@ t.bigwig(pax7_reader, name="Pax7", color="rose")
|
|
|
2585
2864
|
| `z` | — | Drawing order (higher on top); default: call order. |
|
|
2586
2865
|
| `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
|
|
2587
2866
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
2588
|
-
| `line_width` | inherited (0.
|
|
2867
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
2589
2868
|
| `text_color` | inherited ('black') | Text color. |
|
|
2590
2869
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
2591
|
-
| `font_family` | inherited ('
|
|
2870
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
2592
2871
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
2593
2872
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
2594
2873
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
2874
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
2875
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
2595
2876
|
|
|
2596
2877
|
Groups: `FillStyle`, `Font`.
|
|
2597
2878
|
<!-- /settings -->
|
|
@@ -2643,13 +2924,15 @@ every feature has the same lightness.
|
|
|
2643
2924
|
| `name` | — | Legend entry; unset: not in the legend. |
|
|
2644
2925
|
| `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
|
|
2645
2926
|
| `z` | — | Drawing order (higher on top); default: call order. |
|
|
2646
|
-
| `line_width` | inherited (0.
|
|
2927
|
+
| `line_width` | inherited (0.5) | Line width. Length. |
|
|
2647
2928
|
| `text_color` | inherited ('black') | Text color. |
|
|
2648
2929
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
2649
|
-
| `font_family` | inherited ('
|
|
2930
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
2650
2931
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
2651
2932
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
2652
2933
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
2934
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
2935
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
2653
2936
|
|
|
2654
2937
|
Groups: `FillStyle`, `TextStyle` (`name_`), `Font`.
|
|
2655
2938
|
<!-- /settings -->
|
|
@@ -2734,10 +3017,12 @@ to quantiles of the cells drawn (`color_limits="q:0.01/q:0.99"`), on a log scale
|
|
|
2734
3017
|
| `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
|
|
2735
3018
|
| `text_color` | inherited ('black') | Text color. |
|
|
2736
3019
|
| `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
|
|
2737
|
-
| `font_family` | inherited ('
|
|
3020
|
+
| `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
|
|
2738
3021
|
| `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
|
|
2739
3022
|
| `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
|
|
2740
3023
|
| `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
|
|
3024
|
+
| `line_height` | inherited (1.0) | Height of a line of text: a multiple of the font size (`1.2`), a percentage of it, or `normal` (the font's ascent and descent). Text boxes and the gaps around them follow it, with the glyphs centered. |
|
|
3025
|
+
| `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
|
|
2741
3026
|
|
|
2742
3027
|
Groups: `Font`.
|
|
2743
3028
|
<!-- /settings -->
|
|
@@ -2777,9 +3062,11 @@ pl.styles.settings("house") # the resolved dict (base theme included)
|
|
|
2777
3062
|
```
|
|
2778
3063
|
|
|
2779
3064
|
* **Keys.** Names of inherited settings (`"font_size"`, `"palette"`), `"Class.name"` for
|
|
2780
|
-
any setting of a class and its subclasses (`Figure`, `FigureTitle`, `Plot`, `Title`,
|
|
2781
|
-
`Legend`, `Axis` (plot, color and size axes), `Colorbar`,
|
|
2782
|
-
|
|
3065
|
+
any setting of a class and its subclasses (`Figure`, `FigureTitle`, `MainTitle`, `Plot`, `Title`,
|
|
3066
|
+
`Legend`, `FigureLegend`, `Axis` (plot, color and size axes), `Colorbar`,
|
|
3067
|
+
`FigureColorbar`, every series class, `Series` for all of them, every decoration class,
|
|
3068
|
+
`Decoration` for all of them, `FigureVLine`, `FigureVSpan`, `FigureGroup`, the genome
|
|
3069
|
+
classes),
|
|
2783
3070
|
or `"Group.member"` for every embedding of a group member (`"Marker.size"`,
|
|
2784
3071
|
`"Stroke.line_width"`, `"TextStyle.font_weight"`).
|
|
2785
3072
|
`"Colorbar.<axis setting>"` (`"Colorbar.tick_direction"`, `"Colorbar.tick_color"`, …)
|
|
@@ -2843,7 +3130,7 @@ documented default properties. What cannot be expressed: legend titles naming a
|
|
|
2843
3130
|
`use_style`), `plot_io.genome` (`parse_region`, `Region`), `plot_io.markers`
|
|
2844
3131
|
(`marker_path`, `marker_area`), `plot_io.color.palettes` (`PALETTE`), and the modules of
|
|
2845
3132
|
the types calls return: `plot_io.facets` (`FacetSet`, `LayerSet`), `plot_io.tables`
|
|
2846
|
-
(`SeriesGroup`), `plot_io.colorbar` (`Colorbar`). The others are internal: their names
|
|
3133
|
+
(`SeriesGroup`), `plot_io.colorbar` (`Colorbar`, `FigureColorbar`). The others are internal: their names
|
|
2847
3134
|
may change in any release.
|
|
2848
3135
|
|
|
2849
3136
|
| Module | Role |
|
|
@@ -2853,7 +3140,8 @@ may change in any release.
|
|
|
2853
3140
|
| `defaults.py`, `units.py` | `DEFAULTS`; units, `var()`/`calc()`/`inherit`, `%` referents, `explain` traces |
|
|
2854
3141
|
| `spec.py` | a render's specs (the model resolved once, frozen), layout boxes, palette colors and trained color and size axes |
|
|
2855
3142
|
| `figure.py`, `plot.py` | `Figure` (arrangement, tracks layout, figure axes, sizes, output), `Plot`, `Title`, `Legend` |
|
|
2856
|
-
| `
|
|
3143
|
+
| `titles.py`, `markup.py` | the settings plot and figure titles share (`TitleBase`) and a title's text block; markup in strings read into spans |
|
|
3144
|
+
| `rows.py` | row labels in a band left of the plots, groups of rows (`FigureGroup`: letters, labels as figure titles), lines and bands through rows (`FigureVLine`, `FigureVSpan`) |
|
|
2857
3145
|
| `axis.py`, `scales.py`, `limits.py`, `ticks.py` | axes, scale functions, limits syntax, tick choice and labels |
|
|
2858
3146
|
| `states.py` | the render's state of each plot: calls, palette, axes and their limits, legend, colorbars |
|
|
2859
3147
|
| `layout.py`, `geometry.py` | the box model: bands measured around each plot's axes, the grid solved in rounds, the frozen geometry (`layout.layout(fig, fonts)`: text shaped with a font database, no canvas) |
|