plot-io 0.7.0__tar.gz → 0.9.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.
Files changed (220) hide show
  1. {plot_io-0.7.0 → plot_io-0.9.0}/API.md +490 -230
  2. plot_io-0.9.0/EXAMPLES.md +1050 -0
  3. plot_io-0.7.0/README.md → plot_io-0.9.0/PKG-INFO +51 -7
  4. plot_io-0.7.0/PKG-INFO → plot_io-0.9.0/README.md +35 -23
  5. {plot_io-0.7.0 → plot_io-0.9.0}/examples/annotated.py +1 -1
  6. {plot_io-0.7.0 → plot_io-0.9.0}/examples/bars.py +2 -2
  7. {plot_io-0.7.0 → plot_io-0.9.0}/examples/colorbars.py +6 -6
  8. plot_io-0.9.0/examples/dots.py +44 -0
  9. {plot_io-0.7.0 → plot_io-0.9.0}/examples/error_bars.py +1 -1
  10. {plot_io-0.7.0 → plot_io-0.9.0}/examples/groups.py +1 -1
  11. {plot_io-0.7.0 → plot_io-0.9.0}/examples/shared_colorbar.py +1 -1
  12. {plot_io-0.7.0 → plot_io-0.9.0}/examples/shared_legend.py +1 -1
  13. {plot_io-0.7.0 → plot_io-0.9.0}/examples/shared_sizes.py +4 -5
  14. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/__init__.py +16 -18
  15. plot_io-0.9.0/plot_io/_backend.py +46 -0
  16. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/README.md +26 -16
  17. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/_api.py +57 -27
  18. plot_io-0.9.0/plot_io/_native/bin/linux-aarch64.so +0 -0
  19. plot_io-0.9.0/plot_io/_native/bin/linux-x86_64.so +0 -0
  20. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/bin/macos-arm64.dylib +0 -0
  21. plot_io-0.9.0/plot_io/_native/bin/windows-arm64.dll +0 -0
  22. plot_io-0.9.0/plot_io/_native/bin/windows-x86_64.dll +0 -0
  23. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/kernels.py +28 -38
  24. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/manifest.json +12 -12
  25. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/alloc.c +2 -63
  26. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/colormap.c +15 -18
  27. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/math.c +17 -120
  28. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/plio.h +15 -20
  29. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/plio_api.h +53 -25
  30. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/plot.c +40 -70
  31. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/signatures.c +15 -15
  32. plot_io-0.9.0/plot_io/_native/src/sort.c +59 -0
  33. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/stats.c +96 -125
  34. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/axis.py +20 -7
  35. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/color/maps.py +12 -19
  36. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/color/palettes.py +2 -2
  37. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/color/values.py +7 -6
  38. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/colorbar.py +246 -86
  39. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/decorations.py +37 -36
  40. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/defaults.py +98 -51
  41. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/density.py +1 -1
  42. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/facets.py +7 -17
  43. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/figure.py +86 -57
  44. plot_io-0.9.0/plot_io/genome/pack.py +27 -0
  45. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/genome/regions.py +8 -2
  46. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/genome/sources.py +77 -21
  47. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/genome/tracks.py +79 -92
  48. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/geometry.py +7 -4
  49. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/groups.py +19 -17
  50. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/kernels.py +59 -87
  51. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/labels.py +16 -9
  52. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/__init__.py +13 -6
  53. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/base.py +74 -35
  54. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/core.py +8 -5
  55. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/geoms.py +18 -26
  56. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/paint.py +42 -31
  57. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/positions.py +24 -19
  58. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/stats.py +215 -61
  59. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layout.py +280 -271
  60. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/legend.py +79 -72
  61. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/limits.py +3 -2
  62. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/mapped.py +15 -7
  63. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/markers.py +4 -10
  64. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/plot.py +89 -52
  65. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/__init__.py +8 -7
  66. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/_util.py +62 -21
  67. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/area.py +33 -31
  68. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/bar.py +13 -18
  69. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/box.py +11 -31
  70. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/catpoints.py +1 -1
  71. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/contour.py +17 -18
  72. plot_io-0.9.0/plot_io/presets/dots.py +344 -0
  73. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/ecdf.py +12 -16
  74. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/errorbar.py +5 -5
  75. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/errors.py +9 -9
  76. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/fill.py +3 -3
  77. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/heatmap.py +8 -7
  78. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/hexbin.py +6 -5
  79. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/hist.py +67 -55
  80. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/hist2d.py +5 -5
  81. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/kde.py +46 -36
  82. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/kde2d.py +10 -5
  83. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/line.py +3 -3
  84. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/pie.py +9 -9
  85. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/regression.py +5 -5
  86. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/scatter.py +3 -3
  87. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/stem.py +2 -2
  88. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/violin.py +35 -28
  89. plot_io-0.9.0/plot_io/registry.py +88 -0
  90. plot_io-0.9.0/plot_io/render.py +446 -0
  91. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/rows.py +2 -2
  92. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/settings.py +156 -49
  93. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/sharing.py +20 -17
  94. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/spec.py +2 -2
  95. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/states.py +34 -1
  96. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/styles/__init__.py +59 -32
  97. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/styles/library.py +133 -160
  98. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/text.py +28 -4
  99. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/ticks.py +1 -9
  100. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/times.py +27 -10
  101. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/titles.py +56 -8
  102. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/units.py +3 -6
  103. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/values.py +14 -5
  104. {plot_io-0.7.0 → plot_io-0.9.0}/pyproject.toml +2 -2
  105. {plot_io-0.7.0 → plot_io-0.9.0}/tests/golden.json +16 -11
  106. {plot_io-0.7.0 → plot_io-0.9.0}/tests/helpers.py +4 -4
  107. plot_io-0.9.0/tests/test_api.py +129 -0
  108. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_bars.py +2 -2
  109. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_colorbars.py +13 -12
  110. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_decorations.py +8 -8
  111. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_defaults.py +9 -7
  112. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_density.py +35 -29
  113. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_distributions.py +12 -11
  114. plot_io-0.9.0/tests/test_docs.py +70 -0
  115. plot_io-0.9.0/tests/test_dots.py +180 -0
  116. plot_io-0.9.0/tests/test_edge_cases.py +110 -0
  117. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_figure_title.py +1 -1
  118. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_fonts.py +1 -1
  119. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_genome.py +41 -43
  120. plot_io-0.9.0/tests/test_genome_fixes.py +231 -0
  121. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_geometry.py +13 -15
  122. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_golden.py +83 -24
  123. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_grids.py +10 -8
  124. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_heatmap.py +2 -2
  125. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_jxl_output.py +12 -12
  126. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_layers.py +18 -16
  127. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_layout.py +4 -4
  128. plot_io-0.9.0/tests/test_layout_fixes.py +242 -0
  129. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_maps.py +7 -7
  130. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_markers.py +5 -5
  131. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_markup.py +6 -6
  132. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_native.py +60 -6
  133. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_occupancy.py +4 -16
  134. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_output.py +97 -45
  135. plot_io-0.9.0/tests/test_output_settings_fixes.py +217 -0
  136. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_palettes.py +5 -5
  137. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_pie.py +1 -1
  138. plot_io-0.9.0/tests/test_plot_fixes.py +312 -0
  139. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_reflines.py +1 -1
  140. plot_io-0.9.0/tests/test_registry.py +56 -0
  141. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_rows.py +4 -4
  142. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_series.py +6 -6
  143. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_settings.py +27 -24
  144. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_shared_legends.py +6 -6
  145. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_sharing.py +5 -5
  146. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_simplify.py +8 -8
  147. plot_io-0.9.0/tests/test_size_keys.py +163 -0
  148. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_stats.py +2 -2
  149. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_style_settings.py +6 -6
  150. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_style_types.py +2 -2
  151. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_styles.py +69 -24
  152. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_tables.py +23 -15
  153. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_ticks.py +8 -1
  154. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_time_twin.py +6 -6
  155. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_titles.py +7 -7
  156. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_transform.py +3 -3
  157. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_units.py +9 -9
  158. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_values.py +20 -20
  159. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_vocabulary.py +15 -11
  160. {plot_io-0.7.0 → plot_io-0.9.0}/tools/build_native.py +43 -16
  161. {plot_io-0.7.0 → plot_io-0.9.0}/tools/settings_doc.py +17 -6
  162. plot_io-0.7.0/EXAMPLES.md +0 -570
  163. plot_io-0.7.0/plot_io/_backend.py +0 -43
  164. plot_io-0.7.0/plot_io/_native/bin/linux-aarch64.so +0 -0
  165. plot_io-0.7.0/plot_io/_native/bin/linux-x86_64.so +0 -0
  166. plot_io-0.7.0/plot_io/_native/bin/windows-arm64.dll +0 -0
  167. plot_io-0.7.0/plot_io/_native/bin/windows-x86_64.dll +0 -0
  168. plot_io-0.7.0/plot_io/_native/src/data.c +0 -47
  169. plot_io-0.7.0/plot_io/_threads.py +0 -43
  170. plot_io-0.7.0/plot_io/genome/pack.py +0 -23
  171. plot_io-0.7.0/plot_io/render.py +0 -381
  172. plot_io-0.7.0/plot_io/stats.py +0 -138
  173. plot_io-0.7.0/tests/test_docs.py +0 -19
  174. {plot_io-0.7.0 → plot_io-0.9.0}/LICENSE +0 -0
  175. {plot_io-0.7.0 → plot_io-0.9.0}/examples/box_plots.py +0 -0
  176. {plot_io-0.7.0 → plot_io-0.9.0}/examples/density.py +0 -0
  177. {plot_io-0.7.0 → plot_io-0.9.0}/examples/distributions.py +0 -0
  178. {plot_io-0.7.0 → plot_io-0.9.0}/examples/facets.py +0 -0
  179. {plot_io-0.7.0 → plot_io-0.9.0}/examples/genome_tracks.py +0 -0
  180. {plot_io-0.7.0 → plot_io-0.9.0}/examples/grids2d.py +0 -0
  181. {plot_io-0.7.0 → plot_io-0.9.0}/examples/heatmap.py +0 -0
  182. {plot_io-0.7.0 → plot_io-0.9.0}/examples/large_data.py +0 -0
  183. {plot_io-0.7.0 → plot_io-0.9.0}/examples/layouts.py +0 -0
  184. {plot_io-0.7.0 → plot_io-0.9.0}/examples/line_band.py +0 -0
  185. {plot_io-0.7.0 → plot_io-0.9.0}/examples/scales.py +0 -0
  186. {plot_io-0.7.0 → plot_io-0.9.0}/examples/scatter_groups.py +0 -0
  187. {plot_io-0.7.0 → plot_io-0.9.0}/examples/styles.py +0 -0
  188. {plot_io-0.7.0 → plot_io-0.9.0}/examples/time_twin.py +0 -0
  189. {plot_io-0.7.0 → plot_io-0.9.0}/examples/titles.py +0 -0
  190. {plot_io-0.7.0 → plot_io-0.9.0}/examples/units.py +0 -0
  191. {plot_io-0.7.0 → plot_io-0.9.0}/examples/variable_fonts.py +0 -0
  192. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/__init__.py +0 -0
  193. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/_native/src/rt.c +0 -0
  194. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/color/__init__.py +0 -0
  195. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/color/data.py +0 -0
  196. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/genome/__init__.py +0 -0
  197. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/genome/layout.py +0 -0
  198. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/genome/scale.py +0 -0
  199. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/context.py +0 -0
  200. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/layers/pipeline.py +0 -0
  201. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/lines.py +0 -0
  202. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/markup.py +0 -0
  203. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/numbers.py +0 -0
  204. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/occupancy.py +0 -0
  205. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/presets/curves.py +0 -0
  206. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/py.typed +0 -0
  207. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/scales.py +0 -0
  208. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/seams.py +0 -0
  209. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/shapes.py +0 -0
  210. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/sizemaps.py +0 -0
  211. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/tables.py +0 -0
  212. {plot_io-0.7.0 → plot_io-0.9.0}/plot_io/transform.py +0 -0
  213. {plot_io-0.7.0 → plot_io-0.9.0}/tests/fonts/PioTest-Bold.ttf +0 -0
  214. {plot_io-0.7.0 → plot_io-0.9.0}/tests/fonts/PioTest-Regular.ttf +0 -0
  215. {plot_io-0.7.0 → plot_io-0.9.0}/tests/fonts/VarTest.ttf +0 -0
  216. {plot_io-0.7.0 → plot_io-0.9.0}/tests/stats_reference.json +0 -0
  217. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_box.py +0 -0
  218. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_entry.py +0 -0
  219. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_limits.py +0 -0
  220. {plot_io-0.7.0 → plot_io-0.9.0}/tests/test_numbers.py +0 -0
@@ -19,20 +19,24 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
19
19
 
20
20
  * **Model.** A `Figure` holds plots (and colorbars) in a grid, and titles; a `Plot` holds
21
21
  series, two axes, titles, a legend and colorbars; a series holds data and style. Nothing is
22
- computed until the figure is drawn (`save`, `to_bytes`, `draw`), so settings can change
22
+ computed until the figure is drawn (`save`, `write`, `draw`), so settings can change
23
23
  in any order.
24
24
  * **Settings.** Every object takes its settings as keywords when created and in
25
25
  `set(**settings)`, which returns the object. `set(name=None)` goes back to the inherited
26
26
  or default value. `get(name)` returns the value as given (`"4.5pt"`, `"var(color)"`),
27
27
  `resolve(name)` the final one (px, degrees, colors), and `explain(name)` where it comes
