plot-io 0.13.1__tar.gz → 0.14.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.13.1 → plot_io-0.14.0}/PKG-INFO +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/api.md +16 -16
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/color_axes.md +33 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/__init__.py +4 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/axis.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/colorbar.py +2 -2
- plot_io-0.14.0/plot_io/colors/__init__.py +70 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/decorations.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/ext.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/figure.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/contacts.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/intervals.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/links.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/signal.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/sites.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/groups.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/hints.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/labels.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/base.py +4 -4
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/context.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/core.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/geoms.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/grammar.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/paint.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/pipeline.py +3 -3
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/legend.py +4 -4
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/levels.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/mapped.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/plot.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/_util.py +5 -5
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/area.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/bar.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/box.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/contour.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/errorbar.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/errors.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/fill.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/heatmap.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/hexbin.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/hist.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/kde.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/line.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/pie.py +3 -3
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/regression.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/stem.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/violin.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/registry.py +28 -3
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/render.py +3 -3
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/rows.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/settings.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/styles/__init__.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/titles.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/types.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/units.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/validators.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/values.py +3 -3
- {plot_io-0.13.1 → plot_io-0.14.0}/pyproject.toml +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_bars.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_boundary.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_genome.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_maps.py +11 -11
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_settings.py +2 -2
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_size_keys.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_tables.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_values.py +49 -4
- {plot_io-0.13.1 → plot_io-0.14.0}/tools/gen_api.py +1 -1
- {plot_io-0.13.1 → plot_io-0.14.0}/tools/gen_docs.py +5 -4
- plot_io-0.13.1/plot_io/color/__init__.py +0 -3
- {plot_io-0.13.1 → plot_io-0.14.0}/LICENSE +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/README.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/annotated.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/bars.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/box_plots.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/colorbars.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/density.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/distributions.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/dots.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/error_bars.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/facets.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/genome_matrices.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/genome_regions.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/genome_tracks.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/grids2d.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/groups.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/heatmap.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/helpers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/large_data.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/layouts.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/levels.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/line_band.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/scales.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/scatter_groups.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/shared_colorbar.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/shared_legend.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/shared_sizes.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/styles.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/time_twin.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/titles.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/units.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples/variable_fonts.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/examples.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/from_matplotlib.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/area.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/bar.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/bed.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/bigwig.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/box.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/clustermap.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/contour.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/dendrogram.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/dots.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/ecdf.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/errorbar.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/facet.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/fill.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/genes.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/gtf.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/heatmap.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/hexbin.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/hic.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/hist.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/hist2d.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/joint.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/kde.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/kde2d.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/line.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/linkage.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/links.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/ma.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/manhattan.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/pairs.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/pie.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/qq.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/raincloud.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/regression.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/scatter.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/site_heatmap.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/site_profile.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/stem.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/strip.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/swarm.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/violin.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/plots/volcano.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/axis.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/canvas.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/colorbars.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/decorations.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/figure.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/figure_rows.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/legends.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/plot.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/sets.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/titles.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/reference/tracks.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/docs/tutorial.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/hatch_build.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_methods.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/README.md +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/__init__.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/__main__.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/_api.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/kernels.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/manifest.json +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/alloc.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/cluster.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/colormap.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/math.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/plio.h +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/plio_api.h +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/plot.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/rt.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/signatures.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/sort.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/_native/src/stats.c +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/boxes.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/canvas.py +0 -0
- {plot_io-0.13.1/plot_io/color → plot_io-0.14.0/plot_io/colors}/data.py +0 -0
- {plot_io-0.13.1/plot_io/color → plot_io-0.14.0/plot_io/colors}/maps.py +0 -0
- {plot_io-0.13.1/plot_io/color → plot_io-0.14.0/plot_io/colors}/values.py +0 -0
- {plot_io-0.13.1/plot_io/color → plot_io-0.14.0/plot_io/colors}/variants.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/columns.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/defaults.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/density.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/facets.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/formatters.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/__init__.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/adapters.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/combine.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/lanes.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/layout.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/pack.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/readers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/regions.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/scale.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/series.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/sources.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/genome/testing.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/geometry.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/guides.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/__init__.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/clustermap.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/dendrogram.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/grids.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/qq.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/raincloud.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/tree.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/helpers/volcano.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/kernels.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/__init__.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/positions.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layers/stats.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/layout.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/limits.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/lines.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/markers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/markup.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/numbers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/occupancy.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/__init__.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/catpoints.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/curves.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/dots.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/ecdf.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/hist2d.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/kde2d.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/presets/scatter.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/py.typed +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/scales.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/seams.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/shapes.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/sharing.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/sizemaps.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/spec.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/states.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/styles/library.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/tables.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/text.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/ticks.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/times.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/plot_io/transform.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/fonts/VarTest.ttf +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/fonts/VioTest-Bold.ttf +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/fonts/VioTest-Regular.ttf +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/fuzz_native.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/golden.json +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/helpers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/preset_ref.json +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/recording.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/stats_reference.json +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_api.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_box.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_colorbars.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_decorations.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_defaults.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_density.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_distributions.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_docs.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_dots.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_edge_cases.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_entry.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_figure_title.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_fonts.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_geometry.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_golden.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_grids.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_heatmap.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_invariants.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_jxl_output.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_layers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_layout.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_limits.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_markers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_markup.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_native.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_numbers.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_occupancy.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_output.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_pie.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_reflines.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_registry.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_rows.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_series.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_settings_fuzz.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_shared_legends.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_sharing.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_simplify.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_stats.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_style_settings.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_style_types.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_styles.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_ticks.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_time_twin.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_titles.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_transform.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_typing.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_units.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/test_vocabulary.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tests/typing/user_code.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tools/build_native.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tools/settings_doc.py +0 -0
- {plot_io-0.13.1 → plot_io-0.14.0}/tools/zig.lock +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: plot_io
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.0
|
|
4
4
|
Summary: Plots for PDF, EPS, SVG, PNG, JPEG, JPEG XL and AVIF, drawn with vec_io
|
|
5
5
|
Project-URL: Repository, https://github.com/ajgouhier/plot_io
|
|
6
6
|
Author-email: Arthur Gouhier <ajgouhier@gmail.com>
|
|
7
7
|
License-Expression: BSD-3-Clause
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
Requires-Python: >=3.11
|
|
10
|
-
Requires-Dist: vec-io<0.
|
|
10
|
+
Requires-Dist: vec-io<0.9,>=0.8
|
|
11
11
|
Provides-Extra: dev
|
|
12
12
|
Requires-Dist: mypy; extra == 'dev'
|
|
13
13
|
Requires-Dist: ruff; extra == 'dev'
|
|
@@ -109,12 +109,12 @@ one in [reference/](#reference); worked examples are in [examples.md](examples.m
|
|
|
109
109
|
(how a family is found: [Figure](reference/figure.md#figure)). A line of text is
|
|
110
110
|
`line_height` tall (a multiple of the font size; default 1), the glyphs centered in it.
|
|
111
111
|
* **Names.** `plt.` holds the figure and plot classes, the plot types, the value types
|
|
112
|
-
(`ColorAxis`, `SizeAxis`, `ColorMap`, `SizeMap`, `Density`, `Errors`,
|
|
113
|
-
`
|
|
112
|
+
(`ColorAxis`, `SizeAxis`, `ColorMap`, `SizeMap`, `Density`, `Errors`, `Span`, `Simplify`),
|
|
113
|
+
`facet`, `every`, `color`, `registry`, `set_style`, `use_style` and `DEFAULTS`
|
|
114
114
|
([modules](#12-modules)). Enum-like settings take strings.
|
|
115
|
-
* **Registries.** `plt.registry.color_maps`, `markers`, `styles` and `layers`
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
* **Registries.** `plt.registry.color_maps`, `markers`, `styles` and `layers` (plot types)
|
|
116
|
+
each have `add(name, value)`, `names()`, `get(name)` (`ValueError` for an unknown name)
|
|
117
|
+
and `name in registry.…`; `colors` (fixed): `names()`, `variants()`.
|
|
118
118
|
* **Guides.** Titles, legends and colorbars follow one pattern: a figure has
|
|
119
119
|
`fig.add_title`, `fig.add_legend` and `fig.add_colorbar` (in the lanes beside a set of
|
|
120
120
|
plots, `side=`), and `fig.colorbar_area` and `fig.size_legend` (in their own grid area,
|
|
@@ -770,14 +770,14 @@ legend (`size_key="legend"`); `fig.size_legend` gives it its own area
|
|
|
770
770
|
0.05, 0.1–0.9 and 0.95, white at 0 and black at 1, interpolated in Oklab; a bare name is
|
|
771
771
|
0.5. They take precedence over CSS's names (`"red"` is `#d25b4a` in the default variant,
|
|
772
772
|
`forest`, and `#fb2c36` in `base`; `"brown"` is Brown 0.5, not CSS's `#a52a2a`);
|
|
773
|
-
`
|
|
773
|
+
`plt.color()` gives the color drawn (a `vec_io.Color`); `plt.registry.colors` the names.
|
|
774
774
|
* **Color variants.** Nine variants of every scale: `base` (Tailwind's), `vivid`, `pastel`,
|
|
775
|
-
`forest`, `dim`, `arctic`, `desert`, `dusty`, `neon`. A variant word before a color or
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
775
|
+
`forest`, `dim`, `arctic`, `desert`, `dusty`, `neon`. A variant word before a color or map
|
|
776
|
+
name picks one (`"pastel tab10_custom"`); `color_variant` (inherited: figure, plot, series
|
|
777
|
+
or style; default `"forest"`; the library styles set `"base"`, the libraries' own colors)
|
|
778
|
+
is the variant of every named color written without one: bare names, the series colors
|
|
779
|
+
(`"C0"`), maps from names (`"rainbow_llhh"`) and the style's colors. Hex, `rgb()`, CSS
|
|
780
|
+
names, `CMYK` and `Spot` never change; `explain()` names the variant used.
|
|
781
781
|
|
|
782
782
|

|
|
783
783
|
|
|
@@ -1186,7 +1186,7 @@ plt.registry.styles.add("seaborn-whitegrid", {
|
|
|
1186
1186
|
`plt.__all__` is the API; `plt.Axis`, `plt.Legend`, `plt.Colorbar` and `plt.Title` are there
|
|
1187
1187
|
for annotations and `isinstance`. Public modules too: `plot_io.registry`, `plot_io.ext`,
|
|
1188
1188
|
`plot_io.genome` (`parse_region`, `Region`, `combine`), `plot_io.genome.readers`,
|
|
1189
|
-
`plot_io.genome.testing`, `plot_io.types`, `plot_io.markers`, `plot_io.
|
|
1189
|
+
`plot_io.genome.testing`, `plot_io.types`, `plot_io.markers`, `plot_io.colors.maps`,
|
|
1190
1190
|
`plot_io.canvas`, and those of the types calls return (`plot_io.facets`,
|
|
1191
1191
|
`plot_io.helpers`, `plot_io.tables`, `plot_io.colorbar`). The others are internal.
|
|
1192
1192
|
|
|
@@ -1201,7 +1201,7 @@ for annotations and `isinstance`. Public modules too: `plot_io.registry`, `plot_
|
|
|
1201
1201
|
| [titles](reference/titles.md) | [`Title`](reference/titles.md#title), [`FigureTitle`](reference/titles.md#figuretitle) |
|
|
1202
1202
|
| [legends](reference/legends.md) | [`Legend`](reference/legends.md#legend), [`FigureLegend`](reference/legends.md#figurelegend), [`SizeLegend`](reference/legends.md#sizelegend) |
|
|
1203
1203
|
| [colorbars](reference/colorbars.md) | [`Colorbar`](reference/colorbars.md#colorbar), [`FigureColorbar`](reference/colorbars.md#figurecolorbar) |
|
|
1204
|
-
| [color axes](reference/color_axes.md) | [`ColorAxis`](reference/color_axes.md#coloraxis), [`SizeAxis`](reference/color_axes.md#sizeaxis), [`ColorMap`](reference/color_axes.md#colormap), [`SizeMap`](reference/color_axes.md#sizemap), [`Density`](reference/color_axes.md#density) |
|
|
1204
|
+
| [color axes](reference/color_axes.md) | [`ColorAxis`](reference/color_axes.md#coloraxis), [`SizeAxis`](reference/color_axes.md#sizeaxis), [`ColorMap`](reference/color_axes.md#colormap), [`SizeMap`](reference/color_axes.md#sizemap), [`Density`](reference/color_axes.md#density), [`color`](reference/color_axes.md#color) |
|
|
1205
1205
|
| [decorations](reference/decorations.md) | [`HLine`](reference/decorations.md#hline), [`AxLine`](reference/decorations.md#axline), [`HSpan`](reference/decorations.md#hspan), [`Text`](reference/decorations.md#text), [`Annotate`](reference/decorations.md#annotate), [`Bracket`](reference/decorations.md#bracket) |
|
|
1206
1206
|
| [figure rows](reference/figure_rows.md) | [`FigureVLine`](reference/figure_rows.md#figurevline), [`FigureVSpan`](reference/figure_rows.md#figurevspan), [`FigureGroup`](reference/figure_rows.md#figuregroup) |
|
|
1207
1207
|
| [tracks](reference/tracks.md) | [`Tracks`](reference/tracks.md#tracks), [`Track`](reference/tracks.md#track) |
|
|
@@ -1219,8 +1219,8 @@ for annotations and `isinstance`. Public modules too: `plot_io.registry`, `plot_
|
|
|
1219
1219
|
| `axis.py` | Axes: settings (`Axis`) and their state while a figure is drawn (`AxisState`: scale, limits, ticks, mapping to the page). |
|
|
1220
1220
|
| `boxes.py` | The box tree of a plot: what surrounds its axes, side by side, as ordered nodes. |
|
|
1221
1221
|
| `canvas.py` | The canvas plot_io draws on, and a canvas that records the drawing. |
|
|
1222
|
-
| `color/` | Colors: values and named scales (`values`), color maps, every set of colors with its kind: qualitative, sequential, diverging, cyclic (`maps`), and the bundled data (`data`). Color space conversions are vec_io's (`paint`). |
|
|
1223
1222
|
| `colorbar.py` | Colorbars: the guides of color axes, and size keys: the guides of size axes. |
|
|
1223
|
+
| `colors/` | Colors: values and named scales (`values`), color maps, every set of colors with its kind: qualitative, sequential, diverging, cyclic (`maps`), and the bundled data (`data`). Color space conversions are vec_io's (`paint`). |
|
|
1224
1224
|
| `columns.py` | Data intake: the data arguments of a plot type's call as columns. |
|
|
1225
1225
|
| `decorations.py` | Decorations: reference lines, spans, text, annotations and brackets on a plot. |
|
|
1226
1226
|
| `defaults.py` | Every default setting of plot_io, in one place: the default look. |
|
|
@@ -1250,7 +1250,7 @@ for annotations and `isinstance`. Public modules too: `plot_io.registry`, `plot_
|
|
|
1250
1250
|
| `occupancy.py` | What the series cover inside the axes, on a coarse grid: used to place legends. |
|
|
1251
1251
|
| `plot.py` | Plots: one area of a figure, with axes, series, title, legend and colorbars. |
|
|
1252
1252
|
| `presets/` | The plot types: each a `Series` declared by a `SPEC` (its data, layers and what the axes need, built by `grammar`) or with a `layers()` of its own, registered as a `Plot` method (`registry.layers.add`). |
|
|
1253
|
-
| `registry.py` | The registries of named things: `color_maps`, `markers`, `styles` and `layers` (plot types), each with `add(name, value)`, `names()` and `get(name)
|
|
1253
|
+
| `registry.py` | The registries of named things: `color_maps`, `markers`, `styles` and `layers` (plot types), each with `add(name, value)`, `names()` and `get(name)`; `colors`, the named color scales (fixed: `names()`, `variants()`, `get(name)`). |
|
|
1254
1254
|
| `render.py` | Drawing and output of figures. |
|
|
1255
1255
|
| `rows.py` | Rows of a figure: row labels in a band left of the plots, groups of rows, and lines and bands drawn through several rows. |
|
|
1256
1256
|
| `scales.py` | Scales: a monotone function from data to a position line. |
|
|
@@ -351,3 +351,36 @@ changes, in `series.stats["density"]`.
|
|
|
351
351
|
| `normalize` | The values: `"pdf"` (scipy's), `"count"` (points per unit area) or `"max"` (0–1). |
|
|
352
352
|
| `method` | `"exact"`, `"grid"` or `"auto"` (exact up to 20,000 points). |
|
|
353
353
|
| `grid` | Grid size of the grid method, 16–4096. |
|
|
354
|
+
|
|
355
|
+
## color
|
|
356
|
+
|
|
357
|
+
```python
|
|
358
|
+
plt.color(spec, variant=None) -> Color
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
A color as plot_io draws it, as a `vec_io.Color` (`.hex`, `.r`, `.lightness`,
|
|
362
|
+
`with_alpha()`, `mix()`…); `"none"` and `"transparent"` give
|
|
363
|
+
`Color(0, 0, 0, 0)`.
|
|
364
|
+
|
|
365
|
+
A named color without a variant word (`"red"`) and the series colors (`"C0"`,
|
|
366
|
+
`"C1"`, …) are those a new figure draws now: in its `color_variant` (`"forest"`
|
|
367
|
+
unless a style sets another, `use_style`) and from its qualitative map.
|
|
368
|
+
Other colors (CSS names, hex, `rgb()`, `oklch()`, tuples, `CMYK`, `Spot`) do not
|
|
369
|
+
depend on the variant; a print color gives its RGB approximation. An invalid color or
|
|
370
|
+
variant raises `ValueError`. `plt.registry.colors.names()` and `.variants()` list
|
|
371
|
+
the scales and variants.
|
|
372
|
+
|
|
373
|
+
Example:
|
|
374
|
+
|
|
375
|
+
```python
|
|
376
|
+
import plot_io as plt
|
|
377
|
+
|
|
378
|
+
plt.color("pastel blue 0.3").hex # '#b3d1f4'
|
|
379
|
+
plt.color("red", variant="base").hex # '#fb2c36'
|
|
380
|
+
plt.color("C0").with_alpha(0.5) # the first series color, translucent
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
| Parameter | Meaning |
|
|
384
|
+
|---|---|
|
|
385
|
+
| `spec` | Any color a setting takes: `"blue"`, `"pastel blue 0.3"`, `"blue 45%"`, `"C0"`, `"navy"`, `"#336699"`, `"rgb(255 128 0)"`, `(1, 0.5, 0)`, a `CMYK`. |
|
|
386
|
+
| `variant` | The variant of named colors written without one and of the series colors (one of `plt.registry.colors.variants()`); `None`: the current default. |
|
|
@@ -16,7 +16,8 @@ from vec_io import Simplify, Span
|
|
|
16
16
|
|
|
17
17
|
from . import registry
|
|
18
18
|
from .axis import Axis
|
|
19
|
-
from .
|
|
19
|
+
from .colors import color
|
|
20
|
+
from .colors.maps import ColorMap
|
|
20
21
|
from .colorbar import Colorbar
|
|
21
22
|
from .defaults import DEFAULTS
|
|
22
23
|
from .density import Density
|
|
@@ -54,6 +55,7 @@ __all__ = [
|
|
|
54
55
|
"linkage", "Tree", "Dendrogram", "QQ", "Raincloud", "Volcano", "Ma", "Manhattan",
|
|
55
56
|
# values: axes of mapped values, color maps, densities, errors, rich text
|
|
56
57
|
"ColorAxis", "SizeAxis", "ColorMap", "SizeMap", "Density", "Errors",
|
|
58
|
+
"color",
|
|
57
59
|
"Span", "Simplify", "group_summary", "every",
|
|
58
60
|
# values written with var() and calc(): typed as Expr
|
|
59
61
|
"Expr", "var", "calc",
|
|
@@ -66,7 +68,7 @@ __all__ = [
|
|
|
66
68
|
"__version__",
|
|
67
69
|
]
|
|
68
70
|
|
|
69
|
-
__version__ = "0.
|
|
71
|
+
__version__ = "0.14.0"
|
|
70
72
|
|
|
71
73
|
|
|
72
74
|
def __dir__() -> list[str]:
|
|
@@ -13,7 +13,7 @@ from . import kernels
|
|
|
13
13
|
from .transform import affine, apply
|
|
14
14
|
from .limits import check_limits, needs_quantiles, resolve_limits, symmetric
|
|
15
15
|
from .scales import AXIS_SCALES, Scale, get_scale
|
|
16
|
-
from .
|
|
16
|
+
from .colors.values import color
|
|
17
17
|
from . import groups
|
|
18
18
|
from .settings import (Setting, Settings, boolean, either, literal, number, one_of, pair,
|
|
19
19
|
table, text, time_zone)
|
|
@@ -19,7 +19,7 @@ from .canvas import Canvas
|
|
|
19
19
|
from ._methods import FigureColorbarMixin
|
|
20
20
|
from . import groups
|
|
21
21
|
from .axis import AxisState
|
|
22
|
-
from .
|
|
22
|
+
from .colors.values import resolve_color
|
|
23
23
|
from .settings import (Setting, Settings, boolean, canonical, either, literal, number, one_of,
|
|
24
24
|
route, table, text)
|
|
25
25
|
from .spec import current, set_boxes
|
|
@@ -221,7 +221,7 @@ class Colorbar(Settings):
|
|
|
221
221
|
|
|
222
222
|
def __init__(self, source: Any = None, plot: Any = None, figure: Any = None,
|
|
223
223
|
**settings: Any) -> None:
|
|
224
|
-
from .
|
|
224
|
+
from .colors.maps import ColorMap
|
|
225
225
|
from .mapped import ColorAxis, SizeAxis
|
|
226
226
|
if isinstance(source, ColorMap):
|
|
227
227
|
raise ValueError("a colorbar shows a color axis: give a mapped series, or a "
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"""Colors: values and named scales (:mod:`.values`), color maps, every set of colors with
|
|
2
|
+
its kind: qualitative, sequential, diverging, cyclic (:mod:`.maps`), and the bundled data
|
|
3
|
+
(:mod:`.data`). Color space conversions are vec_io's (:mod:`vec_io.paint`).
|
|
4
|
+
|
|
5
|
+
Public here: :func:`color` (``plt.color``); the scale and variant names are listed by
|
|
6
|
+
``plt.registry.colors``."""
|
|
7
|
+
|
|
8
|
+
from typing import Any
|
|
9
|
+
|
|
10
|
+
from vec_io import Color
|
|
11
|
+
|
|
12
|
+
from .variants import TABLES, VARIANTS
|
|
13
|
+
|
|
14
|
+
__all__ = ["color"]
|
|
15
|
+
|
|
16
|
+
#: The names of the color scales, in hue order, then the grays, black and white.
|
|
17
|
+
SCALE_NAMES: tuple[str, ...] = (*TABLES["base"], "black", "white")
|
|
18
|
+
#: The color variants; ``base`` is Tailwind CSS's shades.
|
|
19
|
+
VARIANT_NAMES: tuple[str, ...] = tuple(VARIANTS)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def color(spec: Any, variant: str | None = None) -> Color:
|
|
23
|
+
"""A color as plot_io draws it, as a ``vec_io.Color`` (``.hex``, ``.r``, ``.lightness``,
|
|
24
|
+
``with_alpha()``, ``mix()``…); ``"none"`` and ``"transparent"`` give
|
|
25
|
+
``Color(0, 0, 0, 0)``.
|
|
26
|
+
|
|
27
|
+
A named color without a variant word (``"red"``) and the series colors (``"C0"``,
|
|
28
|
+
``"C1"``, …) are those a new figure draws now: in its ``color_variant`` (``"forest"``
|
|
29
|
+
unless a style sets another, :func:`~plot_io.use_style`) and from its qualitative map.
|
|
30
|
+
Other colors (CSS names, hex, ``rgb()``, ``oklch()``, tuples, ``CMYK``, ``Spot``) do not
|
|
31
|
+
depend on the variant; a print color gives its RGB approximation. An invalid color or
|
|
32
|
+
variant raises ``ValueError``. ``plt.registry.colors.names()`` and ``.variants()`` list
|
|
33
|
+
the scales and variants.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
spec: Any color a setting takes: ``"blue"``, ``"pastel blue 0.3"``, ``"blue 45%"``, ``"C0"``, ``"navy"``, ``"#336699"``, ``"rgb(255 128 0)"``, ``(1, 0.5, 0)``, a ``CMYK``.
|
|
37
|
+
variant: The variant of named colors written without one and of the series colors (one of ``plt.registry.colors.variants()``); ``None``: the current default.
|
|
38
|
+
|
|
39
|
+
Example::
|
|
40
|
+
|
|
41
|
+
import plot_io as plt
|
|
42
|
+
|
|
43
|
+
plt.color("pastel blue 0.3").hex # '#b3d1f4'
|
|
44
|
+
plt.color("red", variant="base").hex # '#fb2c36'
|
|
45
|
+
plt.color("C0").with_alpha(0.5) # the first series color, translucent
|
|
46
|
+
"""
|
|
47
|
+
from .values import Named, _color, check_variant, rgba_of
|
|
48
|
+
|
|
49
|
+
if variant is not None:
|
|
50
|
+
variant = check_variant(variant)
|
|
51
|
+
v = _color(spec)
|
|
52
|
+
series = isinstance(v, str) and len(v) >= 2 and v[0] == "C" and v[1:].isdigit()
|
|
53
|
+
if series or (isinstance(v, Named) and v.variant is None and variant is None):
|
|
54
|
+
from ..figure import Figure
|
|
55
|
+
from .maps import cycle_of, map_of
|
|
56
|
+
|
|
57
|
+
given: dict[str, Any] = {} if variant is None else {"color_variant": variant}
|
|
58
|
+
fig = Figure(**given)
|
|
59
|
+
if not series:
|
|
60
|
+
variant = fig.resolve("color_variant")
|
|
61
|
+
else:
|
|
62
|
+
cycle = cycle_of(map_of(fig, "qualitative"))
|
|
63
|
+
return color(cycle[int(v[1:]) % len(cycle)], fig.resolve("color_variant"))
|
|
64
|
+
if isinstance(v, Named):
|
|
65
|
+
return Color.from_hex(v.in_variant(variant or "base"))
|
|
66
|
+
rgba = rgba_of(v)
|
|
67
|
+
if rgba is None:
|
|
68
|
+
return Color(0.0, 0.0, 0.0, 0.0)
|
|
69
|
+
r, g, b = (min(max(c, 0.0), 1.0) for c in rgba[:3])
|
|
70
|
+
return Color(r, g, b, min(max(rgba[3] if len(rgba) > 3 else 1.0, 0.0), 1.0))
|
|
@@ -16,13 +16,13 @@ from .canvas import Canvas
|
|
|
16
16
|
from ._methods import AnnotateMixin, AxLineMixin, BracketMixin, HLineMixin, HSpanMixin, TextMixin, VLineMixin, VSpanMixin
|
|
17
17
|
from . import groups
|
|
18
18
|
from . import kernels
|
|
19
|
-
from .
|
|
19
|
+
from .colors.values import color
|
|
20
20
|
|
|
21
21
|
from .shapes import swatch
|
|
22
22
|
from .settings import Setting, Settings, boolean, either, literal, number, one_of, table, text
|
|
23
23
|
from .validators import angle, length
|
|
24
24
|
from .lines import dash_of
|
|
25
|
-
from .
|
|
25
|
+
from .colors.values import resolve_color, with_alpha
|
|
26
26
|
from .text import Font, Run, draw_run, font_of, lines_run
|
|
27
27
|
from .times import axis_value
|
|
28
28
|
|
|
@@ -25,7 +25,7 @@ type on every panel of a figure with the panel's arguments. ``docs/api.md``,
|
|
|
25
25
|
|
|
26
26
|
from typing import Any
|
|
27
27
|
|
|
28
|
-
from .
|
|
28
|
+
from .colors.values import color, with_alpha
|
|
29
29
|
from .columns import KINDS, Columns
|
|
30
30
|
from .facets import PanelSet
|
|
31
31
|
from .layers.base import Series, common
|
|
@@ -8,7 +8,7 @@ from typing import TYPE_CHECKING, Any, Self, Unpack
|
|
|
8
8
|
from .canvas import Canvas
|
|
9
9
|
from ._methods import FigureMixin, FigureTitleMixin, MainTitleMixin
|
|
10
10
|
from . import groups
|
|
11
|
-
from .
|
|
11
|
+
from .colors.values import VARIANT_DOC, check_variant, color
|
|
12
12
|
|
|
13
13
|
from .settings import (DECLINE, custom_vars, BASE_THEME, Setting, Settings, Theme, boolean, dpi,
|
|
14
14
|
dpi_or_bool, either, literal, number, one_of, overriding,
|
|
@@ -96,7 +96,7 @@ _FR = Dim("1fr", 1.0, "fr")
|
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
def _kind_settings() -> Any:
|
|
99
|
-
from .
|
|
99
|
+
from .colors.maps import kind_settings
|
|
100
100
|
return kind_settings()
|
|
101
101
|
|
|
102
102
|
|
|
@@ -10,7 +10,7 @@ from array import array
|
|
|
10
10
|
from typing import TYPE_CHECKING, Any, Self, Unpack
|
|
11
11
|
|
|
12
12
|
from .. import kernels
|
|
13
|
-
from ..
|
|
13
|
+
from ..colors.values import color, with_alpha
|
|
14
14
|
from ..settings import DECLINE, Setting, number, one_of, table
|
|
15
15
|
from ..transform import settings_both as coord_settings
|
|
16
16
|
from ..layers import add_layer
|
|
@@ -10,7 +10,7 @@ from typing import Any
|
|
|
10
10
|
|
|
11
11
|
from .._methods import BedMixin, GenesMixin, GtfMixin
|
|
12
12
|
from .. import groups
|
|
13
|
-
from ..
|
|
13
|
+
from ..colors.values import color, nearest_named, rgba_of, variant_of, with_alpha
|
|
14
14
|
from ..labels import NAME_POSITIONS, row as name_row, spot
|
|
15
15
|
from ..settings import Setting, boolean, number, one_of, table
|
|
16
16
|
from ..transform import settings_both as coord_settings
|
|
@@ -13,7 +13,7 @@ from array import array
|
|
|
13
13
|
from typing import Any
|
|
14
14
|
|
|
15
15
|
from .._methods import LinksMixin
|
|
16
|
-
from ..
|
|
16
|
+
from ..colors.values import color, with_alpha
|
|
17
17
|
from ..settings import Setting, one_of, table
|
|
18
18
|
from ..transform import settings_both as coord_settings
|
|
19
19
|
from ..layers import add_layer
|
|
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING, Any, Self, Unpack
|
|
|
12
12
|
from vec_io.arrays import doubles
|
|
13
13
|
|
|
14
14
|
from .. import groups, kernels
|
|
15
|
-
from ..
|
|
15
|
+
from ..colors.values import color, with_alpha
|
|
16
16
|
from ..settings import Setting, one_of, table
|
|
17
17
|
from ..transform import settings_both as coord_settings
|
|
18
18
|
from ..layers import positions, add_layer
|
|
@@ -19,7 +19,7 @@ from collections.abc import Mapping
|
|
|
19
19
|
from typing import TYPE_CHECKING, Any, Self, Unpack
|
|
20
20
|
|
|
21
21
|
from .. import kernels
|
|
22
|
-
from ..
|
|
22
|
+
from ..colors.values import color
|
|
23
23
|
from ..layers import add_layer
|
|
24
24
|
from ..layers.base import Series, common
|
|
25
25
|
from ..layers.core import Call, Layer, Table
|
|
@@ -15,7 +15,7 @@ first.
|
|
|
15
15
|
from collections.abc import Callable, Iterable
|
|
16
16
|
from typing import Any
|
|
17
17
|
|
|
18
|
-
from .
|
|
18
|
+
from .colors.values import color
|
|
19
19
|
from .lines import line_style
|
|
20
20
|
from .markers import MARKERS, check_marker
|
|
21
21
|
from .numbers import _check_minus, _check_precision, _check_str
|
|
@@ -90,7 +90,7 @@ def setting(name: str, candidates: Iterable[str]) -> str | None:
|
|
|
90
90
|
|
|
91
91
|
def _variant(key: str) -> str:
|
|
92
92
|
"""A hint for a color with a variant word (``"pastel navy"``, ``"red pastel"``)."""
|
|
93
|
-
from .
|
|
93
|
+
from .colors.variants import VARIANTS
|
|
94
94
|
words = key.split()
|
|
95
95
|
at = [i for i, w in enumerate(words) if w in VARIANTS]
|
|
96
96
|
if not at:
|
|
@@ -12,8 +12,8 @@ import math
|
|
|
12
12
|
from typing import Any
|
|
13
13
|
|
|
14
14
|
from .. import groups
|
|
15
|
-
from ..
|
|
16
|
-
from ..
|
|
15
|
+
from ..colors.values import color as _color # noqa: F401 (re-exported for presets)
|
|
16
|
+
from ..colors.values import VARIANT_DOC, check_variant
|
|
17
17
|
from ..levels import level_order
|
|
18
18
|
from .stats import check_estimate, check_interval
|
|
19
19
|
from ..limits import check_limits
|
|
@@ -27,7 +27,7 @@ from ..values import lazy
|
|
|
27
27
|
__all__ = ["Series", "SeriesMeta", "column", "COMMON", "common", "upward_message",
|
|
28
28
|
"slot_width", "slot_parts"]
|
|
29
29
|
|
|
30
|
-
_check_color_map = lazy("
|
|
30
|
+
_check_color_map = lazy("colors.maps", "check_series_map")
|
|
31
31
|
_check_size_map = lazy("values", "check_size_map")
|
|
32
32
|
_check_color_axis = lazy("mapped", "check_color_axis")
|
|
33
33
|
_check_size_axis = lazy("mapped", "check_size_axis")
|
|
@@ -265,7 +265,7 @@ class SeriesMeta(type):
|
|
|
265
265
|
if isinstance(v, str) and n not in pos:
|
|
266
266
|
if tables.has_column(data, v):
|
|
267
267
|
if n in ("color", "edge_color", "marker_color", "marker_edge_color"):
|
|
268
|
-
from ..
|
|
268
|
+
from ..colors.values import color
|
|
269
269
|
try:
|
|
270
270
|
color(v)
|
|
271
271
|
tables.color_name_warning(v)
|
|
@@ -50,7 +50,7 @@ class DrawContext:
|
|
|
50
50
|
self.__dict__.pop(k, None)
|
|
51
51
|
|
|
52
52
|
def color(self, value: Any) -> Any:
|
|
53
|
-
from ..
|
|
53
|
+
from ..colors.values import resolve_color
|
|
54
54
|
from ..units import Fixed
|
|
55
55
|
if isinstance(value, Fixed): # a named color kept as given
|
|
56
56
|
value = value.in_context(self.plot)
|
|
@@ -167,7 +167,7 @@ def draw_part(ctx: Any, kind: str, options: Any, v: Any, x: float, y: float, w:
|
|
|
167
167
|
"""Draw one symbol part (values ``v`` of :func:`part_values`) in box ``x, y, w, h``."""
|
|
168
168
|
if v is None:
|
|
169
169
|
return
|
|
170
|
-
from ..
|
|
170
|
+
from ..colors.values import with_alpha
|
|
171
171
|
from ..shapes import swatch
|
|
172
172
|
canvas = ctx.canvas
|
|
173
173
|
o = dict(options)
|
|
@@ -229,7 +229,7 @@ def _per_point(v: Any) -> bool:
|
|
|
229
229
|
|
|
230
230
|
def _rgba_rows(v: Any, n: int) -> Any:
|
|
231
231
|
"""A paint as ``n`` flat RGBA rows (``array('d')``), or ``None`` when it is not RGBA."""
|
|
232
|
-
from ..
|
|
232
|
+
from ..colors.values import CMYK, rgba_of
|
|
233
233
|
if isinstance(v, memoryview) and v.ndim == 2:
|
|
234
234
|
m: Any = v
|
|
235
235
|
return array.array("d", m.cast("B").cast("d")) if m.shape[1] == 4 else None
|
|
@@ -23,7 +23,7 @@ from .. import kernels
|
|
|
23
23
|
from ..markers import area_factor, resolve
|
|
24
24
|
from ..settings import Setting, number
|
|
25
25
|
from ..validators import Custom, typed
|
|
26
|
-
from ..
|
|
26
|
+
from ..colors.values import resolve_color, with_alpha
|
|
27
27
|
from ..lines import dash_of
|
|
28
28
|
from ..spec import auto_colors as _auto_colors
|
|
29
29
|
from ..values import Values, is_computed, paint, size_value
|
|
@@ -218,7 +218,7 @@ def base_colors(series: Any, ctx: Any, keys: list[Any], what: str = "sets",
|
|
|
218
218
|
opacity: numbers through the series' color axis (items), the colors given (one, a
|
|
219
219
|
list, a dict by set or item), else the plot's colors (each set its color; items the series
|
|
220
220
|
color); ``saturation`` applied when the series has it."""
|
|
221
|
-
from ..
|
|
221
|
+
from ..colors.values import desaturate
|
|
222
222
|
s = series
|
|
223
223
|
c = s.resolve("color")
|
|
224
224
|
n = len(keys)
|
|
@@ -92,7 +92,7 @@ def own_map(series: Any) -> Any:
|
|
|
92
92
|
"""The colors a series' own ``color_map`` gives its sets, group members and levels: a
|
|
93
93
|
``ColorMap`` (in the series' color variant), a dict level → color, or ``None`` (none set,
|
|
94
94
|
or ``"auto"``: the plot's colors)."""
|
|
95
|
-
from ..
|
|
95
|
+
from ..colors.maps import chosen_map
|
|
96
96
|
if "color_map" not in series.SETTINGS or not series.is_set("color_map"):
|
|
97
97
|
return None
|
|
98
98
|
v = series.resolve("color_map")
|
|
@@ -110,8 +110,8 @@ def train_colors(plot: Any, calls: list[Any], twin_calls: list[Any], cycle: Any)
|
|
|
110
110
|
own ``color_map`` colors its sets and its group's members (:func:`own_map`). A call
|
|
111
111
|
that needs no hue takes its ``plain_color`` when set (:func:`plain_of`) and leaves the
|
|
112
112
|
plot's turn where it is. Returns the plot's colors (``"C<n>"`` refer to them)."""
|
|
113
|
-
from ..
|
|
114
|
-
from ..
|
|
113
|
+
from ..colors.maps import cycle_of, map_of
|
|
114
|
+
from ..colors.values import resolve_color, variant_of
|
|
115
115
|
from ..levels import assign, level_color_count
|
|
116
116
|
colored = calls + twin_calls
|
|
117
117
|
plain = {id(c): v for c in colored if (v := plain_of(c)) is not None}
|
|
@@ -8,7 +8,7 @@ from vec_io.arrays import doubles
|
|
|
8
8
|
|
|
9
9
|
from .canvas import Canvas
|
|
10
10
|
from ._methods import SizeLegendMixin
|
|
11
|
-
from .
|
|
11
|
+
from .colors.values import resolve_color, with_alpha
|
|
12
12
|
from .settings import Setting, Settings, table, text
|
|
13
13
|
from .validators import length
|
|
14
14
|
from .shapes import swatch
|
|
@@ -418,7 +418,7 @@ def _label_key(label: Any) -> str:
|
|
|
418
418
|
def _opaque(c: Any) -> Any:
|
|
419
419
|
if c is None:
|
|
420
420
|
return None
|
|
421
|
-
from .
|
|
421
|
+
from .colors.values import rgba_of
|
|
422
422
|
rgba = rgba_of(c)
|
|
423
423
|
return None if rgba is None else (rgba[0], rgba[1], rgba[2], 1.0)
|
|
424
424
|
|
|
@@ -586,8 +586,8 @@ class SizeRows:
|
|
|
586
586
|
def draw(self, canvas: Canvas, g: Any) -> None:
|
|
587
587
|
if self.key is None:
|
|
588
588
|
return
|
|
589
|
-
from .
|
|
590
|
-
from .
|
|
589
|
+
from .colors.maps import cycle_of, map_of
|
|
590
|
+
from .colors.values import resolve_color
|
|
591
591
|
plot = self.key.series[0].plot
|
|
592
592
|
cycle = cycle_of(map_of(plot, "qualitative"), 10)
|
|
593
593
|
|
|
@@ -215,7 +215,7 @@ class Levels:
|
|
|
215
215
|
|
|
216
216
|
def item_colors(self, series: Any, ctx: Any) -> Any:
|
|
217
217
|
"""Each point's colour (items types): its level's, through ``kernels.take``."""
|
|
218
|
-
from .
|
|
218
|
+
from .colors.values import rgba_of
|
|
219
219
|
from .layers.paint import memo
|
|
220
220
|
from .spec import auto_colors
|
|
221
221
|
|
|
@@ -29,7 +29,7 @@ from typing import Any
|
|
|
29
29
|
from ._methods import ColorAxisMixin, SizeAxisMixin
|
|
30
30
|
from . import kernels
|
|
31
31
|
from .axis import Axis, AxisState
|
|
32
|
-
from .
|
|
32
|
+
from .colors.maps import MAP_WORDS, ColorMap, check_color_map, chosen_map, kind_settings
|
|
33
33
|
from .scales import NUMERIC_SCALES
|
|
34
34
|
from .settings import (DECLINE, Setting, Settings, cascade, given_rule, number, one_of,
|
|
35
35
|
table)
|
|
@@ -6,14 +6,14 @@ from .canvas import Canvas
|
|
|
6
6
|
from ._methods import FigureLegendMixin, PlotMixin, TitleMixin
|
|
7
7
|
from . import groups
|
|
8
8
|
from .axis import Axis
|
|
9
|
-
from .
|
|
9
|
+
from .colors.values import VARIANT_DOC, check_variant, color
|
|
10
10
|
from .settings import (DECLINE, custom_vars, Setting, Settings, boolean, canonical_kwargs,
|
|
11
11
|
dpi_or_bool, either, literal, number, one_of, route, simplify_value,
|
|
12
12
|
table, text)
|
|
13
13
|
from .guides import anchor as _anchor, placement, set_place, where_of
|
|
14
14
|
from .titles import ALIGNS, CREATED, SIDES, TitleBase, align_of
|
|
15
15
|
from .validators import length, typed
|
|
16
|
-
from .
|
|
16
|
+
from .colors.maps import kind_settings
|
|
17
17
|
|
|
18
18
|
if TYPE_CHECKING:
|
|
19
19
|
from .colorbar import Colorbar
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
from typing import Any, Callable
|
|
4
4
|
|
|
5
|
-
from ..
|
|
5
|
+
from ..colors.values import desaturate
|
|
6
6
|
from ..layers.core import Call, Entry
|
|
7
7
|
from ..layers.paint import faded, memo
|
|
8
8
|
from ..validators import typed
|
|
@@ -57,7 +57,7 @@ def columns_meta(call: Call, roles: dict[str, str]) -> None:
|
|
|
57
57
|
def set_color_value(v: Any) -> Any:
|
|
58
58
|
"""``color`` of a series of value sets: a color, one per set (a list), or a dict
|
|
59
59
|
``{set name: color}``."""
|
|
60
|
-
from ..
|
|
60
|
+
from ..colors.values import color
|
|
61
61
|
from ..layers.paint import colors_only
|
|
62
62
|
if isinstance(v, dict):
|
|
63
63
|
return {k: color(c) for k, c in v.items()}
|
|
@@ -126,8 +126,8 @@ def gradient_entry(series: Any, name: Any, cmap: Callable[[], Any]) -> Any:
|
|
|
126
126
|
"Mapping[Any, ColorLike]")
|
|
127
127
|
def map_or_color(v: Any) -> Any:
|
|
128
128
|
"""The ``color_map`` of a pie or contour: a ``color_map`` value, or one color."""
|
|
129
|
-
from ..
|
|
130
|
-
from ..
|
|
129
|
+
from ..colors.maps import check_color_map
|
|
130
|
+
from ..colors.values import color
|
|
131
131
|
try:
|
|
132
132
|
return check_color_map(v)
|
|
133
133
|
except (TypeError, ValueError) as e:
|
|
@@ -141,7 +141,7 @@ def given_colors(series: Any, n: int, kinds: tuple[str, ...] | None = None) -> A
|
|
|
141
141
|
"""What a series' own ``color_map`` (:func:`map_or_color`) gives ``n`` items: one color,
|
|
142
142
|
or a list, the map's colors (``kinds``: only of a map of one of those kinds); ``None``:
|
|
143
143
|
``"auto"``, or a map of another kind."""
|
|
144
|
-
from ..
|
|
144
|
+
from ..colors.maps import MAP_WORDS, ColorMap, chosen_map, cycle_of
|
|
145
145
|
v = series.resolve("color_map")
|
|
146
146
|
if v is None or v == "auto":
|
|
147
147
|
return None
|
|
@@ -6,7 +6,7 @@ from typing import Any
|
|
|
6
6
|
|
|
7
7
|
from .._methods import AreaMixin
|
|
8
8
|
from .. import groups
|
|
9
|
-
from ..
|
|
9
|
+
from ..colors.values import with_alpha
|
|
10
10
|
from ..layers import positions
|
|
11
11
|
from ..layers.base import Series, common
|
|
12
12
|
from ..layers.core import Table
|
|
@@ -16,7 +16,7 @@ from ..layers.grammar import Lay, Spec, flipped
|
|
|
16
16
|
from ..layers.paint import Paint, base_colors, role
|
|
17
17
|
from ..layers.positions import Dodge, check_stack, slot_edges, slots
|
|
18
18
|
from ..numbers import NumberStyle, check_format, format_numbers
|
|
19
|
-
from ..
|
|
19
|
+
from ..colors.values import color
|
|
20
20
|
from ..settings import Setting, boolean, number, one_of, table
|
|
21
21
|
from ..text import font_of
|
|
22
22
|
from ..transform import settings_both as coord_settings
|