28
28
  from ([values](#values)). Unknown names and invalid values raise `ValueError` naming
29
- the setting (with the nearest valid name).
29
+ the setting (with the nearest valid name; `alpha=` names `opacity=`).
30
30
  * **Inheritance.** Settings marked *inherited* in the tables (font, line width, palette,
31
- alpha, `rasterize`, `simplify`) are looked up series → plot → figure → style.
31
+ `opacity`, `rasterize`, `simplify`) are looked up series → plot → figure → style.
32
+ * **Shorthands.** A setting has one full name and at most one shorthand; marker names have
33
+ shorthands too ([shorthands](#shorthands)). Giving a shorthand with its full name is an
34
+ error.
35
+
32
36
  * **Setting groups.** Settings that travel together are declared once as a group and
33
37
  embedded by each owner: `Font` (family, size, variable-font axes), `TextStyle` (size,
34
38
  weight, style, color of one text element), `Stroke` (color, width, dash style, caps,
35
- joins), `Marker`, `FillStyle` (`fill`: on or off, an opacity or a color) and
39
+ joins), `Marker`, `FillStyle` (`fill`: on, off or a color; `fill_opacity`) and
36
40
  `NumberFormat`. The naming rule: an owner's primary element takes a group unprefixed, a
37
41
  secondary one prefixed, and every member's prefixed name follows its pattern. A
38
42
  scatter's markers are `size`, `edge_color`, …; a line's are `marker_size`,
@@ -40,9 +44,10 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
40
44
  `whisker_style`; an axis' tick labels are `tick_label_font_size`, `tick_label_weight`,
41
45
  `tick_label_color`. Each table ends with the groups the class embeds and their
42
46
  prefixes; [groups](#setting-groups) lists the members.
43
- * **Defaults.** Every default is in one dict, `pl.DEFAULTS` (`plot_io/defaults.py`; read
44
- it, do not change it: styles set other values): bare names for inherited settings (font size,
45
- sans-serif, black text, line width, `simplify="auto"`, the palette, …),
47
+ * **Defaults.** Every default is in one read-only mapping, `pl.DEFAULTS`
48
+ (`plot_io/defaults.py`), the `"default"` style that ends every figure's
49
+ [style chain](#10-styles); styles set other values. Bare names for inherited settings
50
+ (font size, sans-serif, black text, line width, `simplify="auto"`, the palette, …),
46
51
  `"Class.name"` for the settings of each class and `"Group.member"` for every embedding
47
52
  of a group member (`"Marker.size"`: every marker size). A class without an entry uses
48
53
  its base class's, then the group's. Entries are plain data: a default that follows
@@ -59,20 +64,25 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
59
64
  the figure is drawn.
60
65
  * **Resolution.** One cascade finds every value, for `resolve`, `get` and `explain`:
61
66
  1. the value set on the object; for a plot's x or y axis, then the value set on the
62
- figure's axis of that role (`fig.x_axis(…)`);
63
- 2. a rule of the class (a track's axis lines from its content);
64
- 3. the style's key for the object's class, then for its base classes (`"Series.alpha"`
65
- reaches every series), stopping at a class that has a default of its own;
66
- 4. for inherited settings, the parent's value (unless the class default refers to it
67
- with `inherit`);
68
- 5. the style's key for the setting's group (`"Marker.size"`);
69
- 6. the class default, then the group default;
70
- 7. for inherited settings, the style's bare name, then `DEFAULTS`'.
71
-
72
- An owner's key always comes before its group's: `"Line.marker_size"` overrides
73
- `"Marker.size"` for lines.
74
- * **Styles.** `Figure(style=…)` presets settings: a style name or a dict of settings,
75
- merged over the inherited defaults (the bare names of `DEFAULTS`). See [Styles](#styles).
67
+ figure's axis of that role (`fig.x_axis(…)`); for a series' own color or size axis,
68
+ the series' `color_scale`, `color_limits`, … ;
69
+ 2. each style of the figure's chain, nearest first: its key for the object's class,
70
+ then for its base classes (`"Series.opacity"` reaches every series), stopping at a
71
+ class that has a default of its own, then its key for the setting's group
72
+ (`"Marker.size"`). A rule of the class, a default it computes from the model (a
73
+ track's axis lines from its content, the width, spacing, columns and shared x of
74
+ tracks), comes after the keys of its class and of more specific ones
75
+ (`"Track.spines"`, `"Figure.width"`) and before those of its base classes
76
+ (`"Plot.spines"`);
77
+ 3. for inherited settings, the parent's value;
78
+ 4. the class default, then the group default (first, when it refers to the parent's
79
+ value with `inherit`);
80
+ 5. for inherited settings, the bare name: the nearest style's, else `DEFAULTS`'.
81
+
82
+ Within one style, or within `DEFAULTS`, an owner's key comes before its group's:
83
+ `"Line.marker_size"` overrides `"Marker.size"` for lines.
84
+ * **Styles.** `Figure(style=…)` presets settings: a style name or a dict of settings, in
85
+ front of `DEFAULTS`. See [Styles](#10-styles).
76
86
  * **Entry points.** `pl.Figure()`, `pl.Plot()` and the series classes (`pl.Scatter()`, …)
77
87
  each create the levels above them: `pl.Scatter(x, y)` makes a plot (`.plot`) in a new
78
88
  figure (`.plot.figure`). `fig.plot(…)` is `pl.Plot(figure=fig, …)` and `p.scatter(…)` is
@@ -86,8 +96,17 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
86
96
  `Swarm` `width`) are `"80%"` of the slot or `"0.8d"` in data units. Positions along an
87
97
  axis (a decoration's `min`/`max`) take bare numbers as data values. See
88
98
  [values](#values).
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).
99
+ PDF pages are sized in pt (× 0.75).
100
+ * **Resolutions.** A dpi is dots per inch: a number (`150`, `16`), or a multiple of 96
101
+ written `"2x"` (192 dpi), wherever a resolution is taken (`dpi`, `default_dpi`,
102
+ `rasterize`, `simplify`, `flatten`'s `dpi`). Images are `dpi` pixels per inch (the
103
+ figure's `default_dpi`, `"4x"`, when an output gives none): `96` gives one image pixel per
104
+ px, `"4x"` four.
105
+ * **Opacity and alpha.** `opacity` (and `fill_opacity`, `band_opacity`, `frame_opacity`,
106
+ `glyph_opacity`, `opacity_range`) multiplies what is drawn; alpha is the alpha channel of
107
+ a color (`"#rrggbbaa"`, `"rgb(… / 0.5)"`), kept and multiplied by the opacity. `fill` is
108
+ `True` (the owner's color), a color or `False`; its opacity is `fill_opacity`, for a
109
+ color too, as in SVG (`fill="red", fill_opacity=1` for an opaque red fill).
91
110
  * **Data.** Sequences (`None` = missing), `array.array`, or any buffer (numpy arrays are
92
111
  read without importing numpy). NaN or `None` values are missing: scatter skips them,
93
112
  line and fill break there, box ignores them, heatmap cells take `nan_color`.
@@ -128,8 +147,9 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
128
147
  `pl.Figure(font_family="Roboto Flex", font_stretch="85%", font_variations={"GRAD": 50})`.
129
148
  * **Text and fonts.** Text is shaped by `vec_io.text` (pairs kerned) and its fonts are
130
149
  embedded as subsets; plot text needs an installed outline font. Each character takes
131
- the first family of `font_family` that is available (output options `font_dirs`, then
132
- `VEC_IO_FONT_DIRS`, then installed fonts unless `system_fonts=False`; a family that is
150
+ the first family of `font_family` that is available (the `fonts` setting or output
151
+ option, a vec_io `Fonts`: its `dirs`, then `VEC_IO_FONT_DIRS`, then installed fonts unless
152
+ `system=False`; a family that is
133
153
  not installed tries its metric aliases first: Helvetica and Arial → Liberation Sans,
134
154
  Arimo, …), then a generic family's list (`sans-serif`: Arial, Helvetica, Liberation
135
155
  Sans, DejaVu Sans, Noto Sans, …), then any font with the character. The default
@@ -141,11 +161,41 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
141
161
  multiple of the font size; default 1), the glyphs centered in it, so the gaps around
142
162
  text do not change with the font; `"normal"` takes the font's ascent and descent.
143
163
  * **Names.** `pl.` holds the figure and plot classes, the plot types, the value types
144
- (`ColorAxis`, `SizeAxis`, `ColorMap`, `SizeMap`, `Palette`, `Density`, `ErrorBars`,
145
- `Span`), `facet`, the registries (`register_layer`, `register_marker`,
146
- `register_color_map`, `register_palette`, `register_style`), `styles` (the styles
147
- module), `set_style`, `use_style` and `DEFAULTS`; see [modules](#12-modules) for the
148
- rest. Enum-like settings take strings.
164
+ (`ColorAxis`, `SizeAxis`, `ColorMap`, `SizeMap`, `Palette`, `Density`, `Errors`,
165
+ `Span`), `facet`, `registry` (below), `Series`, `set_style`, `use_style` and `DEFAULTS`;
166
+ see [modules](#12-modules) for the rest. Enum-like settings take strings.
167
+ * **Registries.** `pl.registry` groups the named things: `registry.color_maps`,
168
+ `palettes`, `markers`, `styles` and `layers` (plot types), each with `add(name, value)`,
169
+ `names()` and `get(name)` (`ValueError` for an unknown name) and `name in registry.…`.
170
+ * **Guides.** Titles, legends and colorbars follow one pattern. A figure has
171
+ `fig.add_title`, `fig.add_legend` and `fig.add_colorbar` (in the lanes beside a set of
172
+ plots, `side=`) and `fig.colorbar_area` (a colorbar in its own grid area); a plot has
173
+ `p.add_title`, `p.add_legend` (the plot's legend, `p.legend`) and `p.add_colorbar`
174
+ (attached, `side=`); `fig.plot(legend=…, colorbar=…)` calls them for the common case.
175
+
176
+ ### Shorthands
177
+
178
+ `settings.ALIASES` (setting names, on every class with the full setting) and
179
+ `settings.MARKER_ALIASES` (marker names):
180
+
181
+ <!-- settings:shorthands -->
182
+ | Shorthand | Stands for |
183
+ |---|---|
184
+ | `c=` | `color=` |
185
+ | `s=` | `size=` |
186
+ | `cmap=` | `color_map=` |
187
+ | `smap=` | `size_map=` |
188
+ | `marker="o"` | `"circle"` |
189
+ | `marker="s"` | `"square"` |
190
+ | `marker="d"` | `"diamond"` |
191
+ | `marker="^"` | `"triangle_up"` |
192
+ | `marker="v"` | `"triangle_down"` |
193
+ | `marker="<"` | `"triangle_left"` |
194
+ | `marker=">"` | `"triangle_right"` |
195
+ | `marker="+"` | `"plus"` |
196
+ | `marker="x"` | `"cross"` |
197
+ | `marker="triangle"` | `"triangle_up"` |
198
+ <!-- /settings -->
149
199
 
150
200
  ### Values
151
201
 
@@ -159,7 +209,7 @@ p.bar(days, counts, width="20h") # a duration on a time axis
159
209
  p.box(groups, positions=[1, 4, 9], width="0.8d") # data units (default: 80% of the slot)
160
210
  p.errorbar(x, y, y_error=e, cap_length="0.2d") # data units across the bar
161
211
  p.title(font_size="large", color="var(--accent)")
162
- p.legend(pad="calc(1em - 2px)")
212
+ p.add_legend(pad="calc(1em - 2px)")
163
213
  fig.set(vars={"accent": "#c00"}) # custom variables, read by var(--name)
164
214
  ```
165
215
 
@@ -178,7 +228,7 @@ fig.set(vars={"accent": "#c00"}) # custom variables, read by v
178
228
 
179
229
  * **`var(name[, fallback])`** reads another setting of the object, resolved through the
180
230
  usual inheritance. **`inherit`** (or `var()` of the setting's own name) reads the
181
- parent's value of the same setting (`alpha="calc(inherit / 2)"`). `var(--name)` reads a custom variable: from the
231
+ parent's value of the same setting (`opacity="calc(inherit / 2)"`). `var(--name)` reads a custom variable: from the
182
232
  nearest `vars` (figure or plot), else a `"--name"` key of the style. The fallback is used
183
233
  when the value is unset. Loops raise. Text settings (titles, labels, names, formats)
184
234
  never read `var()`.
@@ -225,8 +275,9 @@ What `%` of a length can be of, besides another setting (the tables name it per
225
275
  #### Setting groups
226
276
 
227
277
  Members, their names under a prefix `{p}`, and the group defaults (`"Group.member"` keys).
228
- `"FillStyle.fill"` sets every series fill (bars, boxes, violins, pies, densities,
229
- contours, genome signals and intervals); `"Marker.fill"` every marker fill.
278
+ `"FillStyle.fill_opacity"` sets the opacity of every series fill (bars, boxes, violins,
279
+ pies, densities, contours, genome signals and intervals); `"Marker.fill"` turns every
280
+ marker fill on or off.
230
281
 
231
282
  <!-- settings:groups -->
232
283
  | Group | Member | Under a prefix `{p}` | Default |
@@ -253,8 +304,10 @@ contours, genome signals and intervals); `"Marker.fill"` every marker fill.
253
304
  | `Marker` | `edge_color` | `{p}edge_color` | 'auto' |
254
305
  | `Marker` | `edge_width` | `{p}edge_width` | 0.5 |
255
306
  | `Marker` | `fill` | `{p}fill` | True |
307
+ | `Marker` | `fill_opacity` | `{p}fill_opacity` | 1.0 |
256
308
  | `Marker` | `size_basis` | `size_basis (never prefixed)` | 'area' |
257
309
  | `FillStyle` | `fill` | `{p}fill` | — |
310
+ | `FillStyle` | `fill_opacity` | `{p}fill_opacity` | — |
258
311
  | `NumberFormat` | `decimal_separator` | `{p}decimal_separator` | inherited |
259
312
  | `NumberFormat` | `thousands_separator` | `{p}thousands_separator` | inherited |
260
313
  | `NumberFormat` | `minus` | `{p}minus` | inherited |
@@ -281,7 +334,7 @@ fig.add_title(text, plots=None, side="top", **settings) # another, over plots
281
334
  fig.add_legend(plots=None, side="right", **settings) # a legend of plots' entries
282
335
  fig.x_axis(**settings) # settings of every plot's x axis (fig.y_axis: y)
283
336
  fig.add_colorbar(source=None, plots=None, side="bottom", **settings) # beside plots
284
- fig.colorbar(source, id=None, **settings) # the guide of a color axis, in its own area
337
+ fig.colorbar_area(source, id=None, **settings) # a color axis' guide in its own area
285
338
  fig.color_axis(**settings) # a shared color axis (fig.size_axis: size)
286
339
  fig.size_legend(source, id=None, values=None, title=None)
287
340
  fig.track(**settings) # a new track (layout="tracks")
@@ -353,14 +406,17 @@ are names; `fig.plot()` gives 1, 2, 3, … skipping taken ids.
353
406
  ### Layout
354
407
 
355
408
  * **Bands.** A plot is its axes rectangle with four stacks of bands around it, from the
356
- axes outward: tick marks, tick labels, the ×10ᵏ offset (above the y axis), the axis
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
360
- side (tick labels past the ends of the axis, a wide title). A side's margin is its
361
- bands' thicknesses, at least the overhangs of the bands across it. Bands stack: each
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.
409
+ axes outward: tick marks, tick labels, the axis label, twin axes, the y axis' ×10ᵏ
410
+ offset (on top, past the x axis and twin x axes there), an outside legend, attached
411
+ colorbars, the plot's titles and (on top) the plot's `space_above`; outermost on the
412
+ left, the row label band and the band of [group](#rows) letters, as wide as the widest
413
+ of the plot's grid column. Each band has a thickness and an overhang along its side
414
+ (tick labels past the ends of the axis, a wide title or axis label). A side's margin is
415
+ its bands' thicknesses, at least the overhangs of the bands across it. Bands stack:
416
+ each starts past the ones before it (mirrored ticks included), the titles past
417
+ everything on their side; only twin axes are drawn at the axes edge. An axis label
418
+ (a string) longer than the plot's box along its axis (the axes and the other axis'
419
+ ticks and tick labels) wraps at spaces to that length.
364
420
  * **Grid.** Each line between cells takes the largest margin of the plots there
365
421
  (`align="axes"`), or each plot's axes are what its margins leave of its box
366
422
  (`"borders"`). Colorbars and size legends in their own areas are cells of the grid; the
@@ -452,7 +508,7 @@ fig.add_title("Batch 1", plots=[a, d], side="left")
452
508
  |---|---|---|
453
509
  | `text` | — | Title text: a string or rich content; `\n` starts a line. |
454
510
  | `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). |
511
+ | `align` | 'center' | Alignment along the side: `start`, `center`, `end`, or an end by name: `left`, `right` on top and bottom, `top`, `bottom` on the left and right; there `start` is where rotated text begins (the bottom at 90, the top at −90 and 0). |
456
512
  | `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
513
  | `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
514
  | `pad` | '0.5em' | Gap between the title and the plots. Length. |
@@ -553,7 +609,7 @@ FigureVLine:
553
609
  | `color` | '#4d4d4d' | Line color. |
554
610
  | `line_width` | inherited (0.5) | Line width. Length. |
555
611
  | `line_style` | 'dashed' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
556
- | `alpha` | 1.0 | Opacity. |
612
+ | `opacity` | 1.0 | Opacity. |
557
613
 
558
614
  Groups: `Stroke`.
559
615
  <!-- /settings -->
@@ -564,7 +620,7 @@ FigureVSpan:
564
620
  | Setting | Default | Meaning |
565
621
  |---|---|---|
566
622
  | `color` | '#e5e5e5' | Fill color. |
567
- | `alpha` | 1.0 | Opacity. |
623
+ | `opacity` | 1.0 | Opacity. |
568
624
  <!-- /settings -->
569
625
 
570
626
  FigureGroup:
@@ -613,9 +669,10 @@ panels. `wrap` wraps `col` alone into rows of that many panels. Panels are title
613
669
  call goes to each series alike) and `share_size` (default `"all"`: one size axis, so
614
670
  one size key) and `share_legend` (default `"all"`: one legend for the panels' entries,
615
671
  on the right, [figure legends](#figure-legends)).
616
- * **Colorbar.** `colorbar="right"`, `"left"`, `"top"` or `"bottom"` adds a column (or a
617
- row, with a horizontal colorbar) to the grid, holding the colorbar of the first call that maps
618
- colors (`panels.colorbar`): the guide of the panels' shared color axis.
672
+ * **Colorbar.** `colorbar="right"`, `"left"`, `"top"` or `"bottom"` adds the colorbar of
673
+ the first call that maps colors (`panels.colorbar`, a
674
+ [figure colorbar](#colorbars) over every panel, `fig.add_colorbar`) on that side: the
675
+ guide of the panels' shared color axis.
619
676
  * `panels.panels` maps facet keys (a value, or `(row value, col value)`) to plots;
620
677
  `panels.plot(key)` returns one; iterating the set gives the plots; `panels.subsets()`
621
678
  gives `(key, plot, rows)`.
@@ -632,15 +689,16 @@ panels. `wrap` wraps `col` alone into rows of that many panels. Panels are title
632
689
  | `align` | 'axes' | `axes`: axis lines line up across plots; `borders`: plot boxes line up. |
633
690
  | `widths` | — | Column widths: ratios (numbers or `fr`) sharing the room left by fixed lengths (`"2in"`, `"30%"` of the figure width). |
634
691
  | `heights` | — | Row heights, as `widths`. |
635
- | `width` | '150px' | Width of the `reference` box: one cell's axes, one cell's plot, or the figure. Length. |
636
- | `height` | 'calc(var(width) / var(aspect_ratio))' | Height of the `reference` box. Length. |
692
+ | `width` | '150px' | Width of the `reference` box: one cell's axes, one cell's plot, or the figure; a paper size names its width (`"a4"`, `"letter"`, `"a4-landscape"`). Length. |
693
+ | `height` | 'calc(var(width) / var(aspect_ratio))' | Height of the `reference` box (a paper size: its height). Length. |
637
694
  | `aspect_ratio` | 1.25 | Width / height of the `reference` box (16:9 → `16 / 9`), when only one of `width` and `height` is given. |
638
695
  | `reference` | 'axes' | What `width` and `height` measure: `axes` (each grid cell's axes rectangle), `plot` (each cell's whole plot box) or `figure`. |
639
696
  | `spacing` | 13.0 | Minimum gap between neighbouring plots. Length; `%`: of the figure width (across) or height (down). |
640
697
  | `margin` | 5.0 | Space around the figure. Length; `%`: of the figure width (across) or height (down). |
641
- | `background` | 'white' | Figure background, default white; `None` or `"none"`: transparent (white in JPEG, which has no transparency). |
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). |
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. |
698
+ | `background` | 'white' | Figure background, default the style's (white); `"none"` or `"transparent"`: transparent (white in JPEG, which has no transparency). `None` unsets it. |
699
+ | `fonts` | — | Where fonts come from: a vec_io `Fonts` or a dict of its fields (`dirs`, `system`, `downloads`: `True`, `False` or `"cache"`, `db`); unset: `VEC_IO_FONT_DIRS`, installed fonts and `VEC_IO_FONT_DOWNLOADS` (downloads on by default). |
700
+ | `default_dpi` | '4x' | Resolution of PNG, JPEG, JPEG XL and AVIF output when `save`/`write` give no `dpi`: dots per inch, or a multiple of 96 (`"2x"` is 192); `96` gives one image pixel per px, the default `"4x"` four. PDF, EPS and SVG output never use it. |
701
+ | `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 PDF and SVG output (stored as JPEG); `"lossless"` (not JPEG); `"auto"`: 90 for PNG and JPEG, lossless for JPEG XL, AVIF and PDF content. |
644
702
  | `share_x` | — | Plots sharing their x axis: `False`, `True`/`"all"`, `"col"` (same column span) or `"row"` (same row span). |
645
703
  | `share_y` | — | Plots sharing their y axis, as `share_x`. |
646
704
  | `share` | — | Both axes at once: as `share_x`, or `"grid"` (x per column, y per row); `share_x`/`share_y` override it. |
@@ -661,7 +719,7 @@ panels. `wrap` wraps `col` alone into rows of that many panels. Panels are title
661
719
  | `text_color` | inherited ('black') | Text color. |
662
720
  | `line_width` | inherited (0.5) | Default line width. Length. |
663
721
  | `palette` | inherited ('tab10_custom') | Colors of series without one. |
664
- | `alpha` | inherited (1.0) | Default opacity of series. |
722
+ | `opacity` | inherited (1.0) | Default opacity of series. |
665
723
  | `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
666
724
  | `simplify` | inherited ('auto') | vec_io's `simplify` for every series; default `"auto"`. |
667
725
  | `data` | inherited (None) | A table whose columns the series' data arguments name. |
@@ -679,17 +737,21 @@ Groups: `Font`, `NumberFormat`.
679
737
  ## 3. Plots
680
738
 
681
739
  ```python
682
- pl.Plot(figure=None, id=None, **settings) # title="…", x_axis={…}, y_axis={…}
740
+ pl.Plot(figure=None, id=None, **settings) # title=, x_axis={…}, y_axis={…}, legend=, colorbar=
683
741
  p.scatter(x, y, **s) p.line(x, y=None, **s) p.fill(x, y1, y2=0, **s)
684
- p.box(values, **s) p.heatmap(values, **s) p.colorbar(source=None, **s)
685
- p.title(text, **s) p.x_axis(label, **s) p.y_axis(label, **s) p.legend(position, **s)
742
+ p.box(values, **s) p.heatmap(values, **s) p.dots(color, size=None, **s)
743
+ p.title(text, **s) p.x_axis(label, **s) p.y_axis(label, **s)
686
744
  p.add_title(text, side="top", **s) # another title, returned
745
+ p.add_legend(position=None, **s) # the plot's legend (p.legend), returned
746
+ p.add_colorbar(source=None, side=None, **s) # an attached colorbar, returned
687
747
  p.series p.titles p.colorbars p.figure p.id
688
748
  ```
689
749
 
690
- `p.title`, `p.x_axis`, `p.y_axis` and `p.legend` are objects; calling one sets its
691
- settings and returns it. At creation (and in `p.set`), `title=` sets the title text and
692
- `x_axis={…}`, `y_axis={…}` set the axes' settings: `pl.Scatter(x, y, x_axis={"scale":
750
+ `p.title`, `p.x_axis` and `p.y_axis` are objects; calling one sets its settings and
751
+ returns it (`p.legend` is set by `p.add_legend`, or `p.legend.set`). At creation (and in
752
+ `p.set`), `title=` sets the title text, `x_axis={…}`, `y_axis={…}` set the axes' settings,
753
+ `legend=` (a position, a dict of legend settings or `False`) calls `add_legend` and
754
+ `colorbar=` (`True`, a side or a dict of colorbar settings) `add_colorbar`: `pl.Scatter(x, y, x_axis={"scale":
693
755
  "log"})`, `fig.bigwig(reader, y_axis={"label": "ATAC"})`. Series are drawn in `z` order (default: call order) inside the
694
756
  axes clip.
695
757
 
@@ -718,7 +780,7 @@ axes clip.
718
780
  | `text_color` | inherited ('black') | Text color. |
719
781
  | `line_width` | inherited (0.5) | Default line width. Length. |
720
782
  | `palette` | inherited ('tab10_custom') | Colors of series without one. |
721
- | `alpha` | inherited (1.0) | Default opacity of series. |
783
+ | `opacity` | inherited (1.0) | Default opacity of series. |
722
784
  | `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
723
785
  | `simplify` | inherited ('auto') | vec_io's `simplify` for every series: `"auto"`, `True`, a dpi or `False`. |
724
786
  | `color_map` | inherited ('rainbow_llhh') | Default color map (alias `cmap`): of heatmaps, contours and numbers given as colors. |
@@ -754,12 +816,17 @@ nearest the axes on top and on the left and right, the first at the bottom. Left
754
816
  read upward, right titles downward (`rotation="auto"`); `rotation=0` sets them
755
817
  horizontal, beside the axes.
756
818
 
819
+ `align` takes the vocabulary of figure legends and colorbars: `start`, `center`, `end`, or
820
+ an end by name. On top and bottom, `start` is the left end (`left`, `right` name the
821
+ ends); on the left and right, `start` is where the text begins (the bottom for text
822
+ reading upward, else the top) and `top`, `bottom` name the ends.
823
+
757
824
  <!-- settings:Title -->
758
825
  | Setting | Default | Meaning |
759
826
  |---|---|---|
760
827
  | `text` | — | Title text: a string or rich content; `\n` starts a line. |
761
828
  | `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). |
829
+ | `align` | 'center' | Alignment along the side: `start`, `center`, `end`, or an end by name: `left`, `right` on top and bottom, `top`, `bottom` on the left and right; there `start` is where rotated text begins (the bottom at 90, the top at −90 and 0). |
763
830
  | `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
831
  | `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
832
  | `pad` | 5.0 | Gap between the title and what it covers. Length; `%`: of the axes height. |
@@ -784,21 +851,29 @@ Groups: `TextStyle`, `Font`.
784
851
 
785
852
  ### Legend
786
853
 
854
+ ```python
855
+ p.add_legend("top_left", frame=True) # the plot's legend, p.legend; returns it
856
+ fig.plot(legend="outside_right") # the same, when the plot is made
857
+ ```
858
+
787
859
  One entry per series with a `name`, drawn as the series draws itself (marker, line,
788
860
  swatch or box), or with `glyph="box"`, `"circle"` or `"line"` in the series color. At
789
861
  `top`, `bottom`, `outside_top` and `outside_bottom` entries are side by side unless
790
- `orientation` or `columns` is set.
791
-
792
- **Size keys.** A series whose `size` goes through a [size axis](#6-color-and-size-axes)
793
- adds a size key, the axis' guide, to its plot's legend, below the series entries: the
794
- axis' `label` (default: the `size` column name) as a header, then sample markers at their
795
- real size with their values (the list given as the series' `size_legend`, else the axis'
796
- `ticks`, else 3–5 nice numbers inside its limits; in its `tick_format`;
797
- `size_legend=False` drops it). Series sharing one size axis (one `fig.size_axis()`, or own
798
- axes trained as one by `share_size` or `group=`) share one key, in grey, also across
799
- plots. The key goes in the legend of the rightmost of their plots, and the topmost of
800
- those, so it sits at the figure's top right. Users with different `size_map`s get a key
801
- per map. A single series' key takes its color (grey when its colors are mapped).
862
+ `orientation` or `columns` is set. Outside the axes, without `columns`, entries wrap
863
+ within the axes' length along their side: into rows as wide as the axes on top and
864
+ bottom, into columns as tall as the axes on the right.
865
+
866
+ **Size keys in the legend.** A series whose `size` goes through a
867
+ [size axis](#6-color-and-size-axes) has a size key, the axis' guide: by default a key
868
+ like a colorbar's ([size keys](#size-keys)); with `size_key="legend"`, rows in its
869
+ plot's legend, below the series entries: the axis' `label` (default: the `size` column
870
+ name) as a header, then sample markers at their real size with their values (the axis'
871
+ `ticks`, else 3–5 nice numbers inside its limits; in its `tick_format`). Series sharing
872
+ one size axis (one `fig.size_axis()`, or own axes trained as one by `share_size` or
873
+ `group=`) share one key, in grey, also across plots. The key goes in the legend of the
874
+ rightmost of their plots, and the topmost of those, so it sits at the figure's top
875
+ right. Users with different `size_map`s get a key per map. A single series' key takes
876
+ its color (grey when its colors are mapped).
802
877
  `fig.size_legend(source, id=…, values=None, title=None)` places the key of a size axis
803
878
  (or of a series' one) in its own grid area, as colorbars do. It shows every series of
804
879
  that axis, and no plot legend repeats it.
@@ -817,7 +892,7 @@ candidate covers more than 2 % marked cells; else the candidate covering the few
817
892
  <!-- settings:Legend -->
818
893
  | Setting | Default | Meaning |
819
894
  |---|---|---|
820
- | `position` | 'auto' | `auto`, `top_right`, `top_left`, `bottom_right`, `bottom_left`, `top`, `bottom`, `outside_right`, `outside_top`, `outside_bottom` or `none`. |
895
+ | `position` | 'auto' | `auto`, `top_right`, `top_left`, `bottom_right`, `bottom_left`, `top`, `bottom`, `center_right`, `center_left`, `outside_right`, `outside_top`, `outside_bottom` or `none`. |
821
896
  | `columns` | 1 | Number of columns. |
822
897
  | `frame` | False | Draw a frame and background. |
823
898
  | `title` | 'auto' | Legend title; `"auto"`: the `group` column name, if any. |
@@ -828,8 +903,8 @@ candidate covers more than 2 % marked cells; else the candidate covering the few
828
903
  | `frame_width` | 0.5 | Frame line width. Length. |
829
904
  | `pad` | 5.0 | Gap to the axes. Length; `%`: of the axes width (across) or height (down). |
830
905
  | `frame_radius` | 0.0 | Corner radius of the frame. Length. |
831
- | `frame_alpha` | 1.0 | Opacity of the frame and background. |
832
- | `glyph_alpha` | — | Fill opacity of `box` and `circle` symbols, outlined in the opaque color; default: the series' own fill. |
906
+ | `frame_opacity` | 1.0 | Opacity of the frame and background. |
907
+ | `glyph_opacity` | — | Fill opacity of `box` and `circle` symbols, outlined in the opaque color; default: the series' own fill. |
833
908
  | `glyph` | 'series' | Entry symbol: as the series draws itself, or a filled `box`, a `circle` or a `line` in the series color. |
834
909
  | `orientation` | 'auto' | `horizontal`: entries side by side; `auto`: horizontal at `top`, `bottom`, `outside_top` and `outside_bottom`. |
835
910
  | `glyph_length` | '1.4em' | Width of an entry's symbol. Length; `%`: of the font size. |
@@ -871,7 +946,8 @@ error naming it).
871
946
  entries shows no legend. A plot whose `legend.position` is set keeps its legend whole
872
947
  (the figure legend shows its entries too).
873
948
  * **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
949
+ (`start`: the left or top end, `center`, `end`; or `left`, `right` on top and bottom,
950
+ `top`, `bottom` on the left and right) within the axes of its plots, kept within the figure; the
875
951
  figure grows when the legend is longer than its content. On top and bottom, entries
876
952
  are side by side in rows as wide as the span (unless `columns` is set); on the left and
877
953
  right, in a column (`columns`).
@@ -893,7 +969,7 @@ Figure legends have the settings of plot legends but `position`, `orientation`,
893
969
  | Setting | Default | Meaning |
894
970
  |---|---|---|
895
971
  | `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). |
972
+ | `align` | 'center' | Alignment along the side: `start` (left, or top), `center`, `end` (right, or bottom), or an end by name: `left`, `right` on top and bottom, `top`, `bottom` on the left and right. |
897
973
  | `order` | — | Place in its side's lanes, as figure titles' `order`: lower is nearer the plots. |
898
974
  | `pad` | 5.0 | Gap between the legend and the plots. Length. |
899
975
  | `title` | 'auto' | Legend title; `"auto"`: the `group` column name of its plots' series, if any. |
@@ -931,7 +1007,7 @@ HLine:
931
1007
  | `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. |
932
1008
  | `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. |
933
1009
  | `name` | — | Legend entry; unset: not in the legend. |
934
- | `alpha` | 1.0 | Opacity. |
1010
+ | `opacity` | 1.0 | Opacity. |
935
1011
  | `z` | 1.0 | Drawing order among the series (default 0). |
936
1012
  | `extend_limits` | False | Include the decoration in the axis limits. |
937
1013
  | `clip` | True | Clip to the axes area. |
@@ -948,7 +1024,7 @@ AxLine:
948
1024
  | `line_width` | inherited (0.5) | Line width. Length. |
949
1025
  | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
950
1026
  | `name` | — | Legend entry; unset: not in the legend. |
951
- | `alpha` | 1.0 | Opacity. |
1027
+ | `opacity` | 1.0 | Opacity. |
952
1028
  | `z` | 1.0 | Drawing order among the series (default 0). |
953
1029
  | `extend_limits` | False | Include the decoration in the axis limits. |
954
1030
  | `clip` | True | Clip to the axes area. |
@@ -967,7 +1043,7 @@ HSpan:
967
1043
  | `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. |
968
1044
  | `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. |
969
1045
  | `name` | — | Legend entry; unset: not in the legend. |
970
- | `alpha` | 1.0 | Opacity. |
1046
+ | `opacity` | 1.0 | Opacity. |
971
1047
  | `z` | -1.0 | Drawing order among the series (default 0). |
972
1048
  | `extend_limits` | False | Include the decoration in the axis limits. |
973
1049
  | `clip` | True | Clip to the axes area. |
@@ -996,7 +1072,7 @@ Text:
996
1072
  | `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
997
1073
  | `text_color` | inherited ('black') | Text color. |
998
1074
  | `name` | — | Legend entry; unset: not in the legend. |
999
- | `alpha` | 1.0 | Opacity. |
1075
+ | `opacity` | 1.0 | Opacity. |
1000
1076
  | `z` | 1.0 | Drawing order among the series (default 0). |
1001
1077
  | `extend_limits` | False | Include the decoration in the axis limits. |
1002
1078
  | `clip` | False | Clip to the axes area. |
@@ -1083,9 +1159,13 @@ grid only when its axis asks). `p.save` includes its twins.
1083
1159
 
1084
1160
  * `"auto"`: the union of the series' extents plus `padding` (0.05 of the range per side,
1085
1161
  in position space: a factor on log axes; heatmaps take none).
1086
- * `"lo/hi"`: each side `min`, `max`, a number or `q:F` (quantile F of the axis's values):
1087
- `"0/max"`, `"q:0.01/q:0.99"`. Or `(lo, hi)`, `None` meaning automatic.
1088
- * A single value is widened by ±0.5 in position space. `invert=True` reverses the axis.
1162
+ * `"lo/hi"`: each side `min`, `max` (any case), a number, an ISO date or time, or `q:F`
1163
+ (quantile F of the axis's values): `"0/max"`, `"q:0.01/q:0.99"`,
1164
+ `"2024-01-01T10:00Z/2024-02-01"`. Or `(lo, hi)`, `None` meaning automatic.
1165
+ * A single value is widened by ±0.5 in position space; a single time by one unit of its
1166
+ data each side (a day at midnight, else an hour, a minute, a second).
1167
+ * `invert=True` reverses the axis; so do limits given high to low, `(2, 0)` (with
1168
+ `invert=True` too, the axis is reversed once).
1089
1169
  * `include_zero=True` extends automatic limits to 0 (linear and sqrt axes) before padding
1090
1170
  and `snap`; `"auto"` does so where a series on the axis asks for it, following
1091
1171
  Vega-Lite's default: both axes of scatter plots, the value axis of lines, areas and
@@ -1147,7 +1227,7 @@ grid only when its axis asks). `p.save` includes its twins.
1147
1227
  | `padding` | 'auto' | Space added to automatic limits, as a fraction of the range; `"auto"`: `auto_padding`, or 0 on axes of series drawn to exact limits (box value axes, heatmaps, …) and in plots without axes. Length; `%`: of the axis range. |
1148
1228
  | `auto_padding` | '5%' | The fraction `padding="auto"` adds on each side. Length; `%`: of the axis range. |
1149
1229
  | `sticky` | True | No padding past the baseline of bars and histograms when an automatic limit is on it (matplotlib's sticky edges). |
1150
- | `invert` | False | Reverse the axis. |
1230
+ | `invert` | False | Reverse the axis (limits given high to low, `(2, 0)`, reverse it too). |
1151
1231
  | `ticks` | — | `False` (no ticks) or a list of tick values. |
1152
1232
  | `tick_labels` | — | Labels of `ticks`. |
1153
1233
  | `minor_ticks` | — | `True`, `False` or a list of values; default: on for log10. |
@@ -1211,7 +1291,7 @@ Groups: `TextStyle` (`label_`), `Stroke` (`tick_`), `TextStyle` (`tick_label_`),
1211
1291
 
1212
1292
  ## 5. Series
1213
1293
 
1214
- All series take `name`, `alpha`, `z`, `rasterize` and `simplify` (see [Output](#8-output)).
1294
+ All series take `name`, `opacity`, `z`, `rasterize` and `simplify` (see [Output](#8-output)).
1215
1295
  Series without their own color take the plot's next palette color, in call order; series
1216
1296
  with several value sets (histograms, densities, areas, pies) take one per set.
1217
1297
 
@@ -1226,7 +1306,7 @@ with several value sets (histograms, densities, areas, pies) take one per set.
1226
1306
  stem, regression): its x data go along the y axis, its y data along the x axis, and it
1227
1307
  draws the same marks with x and y swapped (curves along y, steps included). Grids
1228
1308
  (heatmap, hist2d, hexbin, contour, 2-D kde) and pies have none: swap their arguments.
1229
- * **New types.** `pl.register_layer(name, factory)` adds `plot.<name>(…)`, which calls
1309
+ * **New types.** `pl.registry.layers.add(name, factory)` adds `plot.<name>(…)`, which calls
1230
1310
  `factory(…, plot=plot)`. A factory that is a `pl.Series` subclass implements
1231
1311
  `layers()`, returning its `Call` (layers, legend entries, what the axes, maps and
1232
1312
  palette need; see `plot_io/layers/`); its class name is a style class. The genome types
@@ -1240,10 +1320,21 @@ with several value sets (histograms, densities, areas, pies) take one per set.
1240
1320
  count as one, and so do split violins.
1241
1321
  * **Stacking.** `stack=True` (bars, histograms, densities) puts a series on the previous
1242
1322
  stacked series of its kind in the plot, per category or bin; positive and negative
1243
- values stack apart; `stack="normalize"` divides each position by its total.
1323
+ values stack apart; `stack="normalize"` divides each position by its total. Stacked
1324
+ densities share one grid (the union of their spans).
1325
+ * **Fill and opacity.** `fill` turns a series' fills on (`True`: their own colors, or a
1326
+ color) or off (`False`) on every plot type that fills, and `fill_opacity` is their
1327
+ opacity; `opacity` is the opacity of the whole series (fills, lines and outlines),
1328
+ multiplying `fill_opacity`.
1244
1329
  * **Derived data.** Histograms, densities, ECDFs, violins, 2-D bins, contours and
1245
- regressions compute their data once (in C, by plot_io's kernels) and keep it until
1246
- a setting changes; `series.stats` exposes it.
1330
+ regressions compute their data once (in C, by plot_io's kernels) and keep it while
1331
+ the settings they read resolve to the same values (a style change recomputes it);
1332
+ `series.stats` exposes it. On an axis with a scale they are computed in the axis'
1333
+ space: bins are even there, and densities (`hist` and `hist2d` `stat="density"`,
1334
+ `kde`, `violin`, 2-D `kde`) are per axis unit (on a log axis, per log unit), so a
1335
+ histogram and a density of the same data agree. Degenerate data draw nothing (an
1336
+ empty set, all NaN) or, for a density without a bandwidth (one value, all equal), no
1337
+ curve and a warning; a violin of one value is a line at it.
1247
1338
  * **Shifted and rescaled coordinates.** `x_origin`, `x_scale` and `x_extent` (and `y_…`)
1248
1339
  draw a series' values `v` at `(v − origin) × scale`, without changing the data:
1249
1340
  `p.line(profile, x_origin="center")` draws positions 0…1000 at −500…500, `x_scale=10`
@@ -1277,7 +1368,7 @@ p = pl.Plot(data=df); p.scatter("a", "b") # data inherited by the plot's s
1277
1368
  `data` is any object returning a column for `data[name]`: a dict of sequences, a pandas
1278
1369
  or polars data frame, a numpy structured array. Columns are read through `__getitem__`
1279
1370
  (and `to_numpy()` when present); no table library is imported. With `data`, a string in
1280
- a positional data argument or in `color`, `edge_color`, `size`, `alpha`, `group`,
1371
+ a positional data argument or in `color`, `edge_color`, `size`, `opacity`, `group`,
1281
1372
  `draw_order`, `x_error`, `y_error`, `weights`, `positions`, `x`, `y` or `names` names a
1282
1373
  column. Positional arguments, `group`, `weights` and `positions` must be columns; in
1283
1374
  `color`, a color name that is no column stays a color (a column wins, with a warning if
@@ -1287,14 +1378,26 @@ the colorbar label to the `color` column, the legend title to the `group` column
1287
1378
  columns keep their category order for groups and category axes.
1288
1379
 
1289
1380
  Box, violin, strip and swarm also take long data: `values` flat, with the category of each
1290
- value in `x` (`y` when horizontal).
1381
+ value in `x` (`y` when horizontal). [Dots](#dots) take one row per cell.
1382
+
1383
+ ```python
1384
+ t = pl.group_summary(values, groups, names=None, threshold=0.0, mean="all")
1385
+ p.dots(data=t, x="name", y="group", color="mean", size="fraction", size_limits="0/1")
1386
+ ```
1387
+
1388
+ `group_summary` summarizes an observations × variables matrix (rows: observations; a 2-D
1389
+ buffer or a list of rows) per group: columns `group`, `name` (the variable; default its
1390
+ index), `mean` and `fraction` (the share of the group's observations above `threshold`).
1391
+ `mean="expressed"` averages only the observations above `threshold` (none: a missing
1392
+ mean). Groups in order of first appearance (a categorical: its order); missing labels are
1393
+ left out.
1291
1394
 
1292
1395
  ### Groups (`group=`)
1293
1396
 
1294
1397
  ```python
1295
1398
  g = p.scatter(x, y, group=labels, marker="auto") # one series per group
1296
1399
  g = p.line(t, y, group=subject, line_style="auto")
1297
- g["a"].set(color="black"); g.set(alpha=0.6)
1400
+ g["a"].set(color="black"); g.set(opacity=0.6)
1298
1401
  ```
1299
1402
 
1300
1403
  `group` takes a label per point. The call returns a `SeriesGroup`, a list of one series per
@@ -1322,7 +1425,7 @@ the style's map); numbers in `size` are diameters, or values mapped through `siz
1322
1425
  * `size` is a diameter (a length; per-point numbers are px). With `size_basis="area"` (default) every shape has the
1323
1426
  area of the circle of that diameter: a square of size 4 is drawn 3.54 px wide.
1324
1427
  * Error bars: `x_error`/`y_error` take a value, a sequence, `(low, high)` sequences or
1325
- `ErrorBars(values, color=None, line_width=None, cap_length=None)` (cap: the series'
1428
+ `Errors(values, color=None, line_width=None, cap_length=None)` (cap: the series'
1326
1429
  `cap_length`, else 4 px).
1327
1430
 
1328
1431
  <!-- settings:Scatter -->
@@ -1333,7 +1436,8 @@ the style's map); numbers in `size` are diameters, or values mapped through `siz
1333
1436
  | `color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1334
1437
  | `edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
1335
1438
  | `edge_width` | 0.5 | Outline width; 0: no outline. Length. |
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. |
1439
+ | `fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
1440
+ | `fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
1337
1441
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1338
1442
  | `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. |
1339
1443
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
@@ -1343,11 +1447,11 @@ the style's map); numbers in `size` are diameters, or values mapped through `siz
1343
1447
  | `size_limits` | — | Limits of the series' size axis, as an axis' `limits`; unset: `"auto"`. |
1344
1448
  | `size_scale` | — | Scale of the series' size axis; unset: `linear`. |
1345
1449
  | `size_axis` | — | A shared `SizeAxis` (`figure.size_axis(…)`) in place of the series' own: it holds the sizes, limits and scale. |
1346
- | `size_legend` | True | With mapped sizes: a size key in the legend (`True`), none (`False`), or the values to show (a list). |
1450
+ | `size_key` | 'key' | With mapped sizes: a key attached to the plot, as a colorbar's (`"key"`), sample rows in the legend (`"legend"`), none (`False`), or the values to show (a list: a key with a marker at each). |
1347
1451
  | `draw_order` | — | Drawing order: `"density"` (densest drawn last), `"-density"`, or sort keys per point (ascending); default: call order. |
1348
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `alpha_range`. |
1349
- | `alpha_range` | (0.2, 1.0) | Opacities of the least and most dense points when `alpha` is a density. |
1350
- | `x_error` | — | Horizontal error bars: a value, a sequence, `(low, high)` or `ErrorBars`. |
1452
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `opacity_range`. |
1453
+ | `opacity_range` | (0.2, 1.0) | Opacities of the least and most dense points when `opacity` is a density. |
1454
+ | `x_error` | — | Horizontal error bars: a value, a sequence, `(low, high)` or `Errors`. |
1351
1455
  | `y_error` | — | Vertical error bars. |
1352
1456
  | `orientation` | 'vertical' | `vertical` (x along the x axis) or `horizontal` (x along the y axis). |
1353
1457
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -1376,7 +1480,7 @@ Named line styles scale with the width. Markers (`marker`, `marker_size`,
1376
1480
  `marker_color`, …) are drawn at the points when `marker` or `show_markers` is set.
1377
1481
  Numbers per point (or `"density"`, of a single line) in `marker_color` and
1378
1482
  `marker_edge_color` go through the series' [color axis](#6-color-and-size-axes)
1379
- (`color_map`, `color_limits`, `color_scale`, `color_axis`; `p.colorbar(line)`), as
1483
+ (`color_map`, `color_limits`, `color_scale`, `color_axis`; `p.add_colorbar(line)`), as
1380
1484
  `color` does on Scatter; the line keeps `color`, and the legend's marker takes the
1381
1485
  gradient's middle color.
1382
1486
 
@@ -1404,7 +1508,8 @@ gradient's middle color.
1404
1508
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1405
1509
  | `marker_edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
1406
1510
  | `marker_edge_width` | 0.5 | Outline width; 0: no outline. Length. |
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. |
1511
+ | `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
1512
+ | `marker_fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
1408
1513
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1409
1514
  | `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. |
1410
1515
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
@@ -1415,7 +1520,7 @@ gradient's middle color.
1415
1520
  | `show_markers` | False | Draw markers at the points (also turned on by setting `marker`). |
1416
1521
  | `orientation` | 'vertical' | `vertical` (x along the x axis) or `horizontal` (x along the y axis). |
1417
1522
  | `name` | — | Legend entry; unset: not in the legend. |
1418
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1523
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1419
1524
  | `z` | — | Drawing order (higher on top); default: call order. |
1420
1525
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1421
1526
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1448,7 +1553,7 @@ each side in its color).
1448
1553
  |---|---|---|
1449
1554
  | `color` | — | Fill color; default: the next palette color. |
1450
1555
  | `color_below` | — | Fill color where `y1` is below `y2` (crossings found on straight segments); default `color` everywhere. |
1451
- | `alpha` | 'calc(0.3 * inherit)' | Opacity; default 0.3 × the plot's. |
1556
+ | `opacity` | 'calc(0.3 * inherit)' | Opacity; default 0.3 × the plot's. |
1452
1557
  | `edge_color` | — | Outline color; default none. |
1453
1558
  | `edge_width` | 'var(line_width)' | Outline width; default the line width. Length. |
1454
1559
  | `interpolation` | 'linear' | How points are joined: `linear`, `step-pre`, `step-post`, `step-mid`, `monotone` (a curve that never overshoots) or `spline` (centripetal Catmull–Rom). |
@@ -1493,7 +1598,7 @@ category.
1493
1598
  | `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
1494
1599
  | `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
1495
1600
  | `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). |
1496
- | `edge_width` | 0.5 | Outline width. Length. |
1601
+ | `edge_width` | 'var(line_width)' | Outline width. Length. |
1497
1602
  | `whisker_color` | — | Whisker and cap color; default `edge_color`. |
1498
1603
  | `whisker_width` | 'var(edge_width)' | Whisker and cap width; default `edge_width`. Length. |
1499
1604
  | `whisker_style` | 'solid' | Whisker line style: `solid`, `dashed`, `dotted`, `dashdot` or a dash list (caps stay solid). Length. |
@@ -1505,7 +1610,8 @@ category.
1505
1610
  | `whiskers` | 1.5 | Whisker reach: a multiple of the IQR, `"range"`, or percentiles `(lo, hi)`. |
1506
1611
  | `outliers` | True | Draw points beyond the whiskers. |
1507
1612
  | `saturation` | 1.0 | Saturation of the box fills (1: the colors as given; seaborn uses 0.75). |
1508
- | `fill` | 0.25 | Box fill: an opacity of the box color, times `alpha` (lines keep `alpha`); `True` (opaque), a color, or `False`. |
1613
+ | `fill` | True | Fill: `True` (the box's color), a color, or `False`. |
1614
+ | `fill_opacity` | 0.25 | Opacity of the fill, times `opacity` (lines keep `opacity`). |
1509
1615
  | `mean` | False | Draw the mean as a marker. |
1510
1616
  | `mean_marker` | 'diamond' | Marker of the mean. |
1511
1617
  | `mean_color` | 'white' | Fill of the mean marker (outline: `edge_color`). |
@@ -1518,10 +1624,11 @@ category.
1518
1624
  | `marker_color` | — | Outlier fill: a color, or colors per outlier. |
1519
1625
  | `marker_edge_color` | — | Outlier outline: as the fill, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
1520
1626
  | `marker_edge_width` | 0.5 | Outline width; 0: no outline. Length. |
1521
- | `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. |
1627
+ | `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
1628
+ | `marker_fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
1522
1629
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1523
1630
  | `name` | — | Legend entry; unset: not in the legend. |
1524
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1631
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1525
1632
  | `z` | — | Drawing order (higher on top); default: call order. |
1526
1633
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1527
1634
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1567,7 +1674,7 @@ all cells), in black or white, whichever contrasts more (at most 2,500 cells unl
1567
1674
  | `value_label_font_size` | '0.9em' | Font size of cell labels. Length; `%`: of the font size. |
1568
1675
  | `colorbar` | False | Attach a colorbar to the plot. |
1569
1676
  | `name` | — | Legend entry; unset: not in the legend. |
1570
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1677
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1571
1678
  | `z` | — | Drawing order (higher on top); default: call order. |
1572
1679
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1573
1680
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1589,13 +1696,80 @@ all cells), in black or white, whichever contrasts more (at most 2,500 cells unl
1589
1696
  Groups: `TextStyle` (`value_label_`), `Font`, `NumberFormat`.
1590
1697
  <!-- /settings -->
1591
1698
 
1699
+ ### Dots
1700
+
1701
+ ```python
1702
+ pl.Dots(color=None, size=None, x=None, y=None, plot=None, **settings)
1703
+ p.dots(mean, size=fraction, x=genes, y=clusters, cmap="magma", size_limits="0/1")
1704
+ p.dots(data=table, x="gene", y="cluster", color="mean", size="fraction")
1705
+ ```
1706
+
1707
+ One dot per cell of a grid (a dot plot): `color` and `size` are 2-D grids of values (row
1708
+ 0 first) of one shape, or one value (a color, a diameter). `x`/`y` label the columns and
1709
+ rows, as a heatmap's: labels (category axes), `None` (indices), centres or edges. Values
1710
+ always map: colors through the series' [color axis](#6-color-and-size-axes) (a colorbar
1711
+ by default), sizes through its size axis (`size_map` `(0, 12)` px and `size_limits`
1712
+ `"0/max"`: area ∝ value; fractions: `"0/1"`) and its [size key](#size-keys), on the
1713
+ colorbar's line when both fit. A missing size leaves the cell empty; a missing color
1714
+ takes the map's `bad`.
1715
+
1716
+ * **Long data.** `x`, `y` and `color`/`size` per cell (columns with `data=`, or
1717
+ sequences), one row per cell; two rows for one cell are an error, cells without a row
1718
+ get no dot. Categories in order of first appearance (pandas or polars categoricals:
1719
+ theirs); `x_categories=`/`y_categories=` lists select and order them.
1720
+ * **`scale_color`.** `"rows"` / `"columns"` rescales color values to 0–1 in each row or
1721
+ column before mapping (one variable's range per column).
1722
+ * **Cells.** The axes' width (`Figure(width=…)`) sets the space per column; rotated
1723
+ labels closer than `category_label_spacing` are thinned out. `data_ratio=1` on the plot
1724
+ makes cells square.
1725
+
1726
+ <!-- settings:Dots -->
1727
+ | Setting | Default | Meaning |
1728
+ |---|---|---|
1729
+ | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
1730
+ | `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. |
1731
+ | `color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1732
+ | `edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
1733
+ | `edge_width` | 0.5 | Outline width; 0: no outline. Length. |
1734
+ | `fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
1735
+ | `fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
1736
+ | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1737
+ | `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. |
1738
+ | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
1739
+ | `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
1740
+ | `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
1741
+ | `size_map` | (0.0, 12.0) | The sizes numbers in `size` are drawn with: a `SizeMap` (alias `smap`); without it (or `size_axis`), numbers are sizes in px. |
1742
+ | `size_limits` | '0/max' | Limits of the series' size axis, as an axis' `limits`; unset: `"auto"`. |
1743
+ | `size_scale` | — | Scale of the series' size axis; unset: `linear`. |
1744
+ | `size_axis` | — | A shared `SizeAxis` (`figure.size_axis(…)`) in place of the series' own: it holds the sizes, limits and scale. |
1745
+ | `size_key` | 'key' | With mapped sizes: a key attached to the plot, as a colorbar's (`"key"`), sample rows in the legend (`"legend"`), none (`False`), or the values to show (a list: a key with a marker at each). |
1746
+ | `scale_color` | — | `rows` / `columns`: color values rescaled to 0–1 in each row or column before mapping; unset: as given. |
1747
+ | `origin` | 'top' | `top`: row 0 at the top (y axis inverted); `bottom`: at the bottom. |
1748
+ | `colorbar` | True | Attach a colorbar to the plot (with color values). |
1749
+ | `name` | — | Legend entry; unset: not in the legend. |
1750
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1751
+ | `z` | — | Drawing order (higher on top); default: call order. |
1752
+ | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1753
+ | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
1754
+ | `text_color` | inherited ('black') | Text color. |
1755
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1756
+ | `font_family` | inherited ('Helvetica, Nimbus Sans, Arial, Liberation Sans, Arimo') | Font family. |
1757
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1758
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1759
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1760
+ | `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. |
1761
+ | `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
1762
+
1763
+ Groups: `Marker`, `Font`.
1764
+ <!-- /settings -->
1765
+
1592
1766
  ### Bar
1593
1767
 
1594
1768
  ```python
1595
1769
  pl.Bar(x, height=None, plot=None, **settings)
1596
1770
  ```
1597
1771
 
1598
- `x`: categories (a category axis) or numbers (bars centred on them, `width` in data units); a dict `{category: height}`; or heights alone (at 0, 1, …). `value_labels` writes the values outside, inside or at the centre of the bars, formatted by `value_label_format`; `fill` is the opacity of the bars' fill (or a color); `error` adds error bars at the bar ends. Value axes include 0 (`include_zero="auto"`).
1772
+ `x`: categories (a category axis) or numbers (bars centred on them, `width` in data units); a dict `{category: height}`; or heights alone (at 0, 1, …). `value_labels` writes the values outside, inside or at the centre of the bars, formatted by `value_label_format`; `fill_opacity` is the opacity of the bars' fill (`fill`: a color in place of theirs); `error` adds error bars at the bar ends. Value axes include 0 (`include_zero="auto"`).
1599
1773
 
1600
1774
  <!-- settings:Bar -->
1601
1775
  | Setting | Default | Meaning |
@@ -1605,9 +1779,10 @@ pl.Bar(x, height=None, plot=None, **settings)
1605
1779
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
1606
1780
  | `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
1607
1781
  | `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
1608
- | `edge_color` | 'series' | Outline color: a color, `"series"` (each bar's own color, at `alpha`) or none. |
1782
+ | `edge_color` | 'series' | Outline color: a color, `"series"` (each bar's own color, at `opacity`) or none. |
1609
1783
  | `edge_width` | 'var(line_width)' | Outline width. Length. |
1610
- | `fill` | 0.25 | Fill: an opacity of each bar's color, times `alpha` (outlines keep `alpha`); `True` (opaque), a color, or `False`. |
1784
+ | `fill` | True | Fill: `True` (each bar's color), a color, or `False`. |
1785
+ | `fill_opacity` | 0.25 | Opacity of the fill, times `opacity` (outlines keep `opacity`). |
1611
1786
  | `seam_color` | 'white' | Where outlined bars touch (dodged or adjacent), the shared edge in this color; `none`: both outlines as drawn. Between the parts of a stack, the line is the outline of the part nearer the baseline. |
1612
1787
  | `max_width` | — | Largest width of the series' part of a slot (as `width`); default none. Length; `%`: of the slot: one category, or the smallest gap between positions; `d`: data units. |
1613
1788
  | `width` | '80%' | Bar width: `%` of the slot, a length (bare numbers: px), `d` data units, or a duration (or `timedelta`) on time axes. Length; `%`: of the slot: one category, or the smallest gap between positions; `d`: data units. |
@@ -1617,13 +1792,13 @@ pl.Bar(x, height=None, plot=None, **settings)
1617
1792
  | `dodge` | True | Bar series sharing a category share its slot side by side; `False` overlays them. |
1618
1793
  | `gap` | 0.0 | Fraction of each bar's part of a shared slot left empty. Length; `%`: of each series' part of a shared slot. |
1619
1794
  | `saturation` | 1.0 | Saturation of the fills (seaborn: 0.75). |
1620
- | `error` | — | Error bars at the bar ends: a value, a sequence, `(low, high)` or `ErrorBars`. |
1795
+ | `error` | — | Error bars at the bar ends: a value, a sequence, `(low, high)` or `Errors`. |
1621
1796
  | `error_color` | '#333333' | Error bar color. |
1622
1797
  | `error_width` | 0.5 | Error bar line width. Length. |
1623
1798
  | `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. |
1624
1799
  | `value_label_format` | 'auto' | Number format of the value labels. |
1625
1800
  | `name` | — | Legend entry; unset: not in the legend. |
1626
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1801
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1627
1802
  | `z` | — | Drawing order (higher on top); default: call order. |
1628
1803
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1629
1804
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1651,7 +1826,7 @@ Groups: `Stroke` (`edge_`), `FillStyle`, `Stroke` (`error_`), `Font`, `NumberFor
1651
1826
  pl.Hist(values, plot=None, **settings)
1652
1827
  ```
1653
1828
 
1654
- `values`: one array, or several (a dict, a list of arrays) sharing the bins. `bins`: a count, edges, or numpy's rules (`auto` is numpy 2's). Bins are even on the axis scale (`bins_scale="axis"`): on a log axis, in log space. `stat` turns counts into densities (area 1), probabilities, percents or counts per unit; `cumulative` accumulates them. Several sets overlay (opacity 0.5), stack (`stack=True`) or dodge (`dodge=True`). `hist.stats`: `edges`, `counts` and `heights` per set.
1829
+ `values`: one array, or several (a dict, a list of arrays) sharing the bins; dates draw on a time axis. `bins`: a count (at most 10⁶), edges, or numpy's rules (`auto` is numpy 2's; a rule asking for more than 10⁶ bins is an error). Bins are even on the axis scale (`bins_scale="axis"`): on a log axis, in log space; edges or a `range` outside the axis' scale (0 on a log axis) are refused. `stat` turns counts into densities (area 1), probabilities, percents or counts per unit, per unit of the axis' space; `cumulative` accumulates them. Several sets overlay (`fill="auto"`: opacity 0.5), stack (`stack=True`) or dodge (`dodge=True`). Bars have no outline by default (`edge_width` 0). `hist.stats`: `edges`, `counts` and `heights` per set.
1655
1830
 
1656
1831
  <!-- settings:Hist -->
1657
1832
  | Setting | Default | Meaning |
@@ -1659,24 +1834,26 @@ pl.Hist(values, plot=None, **settings)
1659
1834
  | `bins` | 'auto' | A count, edges, or a rule: `auto`, `fd`, `sturges`, `scott`, `sqrt`, `rice`, `doane` (numpy's). |
1660
1835
  | `range` | — | Range of the bins; default the data range. |
1661
1836
  | `weights` | — | A weight per value (per set for several sets). |
1662
- | `stat` | 'count' | `count`, `density` (area 1), `probability`, `percent` or `frequency` (count per unit). |
1837
+ | `stat` | 'count' | `count`, `density` (area 1), `probability`, `percent` or `frequency` (count per unit); densities and frequencies per unit of the axis' space (log axes: per log unit, as `kde`). |
1663
1838
  | `cumulative` | False | Accumulate the bins. |
1664
1839
  | `kind` | 'stepfilled' | `bar` (adjacent bars), `step` (outline) or `stepfilled`. |
1665
1840
  | `bins_scale` | 'axis' | `axis`: bins even on the axis scale (log axes: in log space); `linear`: even in data units. |
1666
1841
  | `orientation` | 'vertical' | `vertical` (bins along x) or `horizontal`. |
1667
1842
  | `stack` | False | Stack the sets (and other stacked histograms with the same bins). |
1668
1843
  | `dodge` | False | Put the sets side by side within each bin. |
1669
- | `color` | — | Fill color, or one per set; default palette colors. |
1844
+ | `color` | — | Fill color, one per set (a list, or a dict by set name); default palette colors. |
1670
1845
  | `edge_color` | — | Bar outline color; default none. |
1671
- | `edge_width` | 0.0 | Bar outline width. Length. |
1846
+ | `edge_width` | 0.0 | Bar outline width; default 0 (none). Length. |
1672
1847
  | `line_color` | — | Step and outline color; default each set's color. |
1673
1848
  | `line_width` | inherited (0.5) | Step line width. Length. |
1674
1849
  | `outline` | True | `bar` and `stepfilled` kinds: the outer outline of each set, in `line_color` (dodged bars: each bar's outline). |
1675
- | `alpha` | 'auto' | Opacity; `"auto"`: 0.5 for overlaid sets, else the plot's. |
1850
+ | `fill` | True | Fill: `True` (each set's color), a color, or `False` (none). |
1851
+ | `fill_opacity` | 'auto' | Opacity of the fills, times `opacity` (lines keep `opacity`); `"auto"`: 0.5 for overlaid sets, else 1. |
1676
1852
  | `saturation` | 1.0 | Saturation of the fills. |
1677
1853
  | `value_labels` | False | Value labels on bars. |
1678
1854
  | `value_label_format` | 'auto' | Number format of the value labels. |
1679
1855
  | `name` | — | Legend entry; unset: not in the legend. |
1856
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1680
1857
  | `z` | — | Drawing order (higher on top); default: call order. |
1681
1858
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1682
1859
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1704,7 +1881,7 @@ Groups: `Stroke` (`edge_`), `Stroke` (`line_`), `Font`, `NumberFormat`.
1704
1881
  pl.Kde(values, plot=None, **settings)
1705
1882
  ```
1706
1883
 
1707
- A Gaussian kernel density of each set on a common grid of `points` points, extending `cut` bandwidths past the data (within `range`). `fill` fills under each curve (`True`: at 0.25, an opacity, or a color). `bandwidth`: `scott` (default), `silverman` (as scipy's `gaussian_kde`) or a number, times `adjust`. On log axes the density is computed in log space, per log unit. `kde.stats`: `grid`, `densities`, `bandwidths`.
1884
+ A Gaussian kernel density of each set on a common grid of `points` points, extending `cut` bandwidths past the data (within `range`); dates draw on a time axis. `fill` fills under each curve (`True`, or a color; at `fill_opacity`, 0.25). `bandwidth`: `scott` (default), `silverman` (as scipy's `gaussian_kde`) or a number, times `adjust`. On log axes the density is computed in log space, per log unit. A set without a bandwidth (no values, one, all equal) or a `range` outside the data has no curve (NaN densities), with a warning. `kde.stats`: `grid`, `densities`, `bandwidths`.
1708
1885
 
1709
1886
  <!-- settings:Kde -->
1710
1887
  | Setting | Default | Meaning |
@@ -1715,15 +1892,16 @@ A Gaussian kernel density of each set on a common grid of `points` points, exten
1715
1892
  | `range` | — | Limits of the curve (within the data plus `cut`); default none. |
1716
1893
  | `points` | 512 | Number of points of the curve. |
1717
1894
  | `cumulative` | False | Plot the cumulative distribution. |
1718
- | `fill` | False | Fill under the curve: an opacity of its color, `True` (0.25), a color, or `False` (stacked curves: 0.25). |
1895
+ | `fill` | False | Fill under the curve: `True` (its color), a color, or `False` (stacked curves are filled anyway). |
1896
+ | `fill_opacity` | 0.25 | Opacity of the fill (0–1). |
1719
1897
  | `weights` | — | A weight per value (per set for several sets). |
1720
1898
  | `orientation` | 'vertical' | `vertical` (values along x) or `horizontal`. |
1721
1899
  | `stack` | False | Stack the sets (seaborn's `multiple="stack"`). |
1722
- | `color` | — | Color, or one per set; default palette colors. |
1900
+ | `color` | — | Color, one per set (a list, or a dict by set name); default palette colors. |
1723
1901
  | `line_width` | inherited (0.5) | Line width. Length. |
1724
1902
  | `line_style` | 'solid' | Line style. Length. |
1725
1903
  | `name` | — | Legend entry; unset: not in the legend. |
1726
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1904
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1727
1905
  | `z` | — | Drawing order (higher on top); default: call order. |
1728
1906
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1729
1907
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1749,8 +1927,9 @@ Density contours of points (seaborn's `kdeplot(x=, y=)`): the 2-D Gaussian densi
1749
1927
  (bandwidth as [`Density`](#point-density): scipy's covariance times Scott's factor, or
1750
1928
  Silverman's, a number or a matrix, times `adjust`) on a `points` × `points` grid over
1751
1929
  the data plus `cut` bandwidths, in axis positions (log axes in log space). With a number
1752
- of `levels`, contour k of n encloses an equal share of the mass, from 1 − `thresh` (the
1753
- outermost) up; a list gives density values. Unfilled lines take the next palette color,
1930
+ n of `levels`, level k (0 … n − 1) encloses 1 − p of the mass, p = `thresh` + (1 −
1931
+ `thresh`)·k/(n − 1): the outermost 1 − `thresh`, the last at the density's maximum; a
1932
+ list gives density values. Unfilled lines take the next palette color,
1754
1933
  or `palette` (one color or colors per level), unless `color_map` is set; `fill=True`
1755
1934
  colors the bands through
1756
1935
  `color_map`, with the top band up to the maximum. Drawn by the contour code (lines,
@@ -1759,7 +1938,7 @@ labels, colorbar).
1759
1938
  <!-- settings:Kde2d -->
1760
1939
  | Setting | Default | Meaning |
1761
1940
  |---|---|---|
1762
- | `levels` | 10 | A number of iso-proportion levels (contour k of n encloses k/n of the mass, above `thresh`), or density values. |
1941
+ | `levels` | 10 | A number n of iso-proportion levels: level k (0 … n − 1) encloses 1 − p of the mass, p = `thresh` + (1 − `thresh`)·k/(n − 1) (the outermost 1 − `thresh`, the last at the density's maximum); or density values. |
1763
1942
  | `thresh` | 0.05 | Lowest iso-proportion: the outermost contour encloses 1 − `thresh` of the mass. |
1764
1943
  | `bandwidth` | 'scott' | `"scott"`, `"silverman"`, a number or a 2 × 2 matrix, as `Density`. |
1765
1944
  | `adjust` | 1.0 | Factor of the bandwidth. |
@@ -1774,7 +1953,7 @@ labels, colorbar).
1774
1953
  pl.Ecdf(values, plot=None, **settings)
1775
1954
  ```
1776
1955
 
1777
- A step line through the sorted values of each set: `stat` `proportion`, `count` or `percent`; `complementary` plots 1 − F.
1956
+ A step line through the sorted values of each set: `stat` `proportion`, `count` or `percent`; `complementary` plots 1 − F. `color`: one, a list (one per set) or a dict by set name.
1778
1957
 
1779
1958
  <!-- settings:Ecdf -->
1780
1959
  | Setting | Default | Meaning |
@@ -1783,11 +1962,11 @@ A step line through the sorted values of each set: `stat` `proportion`, `count`
1783
1962
  | `stat` | 'proportion' | `proportion` (0–1), `count` or `percent`. |
1784
1963
  | `complementary` | False | Plot 1 − F (survival). |
1785
1964
  | `orientation` | 'vertical' | `vertical`: values along x; `horizontal`: along y. |
1786
- | `color` | — | Line color, or one per set; default palette colors. |
1965
+ | `color` | — | Line color, one per set (a list, or a dict by set name); default palette colors. |
1787
1966
  | `line_width` | inherited (0.5) | Line width. Length. |
1788
1967
  | `line_style` | 'solid' | Line style. Length. |
1789
1968
  | `name` | — | Legend entry; unset: not in the legend. |
1790
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1969
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1791
1970
  | `z` | — | Drawing order (higher on top); default: call order. |
1792
1971
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1793
1972
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1809,7 +1988,7 @@ Groups: `Stroke`, `Font`.
1809
1988
  pl.Violin(values, positions=None, plot=None, **settings)
1810
1989
  ```
1811
1990
 
1812
- `values` as box plots take them. Each violin is the density of its category, mirrored; `width_scale` gives equal areas (default), areas proportional to the counts, or equal widths. `inner` draws a thin box with whiskers and a median dot, dashed quartiles, the points, or nothing (`False`). With `split=True`, two violin series share each slot as facing halves.
1991
+ `values` as box plots take them. Each violin is the density of its category, mirrored, in the value axis' space (log axes: in log space); `width_scale` gives equal areas (default), areas proportional to the counts, or equal widths. A category of one value (or all equal) is a line at it, with a warning. `inner` draws a thin box with whiskers and a median dot, dashed quartiles, the points, or nothing (`False`). With `split=True`, two violin series share each slot as facing halves.
1813
1992
 
1814
1993
  <!-- settings:Violin -->
1815
1994
  | Setting | Default | Meaning |
@@ -1819,11 +1998,11 @@ pl.Violin(values, positions=None, plot=None, **settings)
1819
1998
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
1820
1999
  | `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
1821
2000
  | `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
1822
- | `edge_color` | 'series' | Outline and inner color: a color or `"series"` (each violin's own color, at `alpha`). |
1823
- | `edge_width` | 0.5 | Outline width. Length. |
2001
+ | `edge_color` | 'series' | Outline and inner color: a color or `"series"` (each violin's own color, at `opacity`). |
2002
+ | `edge_width` | 'var(line_width)' | Outline width. Length. |
1824
2003
  | `saturation` | 1.0 | Saturation of the fills. |
1825
- | `alpha` | 1.0 | Opacity of the violins. |
1826
- | `fill` | 0.25 | Fill: an opacity of each violin's color, times `alpha` (outlines keep `alpha`); `True` (opaque), a color, or `False`. |
2004
+ | `fill` | True | Fill: `True` (each violin's color), a color, or `False`. |
2005
+ | `fill_opacity` | 0.25 | Opacity of the fill, times `opacity` (outlines keep `opacity`). |
1827
2006
  | `max_width` | — | Largest width of the series' part of a slot (as `width`); default none. Length; `%`: of the slot: one category, or the smallest gap between positions; `d`: data units. |
1828
2007
  | `width` | '80%' | Violin width: `%` of the slot, a length (bare numbers: px), `d` data units, or a duration on time axes. Length; `%`: of the slot: one category, or the smallest gap between positions; `d`: data units. |
1829
2008
  | `bandwidth` | 'scott' | `scott`, `silverman` or a number. |
@@ -1838,6 +2017,7 @@ pl.Violin(values, positions=None, plot=None, **settings)
1838
2017
  | `gap` | '10%' | Fraction of each part of a shared slot left empty. Length; `%`: of each series' part of a shared slot. |
1839
2018
  | `categories` | — | Category names of a list of arrays. |
1840
2019
  | `name` | — | Legend entry; unset: not in the legend. |
2020
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1841
2021
  | `z` | — | Drawing order (higher on top); default: call order. |
1842
2022
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1843
2023
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1870,7 +2050,8 @@ Points of each category's values: `Strip` spreads them by uniform jitter (± `ji
1870
2050
  | `color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1871
2051
  | `edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
1872
2052
  | `edge_width` | 0.5 | Outline width; 0: no outline. Length. |
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. |
2053
+ | `fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
2054
+ | `fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
1874
2055
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1875
2056
  | `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. |
1876
2057
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
@@ -1880,7 +2061,7 @@ Points of each category's values: `Strip` spreads them by uniform jitter (± `ji
1880
2061
  | `size_limits` | — | Limits of the series' size axis, as an axis' `limits`; unset: `"auto"`. |
1881
2062
  | `size_scale` | — | Scale of the series' size axis; unset: `linear`. |
1882
2063
  | `size_axis` | — | A shared `SizeAxis` (`figure.size_axis(…)`) in place of the series' own: it holds the sizes, limits and scale. |
1883
- | `size_legend` | True | With mapped sizes: a size key in the legend (`True`), none (`False`), or the values to show (a list). |
2064
+ | `size_key` | 'key' | With mapped sizes: a key attached to the plot, as a colorbar's (`"key"`), sample rows in the legend (`"legend"`), none (`False`), or the values to show (a list: a key with a marker at each). |
1884
2065
  | `orientation` | 'vertical' | `vertical` (categories on x) or `horizontal`. |
1885
2066
  | `max_width` | — | Largest width of the series' part of a slot (as `width`); default none. Length; `%`: of the slot: one category, or the smallest gap between positions; `d`: data units. |
1886
2067
  | `width` | '80%' | Width the points spread over: `%` of the slot, a length (bare numbers: px), `d` data units, or a duration on time axes. Length; `%`: of the slot: one category, or the smallest gap between positions; `d`: data units. |
@@ -1890,8 +2071,8 @@ Points of each category's values: `Strip` spreads them by uniform jitter (± `ji
1890
2071
  | `jitter` | '10%' | Half-width of the jitter (`%` of the slot width). Length; `%`: of the slot: one category, or the smallest gap between positions. |
1891
2072
  | `seed` | 0 | Seed of the jitter. |
1892
2073
  | `draw_order` | — | Drawing order: `"density"` (densest drawn last), `"-density"`, or sort keys per point (ascending); default: call order. |
1893
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `alpha_range`. |
1894
- | `alpha_range` | (0.2, 1.0) | Opacities of the least and most dense points when `alpha` is a density. |
2074
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `opacity_range`. |
2075
+ | `opacity_range` | (0.2, 1.0) | Opacities of the least and most dense points when `opacity` is a density. |
1895
2076
  | `name` | — | Legend entry; unset: not in the legend. |
1896
2077
  | `z` | — | Drawing order (higher on top); default: call order. |
1897
2078
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
@@ -1914,21 +2095,23 @@ Groups: `Marker`, `Font`.
1914
2095
  pl.Area(x, ys, plot=None, **settings)
1915
2096
  ```
1916
2097
 
1917
- Layers (rows of `ys`, or a dict `{name: values}`, one legend entry each) stacked on `baseline`: `zero`, `sym`, `wiggle` or `weighted_wiggle` (matplotlib's stackplot baselines). `interpolation` and `missing` as `Fill`.
2098
+ Layers (rows of `ys`, a dict `{name: values}`, one legend entry each, or one flat sequence) stacked on `baseline`: `zero`, `sym`, `wiggle` or `weighted_wiggle` (matplotlib's stackplot baselines). `fill_opacity` is the fills' opacity, `opacity` the whole series'. `interpolation` and `missing` as `Fill`.
1918
2099
 
1919
2100
  <!-- settings:Area -->
1920
2101
  | Setting | Default | Meaning |
1921
2102
  |---|---|---|
1922
2103
  | `baseline` | 'zero' | `zero`, `sym` (symmetric around 0), `wiggle` or `weighted_wiggle` (streamgraphs, as matplotlib's stackplot). |
1923
2104
  | `stack` | True | Stack the layers; `False` overlays them from 0. |
1924
- | `color` | — | A color, or one per layer; default palette colors. |
1925
- | `alpha` | 0.25 | Opacity of the fills. |
2105
+ | `color` | — | A color, one per layer (a list, or a dict by layer name); default palette colors. |
2106
+ | `fill` | True | Fill: `True` (each layer's color), a color, or `False`. |
2107
+ | `fill_opacity` | 0.25 | Opacity of the fill, times `opacity` (outlines keep `opacity`). |
1926
2108
  | `edge_color` | 'series' | Outline color of each layer's top: a color, `"series"` (each layer's own color) or none. |
1927
2109
  | `edge_width` | 'var(line_width)' | Outline width; default the line width. Length. |
1928
2110
  | `interpolation` | 'linear' | How points are joined: `linear`, `step-pre`, `step-post`, `step-mid`, `monotone` (a curve that never overshoots) or `spline` (centripetal Catmull–Rom). |
1929
2111
  | `missing` | 'break' | Missing values: `break` the line there, or `skip` them and connect their neighbours. |
1930
2112
  | `orientation` | 'vertical' | `vertical` (layers along x) or `horizontal` (along y). |
1931
2113
  | `name` | — | Legend entry; unset: not in the legend. |
2114
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1932
2115
  | `z` | — | Drawing order (higher on top); default: call order. |
1933
2116
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1934
2117
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -1941,7 +2124,7 @@ Layers (rows of `ys`, or a dict `{name: values}`, one legend entry each) stacked
1941
2124
  | `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
2125
  | `markup` | inherited (True) | Read markup in strings (`<b>`, `<i>`, `<sup>`, …: see [conventions](#1-conventions)); `False`: strings stay literal. |
1943
2126
 
1944
- Groups: `Stroke` (`edge_`), `Font`.
2127
+ Groups: `FillStyle`, `Stroke` (`edge_`), `Font`.
1945
2128
  <!-- /settings -->
1946
2129
 
1947
2130
  ### Errorbar
@@ -1960,7 +2143,8 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
1960
2143
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1961
2144
  | `marker_edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
1962
2145
  | `marker_edge_width` | 0.5 | Outline width; 0: no outline. Length. |
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. |
2146
+ | `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
2147
+ | `marker_fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
1964
2148
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1965
2149
  | `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. |
1966
2150
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
@@ -1972,10 +2156,10 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
1972
2156
  | `x_error` | — | Horizontal errors. |
1973
2157
  | `y_error` | — | Vertical errors. |
1974
2158
  | `y_error_style` | 'bars' | `bars`, or `band`: a filled band between the y error ends (points sorted by x). |
1975
- | `band_alpha` | 0.25 | Opacity of a band. |
2159
+ | `band_opacity` | 0.25 | Opacity of a band. |
1976
2160
  | `orientation` | 'vertical' | `vertical` (x along the x axis) or `horizontal` (x along the y axis). |
1977
2161
  | `name` | — | Legend entry; unset: not in the legend. |
1978
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
2162
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
1979
2163
  | `z` | — | Drawing order (higher on top); default: call order. |
1980
2164
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1981
2165
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -2007,7 +2191,8 @@ Stems from `baseline` to each value with a marker (lollipops), and a baseline li
2007
2191
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
2008
2192
  | `marker_edge_color` | — | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
2009
2193
  | `marker_edge_width` | 0.0 | Outline width; 0: no outline. Length. |
2010
- | `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. |
2194
+ | `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
2195
+ | `marker_fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
2011
2196
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
2012
2197
  | `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. |
2013
2198
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
@@ -2020,7 +2205,7 @@ Stems from `baseline` to each value with a marker (lollipops), and a baseline li
2020
2205
  | `baseline_width` | 0.5 | Baseline width. Length. |
2021
2206
  | `orientation` | 'vertical' | `vertical` stems (values on y) or `horizontal`. |
2022
2207
  | `name` | — | Legend entry; unset: not in the legend. |
2023
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
2208
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
2024
2209
  | `z` | — | Drawing order (higher on top); default: call order. |
2025
2210
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
2026
2211
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -2042,7 +2227,7 @@ Groups: `Marker` (`marker_`), `Stroke` (`baseline_`), `Font`.
2042
2227
  pl.Regression(x, y, plot=None, **settings)
2043
2228
  ```
2044
2229
 
2045
- A least-squares polynomial of `order` with the confidence band of the mean (Student's t), or a LOWESS curve (`lowess=True`, no band); `logx` fits against log x; `range` sets the x range of the polynomial curve (default the data's), drawn in `points` points. The points are drawn too unless `scatter=False` (marker settings with the `marker_` prefix; numbers in `marker_color` map through the series' color axis, as on [Line](#line)). `regression.stats`: `coefficients` (lowest power first), `r2`, `se`, and the curve.
2230
+ A least-squares polynomial of `order` with the confidence band of the mean (Student's t), or a LOWESS curve (`lowess=True`, no band); `logx` fits against log x; `range` sets the x range of the polynomial curve (default the data's), drawn in `points` points. With fewer distinct x values than `order` + 1, the order is lowered (one distinct x: no fit), with a warning. The points are drawn too unless `scatter=False` (marker settings with the `marker_` prefix; numbers in `marker_color` map through the series' color axis, as on [Line](#line)). `regression.stats`: `coefficients` (lowest power first), `r2`, `se`, and the curve.
2046
2231
 
2047
2232
  <!-- settings:Regression -->
2048
2233
  | Setting | Default | Meaning |
@@ -2058,13 +2243,14 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
2058
2243
  | `color` | — | Line, band and point color; default the next palette color. |
2059
2244
  | `line_width` | 'calc(1.4 * inherit)' | Line width; default 1.4 × the plot's. Length. |
2060
2245
  | `line_style` | 'solid' | Line style or dash list. Length. |
2061
- | `band_alpha` | 0.2 | Opacity of the band. |
2246
+ | `band_opacity` | 0.2 | Opacity of the band. |
2062
2247
  | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
2063
2248
  | `marker_size` | 4.5 | Marker size: the diameter of the circle of equal area, in px; one value or one per point. Length. |
2064
2249
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
2065
2250
  | `marker_edge_color` | 'auto' | Outline: as the fill color, or `"auto"` (white around filled markers; hollow ones outlined in their color). |
2066
2251
  | `marker_edge_width` | 0.5 | Outline width; 0: no outline. Length. |
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. |
2252
+ | `marker_fill` | True | `True`: filled with the color; `False`: hollow, outlined in the color. |
2253
+ | `marker_fill_opacity` | 1.0 | Opacity of the fill; below 1 the marker is also outlined in its color. |
2068
2254
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
2069
2255
  | `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. |
2070
2256
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
@@ -2072,7 +2258,7 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
2072
2258
  | `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
2073
2259
  | `orientation` | 'vertical' | `vertical` (y on x) or `horizontal` (the fit drawn with x along the y axis). |
2074
2260
  | `name` | — | Legend entry; unset: not in the legend. |
2075
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
2261
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
2076
2262
  | `z` | — | Drawing order (higher on top); default: call order. |
2077
2263
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
2078
2264
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -2094,7 +2280,7 @@ Groups: `Stroke`, `Marker` (`marker_`), `Font`.
2094
2280
  pl.Hist2d(x, y, plot=None, **settings)
2095
2281
  ```
2096
2282
 
2097
- Counts in rectangular bins (even on the axis scales), drawn as a heatmap with the heatmap's settings; bins below `min_count` are transparent; a colorbar source.
2283
+ Counts in rectangular bins (even on the axis scales), drawn as a heatmap with the heatmap's settings; bins below `min_count` are transparent; `stat="density"` per unit area of the axes' space; a colorbar source.
2098
2284
 
2099
2285
  <!-- settings:Hist2d -->
2100
2286
  | Setting | Default | Meaning |
@@ -2134,7 +2320,7 @@ the axes are not counted. Colored by `cmap`; a colorbar source.
2134
2320
  | `edge_width` | 0.0 | Outline width. Length. |
2135
2321
  | `colorbar` | False | Attach a colorbar to the plot. |
2136
2322
  | `name` | — | Legend entry; unset: not in the legend. |
2137
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
2323
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
2138
2324
  | `z` | — | Drawing order (higher on top); default: call order. |
2139
2325
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
2140
2326
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -2162,7 +2348,8 @@ Iso-lines (`lines`) and filled bands (`fill`) of a grid at nodes `x`/`y`. `level
2162
2348
  | Setting | Default | Meaning |
2163
2349
  |---|---|---|
2164
2350
  | `levels` | 10 | A number of levels (nice values over the data) or the level values. |
2165
- | `fill` | False | Fill the bands between levels: `True`, an opacity (0–1, times `alpha`), or `False`. |
2351
+ | `fill` | False | Fill the bands between levels: `True` or `False`. |
2352
+ | `fill_opacity` | 1.0 | Opacity of the bands, times `opacity`. |
2166
2353
  | `lines` | True | Draw the iso-lines. |
2167
2354
  | `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. |
2168
2355
  | `color_limits` | — | Limits of the series' color axis, as an axis' `limits`: `"-2/2"`, `"0/max"`, `"q:0.01/q:0.99"`; unset: `"auto"`, the values' range. |
@@ -2172,7 +2359,7 @@ Iso-lines (`lines`) and filled bands (`fill`) of a grid at nodes `x`/`y`. `level
2172
2359
  | `line_width` | 'calc(0.6 * inherit)' | Line width; default 0.6 × the plot's. Length. |
2173
2360
  | `line_style` | 'solid' | Line style. Length. |
2174
2361
  | `negative_style` | — | Line style of negative levels drawn with a single color (matplotlib: dashed). |
2175
- | `alpha` | 1.0 | Opacity. |
2362
+ | `opacity` | 1.0 | Opacity. |
2176
2363
  | `value_labels` | False | Write the level values on the lines. |
2177
2364
  | `value_label_format` | 'auto' | Number format of the value labels. |
2178
2365
  | `value_label_font_size` | '0.8em' | Label font size. Length; `%`: of the font size. |
@@ -2223,8 +2410,9 @@ Wedges of `values` (a sequence or a dict `{label: value}`) from `start`, on a pl
2223
2410
  | `value_label_format` | 'auto' | Number format of the value labels (percentages: of 100). |
2224
2411
  | `edge_color` | 'series' | Wedge outline color: a color, `"series"` (each wedge's own color) or `none`. |
2225
2412
  | `edge_width` | 1.25 | Wedge outline width. Length. |
2226
- | `alpha` | 1.0 | Opacity. |
2227
- | `fill` | 0.25 | Wedge fill: an opacity of each wedge's color, times `alpha` (outlines keep `alpha`); `True` (opaque), a color, or `False`. |
2413
+ | `opacity` | 1.0 | Opacity. |
2414
+ | `fill` | True | Wedge fill: `True` (each wedge's color), a color, or `False`. |
2415
+ | `fill_opacity` | 0.25 | Opacity of the fills, times `opacity` (outlines keep `opacity`). |
2228
2416
  | `seam_color` | 'white' | The edges neighbouring wedges share, in this color; `none`: both outlines as drawn. |
2229
2417
  | `name` | — | Legend entry; unset: not in the legend. |
2230
2418
  | `z` | — | Drawing order (higher on top); default: call order. |
@@ -2262,7 +2450,7 @@ h.color_axis # the series' own color axis
2262
2450
  ca = fig.color_axis(color_map="magma", limits="0/max") # a shared one
2263
2451
  p.heatmap(v, color_axis=ca)
2264
2452
  q.scatter(x, y, c=z, color_axis=ca)
2265
- fig.colorbar(ca, id=5, label="energy")
2453
+ fig.colorbar_area(ca, id=5, label="energy")
2266
2454
  fig = pl.Figure(cols=3, share_color="row") # each row's plots: one color axis
2267
2455
  fig = pl.Figure(cols=3, share_size="all") # one size axis, one size key
2268
2456
  ```
@@ -2288,12 +2476,16 @@ fig = pl.Figure(cols=3, share_size="all") # one size axis, one size ke
2288
2476
  color this way (`"all"` by default).
2289
2477
  * **`share_size`** does the same for the own size axes: limits over all the group's
2290
2478
  values, one `size_limits` (or `size_scale`) for the group, and one size key for the
2291
- group ([legend](#legend)). Each series keeps its `size_map`. Facet figures share size
2292
- too (`"all"`). A figure legend covering every plot of a key takes the key.
2479
+ group, beside its plots as a shared colorbar ([size keys](#size-keys); in the
2480
+ [legend](#legend) with `size_key="legend"`, where a figure legend covering every plot
2481
+ of a key takes it). Each series keeps its `size_map`. Facet figures share size too
2482
+ (`"all"`).
2293
2483
  * **Training.** Before the layout, each axis is resolved from the values it maps, by the
2294
2484
  code of x and y axes: the scale's domain, `limits` and quantiles, `include_zero`, no
2295
2485
  padding (unless `padding` is set). Values past the limits take the gradient's
2296
- `under`/`over` colors and missing values its `bad` color (sizes: the `SizeMap`'s).
2486
+ `under`/`over` colors and missing values its `bad` color (sizes: the `SizeMap`'s);
2487
+ colors outside the scale's domain (0 on a log scale) take the `bad` color too, with a
2488
+ warning naming their count.
2297
2489
 
2298
2490
  Color and size axes have the settings of [axes](#4-axes); these differ:
2299
2491
 
@@ -2314,9 +2506,10 @@ Color and size axes have the settings of [axes](#4-axes); these differ:
2314
2506
  ### Colorbars
2315
2507
 
2316
2508
  ```python
2317
- p.colorbar(source=None, side="bottom", **settings) # attached to a side of the plot
2509
+ p.add_colorbar(source=None, side="bottom", **settings) # attached to a side of the plot
2510
+ fig.plot(colorbar=True) # the same, when the plot is made
2318
2511
  fig.add_colorbar(source=None, plots=None, side="bottom", **settings) # beside plots
2319
- fig.colorbar(source, id=None, **settings) # in its own grid area
2512
+ fig.colorbar_area(source, id=None, **settings) # in its own grid area
2320
2513
  fig.colorbars # those of add_colorbar
2321
2514
  cb.axis # the color axis shown
2322
2515
  ```
@@ -2349,8 +2542,8 @@ the name of the color column or density.
2349
2542
  `values`, the gaps and `label_position` are a key's.
2350
2543
  * **Attached.** A band of the plot's box on its `side` (default `bottom`;
2351
2544
  `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
2545
+ placed along the side by `align` (default `center`; `start` is the left or top end, as
2546
+ for figure legends). On one side, from the axes outward: an outside legend, the
2354
2547
  colorbars (by `order`, else in creation order), the titles. A key longer than its axes
2355
2548
  side passes its ends, and the margins there grow.
2356
2549
  * **Lanes.** `fig.add_colorbar` puts a colorbar beside a set of plots (plots or their
@@ -2368,20 +2561,20 @@ the name of the color column or density.
2368
2561
  else on the right. It takes the settings of the first one but its place. An attached
2369
2562
  colorbar whose `side` is set stays, as do those of plots that are not a grid
2370
2563
  rectangle.
2371
- * **Own area.** `fig.colorbar(source, id=…)` is vertical in its grid area (`orientation`):
2564
+ * **Own area.** `fig.colorbar_area(source, id=…)` is vertical in its grid area (`orientation`):
2372
2565
  a key placed along it by `align`, a bar running along the neighbouring axes
2373
2566
  (`align="axes"`) or boxes (`"borders"`).
2374
2567
  * `p.save()` (one plot alone) leaves out figure colorbars: the plot's attached colorbars
2375
2568
  show again.
2376
2569
 
2377
2570
  Axis settings given to a colorbar go to its axis:
2378
- `p.colorbar(h, label="z", tick_format="{:.0%}")` sets `h.color_axis`'s tick format.
2571
+ `p.add_colorbar(h, label="z", tick_format="{:.0%}")` sets `h.color_axis`'s tick format.
2379
2572
 
2380
2573
  <!-- settings:Colorbar -->
2381
2574
  | Setting | Default | Meaning |
2382
2575
  |---|---|---|
2383
2576
  | `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). |
2577
+ | `align` | 'center' | Place along its side: `start` (left, or top), `center`, `end` (right, or bottom), or an end by name: `left`, `right` on top and bottom, `top`, `bottom` on the left and right. |
2385
2578
  | `order` | — | Place among the colorbars of its side: lower is nearer the axes; unset: creation order. |
2386
2579
  | `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
2580
  | `orientation` | 'auto' | Direction; `"auto"`: horizontal on top and bottom, vertical on the left and right and in an area of its own. |
@@ -2396,6 +2589,8 @@ Axis settings given to a colorbar go to its axis:
2396
2589
  | `extend` | 'auto' | Ends in the under/over colors: `auto` shows them when the limits clip the data. |
2397
2590
  | `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
2591
  | `frame` | False | Outline the bar (and its ends), following its shape. |
2592
+ | `count` | 3 | A size key's markers below its high limit (`values="limits"`). |
2593
+ | `marker_gap` | '0.4em' | Gap between a size key's markers (edge to edge). Length; `%`: of the font size. |
2399
2594
  | `frame_color` | '#666666' | Outline color. |
2400
2595
  | `frame_width` | 0.5 | Outline width. Length. |
2401
2596
 
@@ -2411,6 +2606,40 @@ Figure colorbars (`fig.add_colorbar`) have the settings of colorbars, and:
2411
2606
  | `pad` | 'auto' | Gap between the colorbar and the plots; `"auto"`: 0.8em on a key, 11 px on a bar. Length. |
2412
2607
  <!-- /settings -->
2413
2608
 
2609
+ ### Size keys
2610
+
2611
+ ```python
2612
+ p.scatter(x, y, size=w, size_map=(0, 12)) # a size key under the plot
2613
+ p.add_colorbar(s.size_axis, side="right", count=3) # a size key placed by hand
2614
+ s.set(size_key=[10, 50, 100]) # a marker at each value, labelled
2615
+ ```
2616
+
2617
+ A colorbar of a size axis is a size key: a key whose bar is sample markers of increasing
2618
+ size, `0% · • ● 100% Expressing`. Every series mapping sizes has one by default
2619
+ (`size_key="key"`), attached to its plot under the axes, after the plot's colorbars; a
2620
+ colorbar of the plot showing the same size axis, or a `fig.size_legend` area, replaces
2621
+ it.
2622
+
2623
+ * **Markers.** `count` (3) markers at values evenly spaced below the high limit (in the
2624
+ scale's terms), the high limit's own marker left out; when the low limit's size is
2625
+ zero, the first marker is the next value (at 0–1: ¼, ½, ¾).
2626
+ `marker_gap` (0.4em) between their edges; the line is as tall as the largest. The
2627
+ series' marker shape, in grey, or the series' color when one series of one color uses
2628
+ the axis. Vertical (on the left and right): largest at the top.
2629
+ * **Values.** The limits at the ends in the axis' `tick_format` (`"percent"` for
2630
+ fractions); `values="ticks"`, or a series' `size_key` list: a marker at each value
2631
+ (the axis' ticks, else 3–5 nice numbers), its value under it (right of a vertical
2632
+ key).
2633
+ * **Label**: `label`, else the axis' `label`, else the `size` column name.
2634
+ * **One line.** On top or bottom, a horizontal key joins the line of the keys before it
2635
+ on that side when the line still fits the axes width, `2 × label_gap` apart, middle
2636
+ lines aligned: a dot plot's color and size keys side by side.
2637
+ * **Shared.** As colorbars: plots sharing a size axis (`share_size`, or one
2638
+ `fig.size_axis()` in two plots or more) get one key beside them, in the lanes.
2639
+ * The other settings are a key's (`side`, `align`, `order`, `pad`, `value_gap`,
2640
+ `label_gap`, `label_position`); `style`, `thickness`, `length` and `extend` do not
2641
+ apply.
2642
+
2414
2643
  ## 7. Colors, maps and markers
2415
2644
 
2416
2645
  ### Colors and palette
@@ -2426,8 +2655,8 @@ that take a palette color.
2426
2655
 
2427
2656
  ```python
2428
2657
  pl.Palette(colors="tab10_custom", name=None) # a name, colors, a Palette or n -> colors
2429
- pl.register_palette(name, palette) # a Palette, colors or a function
2430
- pl.palette_names()
2658
+ pl.registry.palettes.add(name, palette) # a Palette, colors or a function
2659
+ pl.registry.palettes.names() pl.registry.palettes.get(name) # a Palette
2431
2660
  ```
2432
2661
 
2433
2662
  | `Palette` | |
@@ -2464,8 +2693,8 @@ parts: `palette=pl.ColorMap("viridis").to_palette(5)` for ordered categories.
2464
2693
  ```python
2465
2694
  pl.ColorMap(colors="rainbow_llhh", positions=None, under=None, over=None, bad=None,
2466
2695
  space=None, name=None, interpolation=None, widen_colors=1, widen_sides=1.0)
2467
- pl.register_color_map(name, color_map)
2468
- pl.color_map_names()
2696
+ pl.registry.color_maps.add(name, color_map)
2697
+ pl.registry.color_maps.names() pl.registry.color_maps.get(name) # a ColorMap ("_r": reversed)
2469
2698
  ```
2470
2699
 
2471
2700
  | Member | |
@@ -2568,8 +2797,8 @@ on the axis positions (log axes in log space); NaN points get NaN. `normalize`:
2568
2797
  under automatic limits. `method`: `"exact"` (the sum over all points, multithreaded in
2569
2798
  C, equal to scipy's), `"grid"` (binned, blurred and read back, about 1e-4 relative) or
2570
2799
  `"auto"` (exact up to 20,000 points). A `Density` (or `"density"`) is accepted by
2571
- `color`, `edge_color`, `size` (through the size axis, default `SizeMap()`), `alpha` (mapped
2572
- linearly to `alpha_range`, default (0.2, 1)) and `draw_order`, and by `marker_color` and
2800
+ `color`, `edge_color`, `size` (through the size axis, default `SizeMap()`), `opacity`
2801
+ (mapped linearly to `opacity_range`, default (0.2, 1)) and `draw_order`, and by `marker_color` and
2573
2802
  `marker_edge_color` of Line (one line), Errorbar, Stem and Regression; one object computes each
2574
2803
  series' own density, cached until a setting changes, and exposed as
2575
2804
  `series.stats["density"]`. The colorbar label defaults to `"density"`.
@@ -2626,39 +2855,58 @@ Inherited settings (figure → plot → axis; series → its color axis):
2626
2855
  | `plus` | 0.51 |
2627
2856
  | `cross` | 0.5754 |
2628
2857
 
2629
- Aliases: `triangle`, `o`, `s`, `d`, `^`, `v`, `<`, `>`, `+`, `x`. A `vec_io.Path` or SVG
2630
- path data in a unit box centred on the origin also works. `pl.register_marker(name, path)`
2631
- adds a shape (its area measured from the outline); `plot_io.markers.marker_path(name)` returns a path
2632
- for vec_io's `draw_markers`; `plot_io.markers.marker_area(name)` its area.
2858
+ Shorthands: `triangle`, `o`, `s`, `d`, `^`, `v`, `<`, `>`, `+`, `x`
2859
+ ([shorthands](#shorthands)). A `vec_io.Path` or SVG path data in a unit box centred on the
2860
+ origin also works. `pl.registry.markers.add(name, path)` adds a shape (its area measured
2861
+ from the outline), `pl.registry.markers.get(name)` returns its path; `plot_io.markers.resolve(name)` returns
2862
+ its unit path for vec_io's `draw_markers` and its area; `plot_io.markers.marker_area(name)`
2863
+ the area.
2633
2864
 
2634
2865
  ## 8. Output
2635
2866
 
2636
2867
  ```python
2637
- fig.save(path, **options) # .pdf, .eps, .png, .jpg/.jpeg, .jxl, .avif
2638
- fig.to_bytes(format="pdf", **options)
2868
+ fig.save(file, *, region=None, format=None, **options) # .pdf, .eps, .svg, .png, .jpg/.jpeg, .jxl, .avif
2869
+ fig.write(kind, *, region=None, **options) # bytes: "pdf", "eps", "svg", "png", …
2639
2870
  fig.draw(canvas, x=0, y=0) # on any vec_io canvas (its document's fonts); returns (width, height) in px
2640
2871
  fig.size() # (width, height) in px
2641
- p.save(path, …) p.to_bytes(…) p.draw(canvas, …) # one plot alone, at its size in the figure
2872
+ p.save(file, …) p.write(kind, …) p.draw(canvas, …) # one plot alone, at its size in the figure
2642
2873
  ```
2643
2874
 
2644
- The figure is drawn once on a page of a vec_io document in px; each output is made from
2645
- it with its own options:
2875
+ `save` writes to a path or a binary file object, in `format` (`"pdf"`, `"eps"`, `"svg"`,
2876
+ `"png"`, `"jpeg"`/`"jpg"`, `"jxl"`, `"avif"`) or by the path's extension; a path without
2877
+ one of these extensions and no `format` raises `ValueError`, as does a file object without
2878
+ `format`. `region` draws a genome region instead of the x axes' (figures and plots).
2879
+
2880
+ The figure is drawn once on a page of a vec_io document in px; each output is that
2881
+ document written by `vec_io.Document.write` with its options (option objects of
2882
+ `vec_io.options`, or dicts of their fields). plot_io reads `quality`, `dpi`,
2883
+ `default_dpi`, `background`, `simplify` and `fonts` (below) and passes the others; an option
2884
+ of another format (`font_hinting` for PNG) or an unknown one raises vec_io's `OptionError`
2885
+ (a `ValueError`). vec_io's `view` and `pages` are refused: a figure's size is its own
2886
+ (`width`, `height`, `margin`).
2646
2887
 
2647
2888
  | Options | Of |
2648
2889
  |---|---|
2649
2890
  | `title`, `author`, `subject`, `keywords`, `creator`, `creation_date`, `pdf_a`, `color_mode`, `ink_limit`, `icc_profile`, `base_dir` | the document (vec_io `Document`) |
2650
- | `font_dirs`, `system_fonts` | the fonts text is shaped and embedded with ([fonts](#1-conventions)) |
2891
+ | `fonts` | the fonts text is shaped and embedded with ([fonts](#1-conventions)): a vec_io `Fonts` or a dict of its fields (`dirs`, `system`, `downloads`, `db`); default the figure's `fonts` |
2651
2892
  | `text_as_paths` | text drawn as the outlines of its glyphs: no font embedded, text not selectable (default `False`) |
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 |
2653
- | `compression` | `"fast"`, `"balanced"` (default), `"best"`: the encoder's effort (PDF streams and images, PNG, JPEG, JPEG XL, AVIF) |
2654
- | `simplify` | the output's `simplify` for content without its own (series have theirs, below) |
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) |
2893
+ | `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 or SVG lossless. It goes into `images` (PDF, EPS, SVG) or the format's option (`png`, …) unless a dict there sets its own; an option object is used as given |
2894
+ | `compression` | PDF and EPS: `"fast"`, `"balanced"` (default), `"small"`: the encoder's effort for streams and image samples; `None`: uncompressed streams, a readable file. Images: `png={"compression": …}`, … |
2895
+ | `simplify` | the figure's `simplify` for this output: every series without its own follows it ([large data](#large-data)) |
2896
+ | `font_hinting` | PDF and EPS: TrueType hinting kept in embedded subsets (default: left out) |
2897
+ | `flatten` | PDF, EPS and SVG: a vec_io `Flatten` or a dict of its fields (`transparency`, `fallback`, `dpi`, `budget`, `cell`): translucent content drawn as opaque vectors (PDF and SVG: off by default; EPS: always), and what cannot be (an image by default, at `dpi`; a dict's `dpi` takes `"2x"`) |
2898
+ | `dpi` | the output's resolution (dots per inch, or `"2x"`: 192). Images: rendered at it. PDF, EPS and SVG: their images (rasterized series, heatmaps drawn as images) resampled to it, by vec_io's `ImagePolicy(dpi=…)`; not given, they are kept as they are |
2899
+ | `default_dpi` | images without `dpi`: the resolution, for this call (default the figure's `default_dpi`, `"4x"`: four image pixels per px); PDF, EPS and SVG never use it |
2900
+ | `background` | images: the color the figure is drawn on, in place of its `background` (`None`, `"none"`: transparent, white in JPEG); not given, the figure's |
2901
+ | `images` | PDF, EPS and SVG: a vec_io `ImagePolicy` or a dict of its fields: `quality`, `jxl`, and with `dpi` `dpi_mode` (`"down"`, default: images finer than `dpi` resampled down; `"match"`: every image to `dpi`), `dpi_threshold` (images within this factor kept, default 1.5), `dpi_average` (shrinking averages the stored values, `"srgb"`, default, or light, `"linear"`) |
2902
+ | `png`, `jpeg`, `jxl`, `avif` | that image output: a vec_io `PNG`, `JPEG`, `JXL` or `AVIF` or a dict of its fields (`quality`, `compression`, …) |
2658
2903
 
2659
2904
  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
2905
+ opacity of bands, markers, …) flattened into opaque shapes, with an image where it cannot
2906
+ be (dense translucent scatters), and its fonts embedded (Type 42 or CFF). SVG output
2907
+ (`.svg`) is vec_io's SVG writer: paths, `<text>` naming the font families (fonts are not
2908
+ embedded: the reader needs them, or use `text_as_paths=True`), images as PNG or JPEG data;
2909
+ it keeps what the PDF keeps (`simplify`, rasterized series as their images, `quality`). JPEG XL output
2662
2910
  (`.jxl`) needs libjxl, AVIF output (`.avif`) libavif 1.x. Images inside a
2663
2911
  PDF (rasterized series, heatmaps) are stored losslessly or as JPEG (`quality`), never as
2664
2912
  JPEG XL, so every PDF reader shows them. Fonts are embedded subsets without hinting: a
@@ -2669,9 +2917,9 @@ outer tick labels ([layout](#layout)).
2669
2917
 
2670
2918
  PNG quality: by default (`quality="auto"`) PNGs are palette images at quality 90: the plot's
2671
2919
  own colors stay exact, only antialiasing and gradients are approximated, and an image 256
2672
- colors cannot render well enough stays lossless. The 21 example PNGs total 0.74 MB this way,
2673
- 1.57 MB with `quality="lossless"` and 1.38 MB lossless with `compression="best"` (same pixels,
2674
- slower). Notebook previews are lossless.
2920
+ colors cannot render well enough stays lossless. The 28 example PNGs total 2.0 MB this way.
2921
+ Notebook previews (`_repr_png_`) are lossless, at the figure's `default_dpi`, and shown at the
2922
+ figure's size in px.
2675
2923
 
2676
2924
  ### Large data
2677
2925
 
@@ -2688,6 +2936,9 @@ slower). Notebook previews are lossless.
2688
2936
  axes and text stay vectors. Image output draws the group as vectors at its own
2689
2937
  resolution.
2690
2938
 
2939
+ Statistics and rasterization run on vec_io's worker threads: `VEC_IO_THREADS` sets their
2940
+ number (default: the usable CPUs, at most 8; 1: none). Results never depend on it.
2941
+
2691
2942
  Timings (`tools/bench.py`, 8 threads, PDF written):
2692
2943
 
2693
2944
  | Case | Time |
@@ -2761,8 +3012,9 @@ Details:
2761
3012
  `"chr1:500kb-2Mb"`, with `k`, `M`, `G` and an optional `b`, any case, and `,` or `_`
2762
3013
  between thousands), a `(chr, start, end)` tuple or list (0-based, half-open; the same
2763
3014
  position strings), or a mapping with `chr`, `start` and `end`; `plot_io.genome.parse_region` gives the
2764
- `Region` (`chr`, `start`, `end`). A series reads its own `region`, else its x axis'.
2765
- Data are read when the figure is drawn, for the region drawn: `save`, `to_bytes`, `draw`
3015
+ `Region` (`chr`, `start`, `end`). A region has no strand: a fourth element or a `strand`
3016
+ key is a `ValueError`. A series reads its own `region`, else its x axis'.
3017
+ Data are read when the figure is drawn, for the region drawn: `save`, `write`, `draw`
2766
3018
  and `size` take `region=` to draw another one (it replaces `fig.x_axis`'s region for
2767
3019
  that call).
2768
3020
  * **x axis.** Ticks under every track (but a Hi-C triangle with `direction="down"`), tick
@@ -2856,11 +3108,12 @@ t.bigwig(pax7_reader, name="Pax7", color="rose")
2856
3108
  | `def_value` | 0.0 | Value of bases no record covers; NaN breaks the line there. |
2857
3109
  | `kind` | 'step' | `step` (a step line along the bins), `line` (through the bin centres) or `bar` (one rectangle per bin). |
2858
3110
  | `fill_to` | 0.0 | Fill between the signal and a value, another series of the track (colored by whichever is above), or `False`. |
2859
- | `fill` | 0.2 | Fill (to `fill_to`): an opacity of the line color, `True` (opaque), a color, or `False`. |
3111
+ | `fill` | True | Fill (to `fill_to`): `True` (the line color), a color, or `False`. |
3112
+ | `fill_opacity` | 0.2 | Opacity of the fill, times `opacity`. |
2860
3113
  | `color` | — | Line color; default black alone in its track, the next palette color when overlaid. |
2861
3114
  | `transform` | — | A function applied to each value (log, scaling). |
2862
3115
  | `name` | — | Legend entry; unset: not in the legend. |
2863
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
3116
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
2864
3117
  | `z` | — | Drawing order (higher on top); default: call order. |
2865
3118
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
2866
3119
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -2889,13 +3142,15 @@ pl.Genes(reader, plot=None, **settings) # Bed with kind="genes", rows expande
2889
3142
  (dicts, or tuples in BED order). Used columns: `chr` (when given, rows of other
2890
3143
  chromosomes are left out), `start`, `end`, `name`, `score`, `strand`, `thickStart`,
2891
3144
  `thickEnd`, `itemRgb` (`reserved` in bigBeds), `blockCount`, `blockSizes`, `blockStarts`.
3145
+ A score that is not a number (`"."`) is missing (the map's `bad` color); an interval
3146
+ ending before it starts, or blocks not matching `blockCount`, are a `ValueError`.
2892
3147
  `genes` draws each BED12 model as a line, thin boxes for UTRs and thick boxes for coding
2893
3148
  exons, chevrons on introns (`strand`), and its name in italics with a strand mark
2894
3149
  (`Pcsk2 ›`). Names go left of their feature and are dropped where they would collide;
2895
- with `rows="expand"` packing leaves room for them (`names=False`: none). `name_region` names only the
3150
+ with `rows="expand"` packing leaves room for them (their measured width) (`names=False`: none). `name_region` names only the
2896
3151
  features overlapping it (a locus within a wider view), and packing then makes room only
2897
3152
  for those names. Features are outlined in their color (`outline`, `line_width`) over their
2898
- `fill` (an opacity of their color, 0.3; `False` for outlines only), the outline inside the feature's extent: a
3153
+ `fill` (`False` for outlines only) at `fill_opacity` (0.3), the outline inside the feature's extent: a
2899
3154
  feature narrower than two borders is one line, `line_width` wide. `recolor` snaps the features' colors
2900
3155
  (`itemRgb` ones included) to the named colors (`"blue 0.4"`, §7): `True` takes the
2901
3156
  closest of all shades, a level such as `0.4` the closest color's shade at that level, so
@@ -2914,7 +3169,8 @@ every feature has the same lightness.
2914
3169
  | `name_region` | — | Only features overlapping this region (as `region` takes it) get names; `None`: all. |
2915
3170
  | `strand` | False | Strand chevrons on boxes and introns. |
2916
3171
  | `outline` | True | Outline features in their color (`line_width` wide). |
2917
- | `fill` | 0.3 | Fill of the features: an opacity of their color (times `alpha`), `True` (opaque), a color, or `False` (outlines only). |
3172
+ | `fill` | True | Fill of the features: `True` (their color), a color, or `False` (outlines only). |
3173
+ | `fill_opacity` | 0.3 | Opacity of the fill, times `opacity`. |
2918
3174
  | `row_height` | '1.2em' | Height of a row; the track's automatic height is rows × it, plus the y axis padding. Length; `%`: of the font size. |
2919
3175
  | `name_font_size` | '0.85em' | Font size of feature names. Length; `%`: of the font size. |
2920
3176
  | `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. |
@@ -2922,7 +3178,7 @@ every feature has the same lightness.
2922
3178
  | `color_scale` | — | Scale of the series' color axis (`log`, `sqrt`, …); unset: `linear`. |
2923
3179
  | `color_axis` | — | A shared `ColorAxis` (`figure.color_axis(…)`) in place of the series' own: it holds the map, limits and scale. |
2924
3180
  | `name` | — | Legend entry; unset: not in the legend. |
2925
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
3181
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
2926
3182
  | `z` | — | Drawing order (higher on top); default: call order. |
2927
3183
  | `line_width` | inherited (0.5) | Line width. Length. |
2928
3184
  | `text_color` | inherited ('black') | Text color. |
@@ -2947,7 +3203,7 @@ Groups: `FillStyle`, `TextStyle` (`name_`), `Font`.
2947
3203
  | `names` | True | Feature names (`name`) left of the features, dropped where they collide. |
2948
3204
  | `strand` | True | Strand chevrons on boxes and introns. |
2949
3205
  | `outline` | False | Outline features in their color (`line_width` wide). |
2950
- | `fill` | True | Fill of the features: an opacity of their color (times `alpha`), `True` (opaque), a color, or `False` (outlines only). |
3206
+ | `fill_opacity` | 1.0 | Opacity of the fill, times `opacity`. |
2951
3207
 
2952
3208
  Groups: `FillStyle`.
2953
3209
  <!-- /settings -->
@@ -2991,7 +3247,8 @@ the cells of a size (`bins="5kb"`) sit on the file's grid, those past the region
2991
3247
  the track's edges, and `bins=n` reads n cells over the region exactly. Its color axis' limits default
2992
3248
  to quantiles of the cells drawn (`color_limits="q:0.01/q:0.99"`), on a log scale
2993
3249
  (`color_scale="log"`; cells of 0 take the map's low end; cells without a value take
2994
- `nan_color`, transparent), through the figure's `color_map`.
3250
+ `nan_color`, transparent), through the figure's `color_map`. A region without a finite
3251
+ positive value draws no cells, its color axis at its default limits.
2995
3252
 
2996
3253
  <!-- settings:HiC -->
2997
3254
  | Setting | Default | Meaning |
@@ -3011,7 +3268,7 @@ to quantiles of the cells drawn (`color_limits="q:0.01/q:0.99"`), on a log scale
3011
3268
  | `fit` | 'clip' | How the triangle fits a height below its own (`max_height`, or the track's `height`): `clip` keeps square cells and cuts the distances above; `squash` flattens the whole triangle. |
3012
3269
  | `colorbar` | False | Attach a colorbar to the track. |
3013
3270
  | `name` | — | Legend entry; unset: not in the legend. |
3014
- | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
3271
+ | `opacity` | inherited (1.0) | Opacity, multiplying the colors' own. |
3015
3272
  | `z` | — | Drawing order (higher on top); default: call order. |
3016
3273
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
3017
3274
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: vec_io's `simplify`. |
@@ -3053,12 +3310,12 @@ fig = pl.Figure(style="default")
3053
3310
  fig = pl.Figure(style={"base": "default", "font_size": 9, "Axis.grid": True})
3054
3311
  fig = pl.Figure(style={"base": ["house", "talk"], "palette": ["#333", "#c00"]})
3055
3312
 
3056
- pl.register_style("house", {"font_family": "Helvetica", "Legend.frame": True})
3313
+ pl.registry.styles.add("house", {"font_family": "Helvetica", "Legend.frame": True})
3057
3314
  pl.set_style("house") # figures created afterwards
3058
3315
  with pl.use_style({"font_size": 10}): # figures created inside the block
3059
3316
  ...
3060
- pl.styles.names() # registered names
3061
- pl.styles.settings("house") # the resolved dict (base theme included)
3317
+ pl.registry.styles.names() # registered names
3318
+ pl.registry.styles.get("house") # every key of the chain, DEFAULTS included
3062
3319
  ```
3063
3320
 
3064
3321
  * **Keys.** Names of inherited settings (`"font_size"`, `"palette"`), `"Class.name"` for
@@ -3073,23 +3330,25 @@ pl.styles.settings("house") # the resolved dict (base theme included)
3073
3330
  applies to color axes (the colorbars' axes) only, and `"XAxis.<setting>"`, `"YAxis.<setting>"` to the x or
3074
3331
  y axis of plots only; each wins over `"Axis.<setting>"` there.
3075
3332
  Keys starting with `--` are custom variables (`"--accent": "#c00"`), read by
3076
- `var(--accent)`. Values are checked when the style is registered or set.
3077
- * **`"base"`.** A style name or a list of names, applied left to right (later ones win);
3078
- the dict's own keys are applied over them. Registered styles use the same form.
3079
- * **Resolution.** The cascade of [conventions](#1-conventions): the object's own value,
3080
- class rules, `"Class.name"` keys along the class hierarchy, the parent (inherited
3081
- settings), `"Group.member"` keys, the class and group defaults, then the bare name. The
3082
- effective theme is the inherited defaults (the bare names of `DEFAULTS`) with the
3083
- expanded style merged over it.
3333
+ `var(--accent)`; a style has no `"Figure.style"` (its bases are `"base"`) or `vars`
3334
+ key. Values are checked when the style is registered or set.
3335
+ * **`"base"`.** A style name or a list of names (later ones win over earlier ones); the
3336
+ style's own keys win over its bases. Registered styles use the same form.
3337
+ * **Chain.** A figure's style, then its bases (depth first, each once), then `"default"`
3338
+ (`DEFAULTS`). The nearer style wins; within a style, the most specific key wins: a
3339
+ style's `"Marker.size"` beats its base's `"Line.marker_size"`. The order against the
3340
+ object's own values and the parent is the cascade of [conventions](#1-conventions);
3341
+ `explain` names the style a value comes from.
3084
3342
  * **Default.** Without `style`, a figure takes the session style current when it is
3085
- created (`use_style` innermost, else `set_style`), else `"default"`, which adds nothing
3086
- to `DEFAULTS`.
3343
+ created (`use_style` innermost, else `set_style`), else `"default"`. `DEFAULTS` is
3344
+ read-only and `"default"` cannot be re-registered: change defaults with a style
3345
+ (`pl.set_style({"font_family": "Nimbus Sans Narrow"})`).
3087
3346
  * **`scaling`.** A figure setting (default 1, or `"Figure.scaling"` in the style) that
3088
3347
  multiplies every absolute length: font sizes, line widths, marker sizes, tick lengths,
3089
3348
  pads and gaps, from the defaults, the style or set on objects (not the figure size).
3090
3349
  Lengths in `em` follow the scaled font size.
3091
3350
 
3092
- Bundled styles (`pl.styles.names()`), each the defaults of a library expressed in these
3351
+ Bundled styles (`pl.registry.styles.names()`), each the defaults of a library expressed in these
3093
3352
  settings (colors, fonts, grid, axis lines, ticks, legend and title placement, palette,
3094
3353
  color map, default series looks). They never change plot sizes or the minus sign
3095
3354
  (`style={"base": "matplotlib", "minus": "minus"}` gets matplotlib's).
@@ -3097,6 +3356,7 @@ color map, default series looks). They never change plot sizes or the minus sign
3097
3356
  | Style | Follows | Variants |
3098
3357
  |---|---|---|
3099
3358
  | `default` | `DEFAULTS` | — |
3359
+ | `solid` | solid bars, bar histograms, areas and violins, black-outlined boxes, markers without outline; the base of the library styles | — |
3100
3360
  | `matplotlib` | matplotlib ≥ 2.0 defaults (tab10, viridis, four spines, rounded legend frame) | `matplotlib-classic` (1.x: ticks in on all sides, b g r c m y k, jet) |
3101
3361
  | `seaborn` | seaborn darkgrid, notebook context, deep, rocket | `seaborn-darkgrid`, `-whitegrid`, `-dark`, `-white`, `-ticks`; `-paper`, `-talk`, `-poster` (scaling 0.8, 1.5, 2) |
3102
3362
  | `ggplot2` | `theme_grey()`: grey panel, white grid with minor lines, left title, legend outside, `hue` palette | `ggplot2-bw`, `-light`, `-minimal`, `-classic` |
@@ -3121,14 +3381,13 @@ documented default properties. What cannot be expressed: legend titles naming a
3121
3381
  | Exception | Raised for |
3122
3382
  |---|---|
3123
3383
  | `NoFontError` (a `ValueError`, `vec_io.text.NoFontError`) | text with no outline font available at all ([fonts](#1-conventions)) |
3124
- | `ValueError` | unknown settings or invalid values; mismatched data lengths; grids whose ids are not rectangles; ids outside the grid or taken; a full `rows` × `cols` arrangement; `width` with `plot_width`; a grid `layout` with `rows`/`cols`; ratios of the wrong length; mixed category and numeric series on an axis; limits outside a scale's domain; a colorbar without a mapped source, or of a `ColorMap`; `color_map`, `color_limits` or `color_scale` with a shared `color_axis`; shared color axes with different limits or scales; heatmap value labels on more than 2,500 cells; unknown formats or output options, or options of another format (`dpi` for a PDF, `compress` for an image); unknown bin rules or decreasing bin edges; negative pie values; pies with axis series on one plot; `axline` slopes on non-linear axes; decoration positions that are not categories of a category axis |
3384
+ | `ValueError` | unknown settings or invalid values; mismatched data lengths; grids whose ids are not rectangles; ids outside the grid or taken; a full `rows` × `cols` arrangement; `width` with `plot_width`; a grid `layout` with `rows`/`cols`; ratios of the wrong length; mixed category and numeric series on an axis; limits outside a scale's domain; a colorbar without a mapped source, or of a `ColorMap`; `color_map`, `color_limits` or `color_scale` with a shared `color_axis`; shared color axes with different limits or scales; heatmap value labels on more than 2,500 cells; unknown formats or output options, or options of another format (`background` for a PDF, `font_hinting` for an image); unknown bin rules or decreasing bin edges; negative pie values; pies with axis series on one plot; `axline` slopes on non-linear axes; decoration positions that are not categories of a category axis; dot grids of two shapes, or two rows for one dot cell |
3125
3385
 
3126
3386
  ## 12. Modules
3127
3387
 
3128
- `pl.__all__` (51 names) is the API. These modules are public too:
3129
- `plot_io.styles` (`pl.styles`: `names`, `settings`, `register_style`, `set_style`,
3130
- `use_style`), `plot_io.genome` (`parse_region`, `Region`), `plot_io.markers`
3131
- (`marker_path`, `marker_area`), `plot_io.color.palettes` (`PALETTE`), and the modules of
3388
+ `pl.__all__` (47 names) is the API. These modules are public too:
3389
+ `plot_io.registry` (`Registry`, and the registries), `plot_io.genome` (`parse_region`, `Region`), `plot_io.markers`
3390
+ (`resolve`, `marker_area`), `plot_io.color.palettes` (`PALETTE`), and the modules of
3132
3391
  the types calls return: `plot_io.facets` (`FacetSet`, `LayerSet`), `plot_io.tables`
3133
3392
  (`SeriesGroup`), `plot_io.colorbar` (`Colorbar`, `FigureColorbar`). The others are internal: their names
3134
3393
  may change in any release.
@@ -3145,7 +3404,7 @@ may change in any release.
3145
3404
  | `axis.py`, `scales.py`, `limits.py`, `ticks.py` | axes, scale functions, limits syntax, tick choice and labels |
3146
3405
  | `states.py` | the render's state of each plot: calls, palette, axes and their limits, legend, colorbars |
3147
3406
  | `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) |
3148
- | `render.py` | drawing from the geometry; the page of a px document and its outputs (`doc.to_bytes`, `page.render(…).encode`) |
3407
+ | `render.py` | drawing from the geometry; the page of a px document and its outputs (`write`: plot_io's options mapped, `vec_io.Document.write`) |
3149
3408
  | `mapped.py` | color and size axes (`ColorAxis`, `SizeAxis`): own and shared axes of series, their training |
3150
3409
  | `legend.py`, `colorbar.py` | legend (with size keys) and colorbar: measured, placed, drawn |
3151
3410
  | `layers/` | plot types as layers: `base.py` (`Series`, the model of a call; `data=`/`group=`), `core.py` (`Layer`, `Call`, `Table`), `stats.py` (columns from data), `positions.py` (stack, dodge, jitter, swarm, packing), `geoms.py` (the eight geoms: extent, drawing, legend symbol, occupancy, hit area), `pipeline.py` (calls per plot, palette training), `paint.py` (colors, mapped values, markers), `context.py` (drawing context, the x↔y swap); `register_layer` |
@@ -3154,10 +3413,11 @@ may change in any release.
3154
3413
  | `stats.py` | bins, densities, contours, LOWESS and swarm layout, adapted to plot_io's needs |
3155
3414
  | `kernels.py`, `_native/` | the numeric kernels (statistics, scaling, gathering) and their C library `plio`: sources, built binaries, bindings generated from `src/plio_api.h` (see `_native/README.md`) |
3156
3415
  | `decorations.py` | reference lines, spans, text and annotations |
3157
- | `color/` | colors: `values.py` (the `color` validator, named color scales, palette references, alpha, saturation, luminance), `palettes.py` (palettes: the discrete colors series take in turn; registry, ggplot2's hues), `maps.py` (`ColorMap`: the gradients of color axes and the palette indices or positions of heatmap cells, evaluated in plot_io's C library), `data.py` (bundled map and palette colors) |
3416
+ | `color/` | colors: `values.py` (the `color` validator, named color scales, palette references, alpha channels, saturation, luminance), `palettes.py` (palettes: the discrete colors series take in turn; registry, ggplot2's hues), `maps.py` (`ColorMap`: the gradients of color axes and the palette indices or positions of heatmap cells, evaluated in plot_io's C library), `data.py` (bundled map and palette colors) |
3158
3417
  | `sizemaps.py` | `SizeMap`: the diameters of size axes |
3159
3418
  | `markers.py`, `lines.py`, `text.py` | marker shapes, line dash styles, one-line text through `vec_io.text`: shaped lines (memoized in the font database, rich content per render), placed runs drawn as shaped, the title's paragraphs |
3160
- | `styles/` | style registry and expansion; bundled styles (point libraries in `pt`) |
3419
+ | `styles/` | styles and their expansion; bundled styles (point libraries in `pt`) |
3420
+ | `registry.py` | `pl.registry`: the color map, palette, marker, style and layer registries |
3161
3421
  | `values.py`, `density.py` | values given to `color`/`size` and their rules; `Density` (point density) |
3162
3422
  | `tables.py`, `facets.py` | columns of tables, `group=` splitting (`SeriesGroup`); `facet`, `FacetSet`, `LayerSet` |
3163
3423
  | `sharing.py`, `times.py` | shared axes; dates and times on axes |