plot-io 0.1.0__tar.gz → 0.2.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 (239) hide show
  1. {plot_io-0.1.0 → plot_io-0.2.0}/API.md +354 -269
  2. {plot_io-0.1.0 → plot_io-0.2.0}/EXAMPLES.md +34 -9
  3. {plot_io-0.1.0 → plot_io-0.2.0}/PKG-INFO +14 -4
  4. {plot_io-0.1.0 → plot_io-0.2.0}/README.md +12 -2
  5. plot_io-0.2.0/examples/annotated.png +0 -0
  6. {plot_io-0.1.0 → plot_io-0.2.0}/examples/annotated.py +5 -5
  7. plot_io-0.2.0/examples/bars.png +0 -0
  8. {plot_io-0.1.0 → plot_io-0.2.0}/examples/bars.py +5 -5
  9. plot_io-0.2.0/examples/box_plots.png +0 -0
  10. {plot_io-0.1.0 → plot_io-0.2.0}/examples/box_plots.py +1 -1
  11. plot_io-0.2.0/examples/density.png +0 -0
  12. {plot_io-0.1.0 → plot_io-0.2.0}/examples/density.py +6 -6
  13. plot_io-0.2.0/examples/distributions.png +0 -0
  14. {plot_io-0.1.0 → plot_io-0.2.0}/examples/distributions.py +3 -3
  15. plot_io-0.2.0/examples/error_bars.png +0 -0
  16. {plot_io-0.1.0 → plot_io-0.2.0}/examples/error_bars.py +2 -2
  17. plot_io-0.2.0/examples/facets.png +0 -0
  18. {plot_io-0.1.0 → plot_io-0.2.0}/examples/facets.py +4 -4
  19. plot_io-0.2.0/examples/grids2d.png +0 -0
  20. {plot_io-0.1.0 → plot_io-0.2.0}/examples/grids2d.py +3 -3
  21. plot_io-0.2.0/examples/groups.png +0 -0
  22. {plot_io-0.1.0 → plot_io-0.2.0}/examples/groups.py +3 -3
  23. plot_io-0.2.0/examples/heatmap.png +0 -0
  24. {plot_io-0.1.0 → plot_io-0.2.0}/examples/heatmap.py +2 -2
  25. plot_io-0.2.0/examples/large_data.png +0 -0
  26. {plot_io-0.1.0 → plot_io-0.2.0}/examples/large_data.py +3 -3
  27. plot_io-0.2.0/examples/layout_axes.png +0 -0
  28. plot_io-0.2.0/examples/layout_borders.png +0 -0
  29. {plot_io-0.1.0 → plot_io-0.2.0}/examples/layouts.py +3 -2
  30. plot_io-0.2.0/examples/line_band.png +0 -0
  31. {plot_io-0.1.0 → plot_io-0.2.0}/examples/line_band.py +3 -3
  32. plot_io-0.2.0/examples/scales.png +0 -0
  33. {plot_io-0.1.0 → plot_io-0.2.0}/examples/scales.py +4 -4
  34. plot_io-0.2.0/examples/scatter_groups.png +0 -0
  35. {plot_io-0.1.0 → plot_io-0.2.0}/examples/scatter_groups.py +2 -2
  36. plot_io-0.2.0/examples/shared_colorbar.png +0 -0
  37. {plot_io-0.1.0 → plot_io-0.2.0}/examples/shared_colorbar.py +2 -2
  38. plot_io-0.2.0/examples/styles/altair-2.png +0 -0
  39. plot_io-0.2.0/examples/styles/altair.png +0 -0
  40. plot_io-0.2.0/examples/styles/bokeh-2.png +0 -0
  41. plot_io-0.2.0/examples/styles/bokeh.png +0 -0
  42. plot_io-0.2.0/examples/styles/chartjs-2.png +0 -0
  43. plot_io-0.2.0/examples/styles/chartjs.png +0 -0
  44. plot_io-0.2.0/examples/styles/default-2.png +0 -0
  45. plot_io-0.2.0/examples/styles/default.png +0 -0
  46. plot_io-0.2.0/examples/styles/economist-2.png +0 -0
  47. plot_io-0.2.0/examples/styles/economist.png +0 -0
  48. plot_io-0.2.0/examples/styles/excel-2.png +0 -0
  49. plot_io-0.2.0/examples/styles/excel.png +0 -0
  50. plot_io-0.2.0/examples/styles/fivethirtyeight-2.png +0 -0
  51. plot_io-0.2.0/examples/styles/fivethirtyeight.png +0 -0
  52. plot_io-0.2.0/examples/styles/ggplot2-2.png +0 -0
  53. plot_io-0.2.0/examples/styles/ggplot2-bw-2.png +0 -0
  54. plot_io-0.2.0/examples/styles/ggplot2-bw.png +0 -0
  55. plot_io-0.2.0/examples/styles/ggplot2.png +0 -0
  56. plot_io-0.2.0/examples/styles/matlab-2.png +0 -0
  57. plot_io-0.2.0/examples/styles/matlab.png +0 -0
  58. plot_io-0.2.0/examples/styles/matplotlib-2.png +0 -0
  59. plot_io-0.2.0/examples/styles/matplotlib-classic-2.png +0 -0
  60. plot_io-0.2.0/examples/styles/matplotlib-classic.png +0 -0
  61. plot_io-0.2.0/examples/styles/matplotlib.png +0 -0
  62. plot_io-0.2.0/examples/styles/observable-2.png +0 -0
  63. plot_io-0.2.0/examples/styles/observable.png +0 -0
  64. plot_io-0.2.0/examples/styles/plotly-2.png +0 -0
  65. plot_io-0.2.0/examples/styles/plotly-white-2.png +0 -0
  66. plot_io-0.2.0/examples/styles/plotly-white.png +0 -0
  67. plot_io-0.2.0/examples/styles/plotly.png +0 -0
  68. plot_io-0.2.0/examples/styles/seaborn-2.png +0 -0
  69. plot_io-0.2.0/examples/styles/seaborn-whitegrid-2.png +0 -0
  70. plot_io-0.2.0/examples/styles/seaborn-whitegrid.png +0 -0
  71. plot_io-0.2.0/examples/styles/seaborn.png +0 -0
  72. plot_io-0.2.0/examples/styles/tufte-2.png +0 -0
  73. plot_io-0.2.0/examples/styles/tufte.png +0 -0
  74. {plot_io-0.1.0 → plot_io-0.2.0}/examples/styles.py +2 -2
  75. plot_io-0.2.0/examples/time_twin.png +0 -0
  76. {plot_io-0.1.0 → plot_io-0.2.0}/examples/time_twin.py +3 -3
  77. plot_io-0.2.0/examples/units.png +0 -0
  78. plot_io-0.2.0/examples/units.py +27 -0
  79. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/__init__.py +1 -1
  80. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/axis.py +147 -98
  81. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/colorbar.py +63 -41
  82. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/decorations.py +81 -67
  83. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/defaults.py +166 -310
  84. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/enums.py +7 -6
  85. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/facets.py +1 -1
  86. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/figure.py +102 -65
  87. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/labels.py +1 -1
  88. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/legend.py +68 -67
  89. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/maps/__init__.py +29 -15
  90. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/numbers.py +3 -3
  91. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/occupancy.py +1 -1
  92. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/plot.py +47 -26
  93. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/render.py +257 -170
  94. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/__init__.py +38 -19
  95. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/area.py +12 -11
  96. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/bar.py +29 -29
  97. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/box.py +48 -48
  98. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/catpoints.py +12 -9
  99. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/contour.py +26 -25
  100. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/curves.py +2 -2
  101. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/ecdf.py +16 -14
  102. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/errorbar.py +16 -15
  103. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/errors.py +46 -14
  104. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/fill.py +15 -14
  105. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/heatmap.py +14 -13
  106. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/hexbin.py +22 -19
  107. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/hist.py +45 -34
  108. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/hist2d.py +6 -6
  109. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/kde.py +30 -21
  110. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/kde2d.py +12 -12
  111. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/line.py +15 -17
  112. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/pie.py +54 -35
  113. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/points.py +21 -20
  114. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/regression.py +20 -18
  115. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/scatter.py +5 -4
  116. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/stem.py +14 -13
  117. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/violin.py +24 -23
  118. plot_io-0.2.0/plot_io/settings.py +534 -0
  119. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/sharing.py +7 -7
  120. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/slots.py +19 -9
  121. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/stacking.py +2 -2
  122. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/style.py +20 -4
  123. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/styles/__init__.py +19 -32
  124. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/styles/library.py +325 -317
  125. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/text.py +5 -3
  126. plot_io-0.2.0/plot_io/units.py +755 -0
  127. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/values.py +8 -4
  128. {plot_io-0.1.0 → plot_io-0.2.0}/pyproject.toml +1 -1
  129. plot_io-0.2.0/tests/golden.json +21 -0
  130. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_bars.py +1 -1
  131. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_box.py +1 -1
  132. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_decorations.py +4 -4
  133. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_defaults.py +41 -22
  134. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_density.py +6 -6
  135. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_entry.py +2 -2
  136. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_figure_title.py +12 -12
  137. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_golden.py +4 -4
  138. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_jxl_output.py +11 -0
  139. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_layout.py +77 -20
  140. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_markers.py +1 -1
  141. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_occupancy.py +8 -8
  142. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_output.py +23 -2
  143. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_pie.py +1 -1
  144. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_reflines.py +3 -3
  145. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_series.py +4 -4
  146. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_settings.py +34 -26
  147. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_sharing.py +1 -1
  148. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_simplify.py +1 -1
  149. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_style_settings.py +32 -24
  150. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_style_types.py +6 -6
  151. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_styles.py +42 -35
  152. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_tables.py +8 -8
  153. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_time_twin.py +1 -1
  154. plot_io-0.2.0/tests/test_units.py +325 -0
  155. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_values.py +19 -19
  156. {plot_io-0.1.0 → plot_io-0.2.0}/tools/settings_doc.py +37 -4
  157. plot_io-0.1.0/examples/annotated.png +0 -0
  158. plot_io-0.1.0/examples/bars.png +0 -0
  159. plot_io-0.1.0/examples/box_plots.png +0 -0
  160. plot_io-0.1.0/examples/density.png +0 -0
  161. plot_io-0.1.0/examples/distributions.png +0 -0
  162. plot_io-0.1.0/examples/error_bars.png +0 -0
  163. plot_io-0.1.0/examples/facets.png +0 -0
  164. plot_io-0.1.0/examples/grids2d.png +0 -0
  165. plot_io-0.1.0/examples/groups.png +0 -0
  166. plot_io-0.1.0/examples/heatmap.png +0 -0
  167. plot_io-0.1.0/examples/large_data.png +0 -0
  168. plot_io-0.1.0/examples/layout_axes.png +0 -0
  169. plot_io-0.1.0/examples/layout_borders.png +0 -0
  170. plot_io-0.1.0/examples/line_band.png +0 -0
  171. plot_io-0.1.0/examples/scales.png +0 -0
  172. plot_io-0.1.0/examples/scatter_groups.png +0 -0
  173. plot_io-0.1.0/examples/shared_colorbar.png +0 -0
  174. plot_io-0.1.0/examples/styles/altair-2.png +0 -0
  175. plot_io-0.1.0/examples/styles/altair.png +0 -0
  176. plot_io-0.1.0/examples/styles/bokeh-2.png +0 -0
  177. plot_io-0.1.0/examples/styles/bokeh.png +0 -0
  178. plot_io-0.1.0/examples/styles/chartjs-2.png +0 -0
  179. plot_io-0.1.0/examples/styles/chartjs.png +0 -0
  180. plot_io-0.1.0/examples/styles/default-2.png +0 -0
  181. plot_io-0.1.0/examples/styles/default.png +0 -0
  182. plot_io-0.1.0/examples/styles/economist-2.png +0 -0
  183. plot_io-0.1.0/examples/styles/economist.png +0 -0
  184. plot_io-0.1.0/examples/styles/excel-2.png +0 -0
  185. plot_io-0.1.0/examples/styles/excel.png +0 -0
  186. plot_io-0.1.0/examples/styles/fivethirtyeight-2.png +0 -0
  187. plot_io-0.1.0/examples/styles/fivethirtyeight.png +0 -0
  188. plot_io-0.1.0/examples/styles/ggplot2-2.png +0 -0
  189. plot_io-0.1.0/examples/styles/ggplot2-bw-2.png +0 -0
  190. plot_io-0.1.0/examples/styles/ggplot2-bw.png +0 -0
  191. plot_io-0.1.0/examples/styles/ggplot2.png +0 -0
  192. plot_io-0.1.0/examples/styles/matlab-2.png +0 -0
  193. plot_io-0.1.0/examples/styles/matlab.png +0 -0
  194. plot_io-0.1.0/examples/styles/matplotlib-2.png +0 -0
  195. plot_io-0.1.0/examples/styles/matplotlib-classic-2.png +0 -0
  196. plot_io-0.1.0/examples/styles/matplotlib-classic.png +0 -0
  197. plot_io-0.1.0/examples/styles/matplotlib.png +0 -0
  198. plot_io-0.1.0/examples/styles/observable-2.png +0 -0
  199. plot_io-0.1.0/examples/styles/observable.png +0 -0
  200. plot_io-0.1.0/examples/styles/plotly-2.png +0 -0
  201. plot_io-0.1.0/examples/styles/plotly-white-2.png +0 -0
  202. plot_io-0.1.0/examples/styles/plotly-white.png +0 -0
  203. plot_io-0.1.0/examples/styles/plotly.png +0 -0
  204. plot_io-0.1.0/examples/styles/seaborn-2.png +0 -0
  205. plot_io-0.1.0/examples/styles/seaborn-whitegrid-2.png +0 -0
  206. plot_io-0.1.0/examples/styles/seaborn-whitegrid.png +0 -0
  207. plot_io-0.1.0/examples/styles/seaborn.png +0 -0
  208. plot_io-0.1.0/examples/styles/tufte-2.png +0 -0
  209. plot_io-0.1.0/examples/styles/tufte.png +0 -0
  210. plot_io-0.1.0/examples/time_twin.png +0 -0
  211. plot_io-0.1.0/plot_io/settings.py +0 -281
  212. plot_io-0.1.0/tests/golden.json +0 -21
  213. {plot_io-0.1.0 → plot_io-0.2.0}/.gitignore +0 -0
  214. {plot_io-0.1.0 → plot_io-0.2.0}/LICENSE +0 -0
  215. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/_backend.py +0 -0
  216. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/density.py +0 -0
  217. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/limits.py +0 -0
  218. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/maps/data.py +0 -0
  219. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/markers.py +0 -0
  220. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/palettes.py +0 -0
  221. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/scales.py +0 -0
  222. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/series/catdata.py +0 -0
  223. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/shapes.py +0 -0
  224. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/stats.py +0 -0
  225. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/tables.py +0 -0
  226. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/ticks.py +0 -0
  227. {plot_io-0.1.0 → plot_io-0.2.0}/plot_io/times.py +0 -0
  228. {plot_io-0.1.0 → plot_io-0.2.0}/tests/helpers.py +0 -0
  229. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_distributions.py +0 -0
  230. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_docs.py +0 -0
  231. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_grids.py +0 -0
  232. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_heatmap.py +0 -0
  233. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_limits.py +0 -0
  234. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_maps.py +0 -0
  235. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_numbers.py +0 -0
  236. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_palettes.py +0 -0
  237. {plot_io-0.1.0 → plot_io-0.2.0}/tests/test_ticks.py +0 -0
  238. {plot_io-0.1.0 → plot_io-0.2.0}/tools/bench.py +0 -0
  239. {plot_io-0.1.0 → plot_io-0.2.0}/tools/dist.py +0 -0
@@ -22,28 +22,33 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
22
22
  in any order.
23
23
  * **Settings.** Every object takes its settings as keywords when created and in
24
24
  `set(**settings)`, which returns the object. `set(name=None)` goes back to the inherited
25
- or default value. `get(name)` returns the resolved value. Unknown names and invalid
26
- values raise `ValueError` naming the setting (with the nearest valid name).
25
+ or default value. `get(name)` returns the value as given (`"4.5pt"`, `"var(color)"`),
26
+ `resolve(name)` the final one (px, degrees, colors), and `explain(name)` where it comes
27
+ from ([values](#values)). Unknown names and invalid values raise `ValueError` naming
28
+ the setting (with the nearest valid name).
27
29
  * **Inheritance.** Settings marked *inherited* in the tables (font, line width, palette,
28
30
  alpha, `rasterize`, `simplify`) are looked up series → plot → figure → style.
29
31
  * **Defaults.** Every default is in one dict, `plot_io/defaults.py`'s `DEFAULTS`
30
- (`pl.defaults()` returns a copy): bare names for inherited settings (font size 8 pt,
31
- sans-serif, black text, line width 1, `simplify="auto"`, the palette, …), and
32
+ (`pl.defaults()` returns a copy): bare names for inherited settings (font size,
33
+ sans-serif, black text, line width, `simplify="auto"`, the palette, …), and
32
34
  `"Class.name"` for the settings of each class. A class without an entry uses its base
33
- class's. Entries that are functions are called with the object (a plot title is
34
- 1.2 × the plot's font size). `None` mostly means "chosen when drawing", as each
35
- setting's documentation says.
35
+ class's. Entries are plain data: a default that follows another setting is written
36
+ with units, `var()` or `calc()` (a plot title is `"1.2em"`, a minor tick `"60%"` of the
37
+ tick length, a fill's opacity `"calc(0.3 * var(alpha))"`). `None` and `"auto"` mean
38
+ "chosen when drawing", as each setting's documentation says. `"XAxis.name"` and
39
+ `"YAxis.name"` give one axis its own default.
36
40
  * **Styles.** `Figure(style=…)` presets settings: a style name or a dict of settings,
37
41
  merged over the inherited defaults (`pl.THEME`). See [Styles](#styles).
38
42
  * **Entry points.** `pl.Figure()`, `pl.Plot()` and the series classes (`pl.Scatter()`, …)
39
43
  each create the levels above them: `pl.Scatter(x, y)` makes a plot (`.plot`) in a new
40
44
  figure (`.plot.figure`). `fig.plot(…)` is `pl.Plot(figure=fig, …)` and `p.scatter(…)` is
41
45
  `pl.Scatter(…, plot=p)`. Keywords that belong to a level above go to it:
42
- `pl.Scatter(x, y, plot_width=4, title="T")`. A name present on several levels goes to
46
+ `pl.Scatter(x, y, width=300, title="T")`. A name present on several levels goes to
43
47
  the lowest.
44
- * **Units.** Font sizes, line widths, marker sizes and tick lengths are points. Figure
45
- sizes, spacing, margins and colorbar sizes are in the figure's `unit` (inches by
46
- default).
48
+ * **Units.** Lengths take units (`"1.5in"`, `"0.5em"`, `"60%"`); bare numbers are CSS px
49
+ (1 px = 1/96 in = 0.75 pt), except slot widths (data units). See [values](#values).
50
+ Images are `dpi` pixels per inch: `dpi=96` gives one image pixel per px, the default 192
51
+ two. A dpi up to 16 is a multiple of 96: `dpi=2` is 192. PDF pages are sized in pt (× 0.75).
47
52
  * **Data.** Sequences (`None` = missing), `array.array`, or any buffer (numpy arrays are
48
53
  read without importing numpy). NaN or `None` values are missing: scatter skips them,
49
54
  line and fill break there, box ignores them, heatmap cells take `nan_color`.
@@ -56,6 +61,61 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
56
61
  `pl.Orientation`, `pl.Scale`, `pl.Position`, `pl.Order` and `pl.Align` are `str` enums
57
62
  of the same values.
58
63
 
64
+ ### Values
65
+
66
+ Every length, angle and number setting takes a value with a unit, a reference to another
67
+ setting, or an expression:
68
+
69
+ ```python
70
+ pl.Plot(width="3in", font_size="9pt", title="T")
71
+ p.x_axis(tick_length="0.5em", minor_tick_length="50%", tick_rotation="0.125turn")
72
+ p.bar(days, counts, width="20h") # a duration on a time axis
73
+ p.errorbar(x, y, y_error=e, cap_length="0.2data") # data units across the bar
74
+ p.title(font_size="large", color="var(--accent)")
75
+ p.legend(pad="calc(1em - 2px)")
76
+ fig.set(vars={"accent": "#c00"}) # custom variables, read by var(--name)
77
+ ```
78
+
79
+ | Unit | Meaning |
80
+ |---|---|
81
+ | bare number | px (lengths), degrees (angles); data units for slot widths (`Bar`, `Box`, `Violin`, `Strip`, `Swarm` `width`) |
82
+ | `px` `pt` `pc` `in` `cm` `mm` `Q` | absolute lengths |
83
+ | `em` | the object's `font_size`; in a `font_size` setting, the parent's |
84
+ | `rem` | the figure's `font_size` |
85
+ | `%` | of the reference the setting's table entry names: another setting (`minor_tick_length`: of `tick_length`), the font size, the axes side (`tick_length`: across the axis), the slot, the box, the radius, the data range (`padding`) |
86
+ | `data` | along a data axis: data units on linear axes, categories on category axes, seconds on time axes; an error on log, symlog and logit axes |
87
+ | `ms` `s` `min` `h` `d` `w` | durations, as data units of time axes (a `timedelta` too) |
88
+ | `fr` | a share of the room left by fixed tracks, in `Figure.widths`/`heights` |
89
+ | `deg` `grad` `rad` `turn` | angles |
90
+ | `xx-small` … `xx-large`, `smaller`, `larger` | font sizes: × 0.579 … 1.728 of `rem`; ÷/× 1.2 of the parent's |
91
+
92
+ * **`var(name[, fallback])`** reads another setting of the object, resolved through the
93
+ usual inheritance; `var()` of the setting's own name reads the parent's value
94
+ (`alpha="calc(var(alpha) / 2)"`). `var(--name)` reads a custom variable: from the
95
+ nearest `vars` (figure or plot), else a `"--name"` key of the style. The fallback is used
96
+ when the value is unset. Loops raise. Text settings (titles, labels, names, formats)
97
+ never read `var()`.
98
+ * **`calc()`** takes `+ - * /`, parentheses, numbers, dimensions with any unit and
99
+ `var()`: dimensions add to dimensions and multiply or divide by numbers.
100
+ * **Layout.** `%` of the axes is exact with `reference="axes"` (the axes size is given)
101
+ and resolved inside the layout loop otherwise; it is known only while the figure is
102
+ drawn. `spacing`, `margin` and fixed `widths`/`heights` in `%` of the figure are solved
103
+ exactly when the figure size follows from its contents.
104
+ * **Scaling.** `Figure.scaling` multiplies every absolute length (px and physical units)
105
+ wherever it is given: on objects, in styles, in `DEFAULTS`; not the figure size.
106
+ `em`, `rem` and font keywords follow `font_size`, which is scaled; `%`, `fr` and `data`
107
+ are not scaled.
108
+ * **Reading.** `get(name)` returns the value as given, `resolve(name)` the final value
109
+ (`resolve(name, of=…)` for settings whose `%` reference the caller passes), and
110
+ `explain(name)` a trace:
111
+
112
+ ```
113
+ >>> pl.Plot(style="matplotlib").x_axis.explain("tick_spacing")
114
+ Axis.tick_spacing = (46.6667px, 33.3333px) ← ('calc(3.5 * var(tick_font_size))', 'calc(2.5 * var(tick_font_size))') (default Axis.tick_spacing)
115
+ Axis.tick_font_size = 13.3333px ← '1em' (default Axis.tick_font_size)
116
+ Axis.font_size = 13.3333px ← '10.0pt' (inherited from Figure: style "matplotlib" font_size)
117
+ ```
118
+
59
119
  ## 2. Figures
60
120
 
61
121
  ```python
@@ -85,15 +145,29 @@ are names; `fig.plot()` gives 1, 2, 3, … skipping taken ids.
85
145
 
86
146
  ### Sizes and alignment
87
147
 
88
- * `plot_width` × `plot_height` (default 3 × 2.25 in) is one cell's aligned box; the
89
- figure size follows. `width` × `height` fix the figure instead; giving both kinds for
90
- one direction raises `ValueError`. `widths`/`heights` are column/row ratios.
91
- * `align="axes"` (default): axis lines line up. Each cell's axes are `plot_width` ×
92
- `plot_height`; between columns the gutter holds the widest right margin before it, the
93
- widest left margin after it and `spacing`. A plot spanning cells covers the gutters in
94
- its span.
95
- * `align="borders"`: plot boxes (axes and decorations) line up; each cell's box is
96
- `plot_width` × `plot_height`, and the axes are what the plot's own decorations leave.
148
+ * `width` × `height` is the size of the box `reference` names:
149
+ * `"axes"` (default): each grid cell's axes rectangle; the figure size follows;
150
+ * `"plot"`: each cell's whole plot box (axes and decorations); the figure size follows;
151
+ * `"figure"`: the whole figure; the cells share what the decorations leave.
152
+
153
+ With only one of `width` and `height`, `aspect_ratio` (width / height, default 4/3)
154
+ gives the other; with neither, the default is 3 × 2.25 in (288 × 216 px). Giving all
155
+ three raises `ValueError`. Plots with a `data_ratio` (and pies) take the other side from
156
+ it when only `width` or only `height` is given. `widths`/`heights` are the columns' and
157
+ rows' ratios (numbers or `fr`), or fixed lengths (`["2in", "1fr", "1fr"]`) that the
158
+ ratios share the rest around; a plot spanning cells gets their sizes plus the gaps
159
+ between them.
160
+ * `align="axes"` (default): axis lines line up. Between columns the gutter holds the
161
+ widest right margin before it, the widest left margin after it and `spacing`.
162
+ * `align="borders"`: plot boxes (axes and decorations) line up, and each plot's axes are
163
+ what its own decorations leave.
164
+ * `reference` and `align` combine:
165
+
166
+ | `align` \ `reference` | `"axes"` | `"plot"` | `"figure"` |
167
+ |---|---|---|---|
168
+ | `"axes"` | each cell's axes are `width` | the widest plot box of a column (axes plus the column's largest margins) is `width`; the axes are what is left | the figure is `width`; the axes share what the gutters leave |
169
+ | `"borders"` | a column's box is `width` plus the largest margins in it, so every axes rectangle is at least `width` | each cell's box is `width` | the figure is `width`; the boxes share what the gaps leave |
170
+
97
171
  * Columns (rows) holding only vertical (horizontal) colorbars are as wide as the bar,
98
172
  unless `widths` (`heights`) is given.
99
173
  * Margins come from the real text metrics of tick labels, axis labels, titles, outside
@@ -107,8 +181,8 @@ fig.title(text, **settings) # None removes it
107
181
  ```
108
182
 
109
183
  A band at the top of the figure: the title's height (all lines, wrapped within its
110
- width) plus `pad`. With `plot_width`/`plot_height` the figure grows by the band; with a
111
- fixed `height` the plots shrink by it. `over="axes"` aligns it within the leftmost to
184
+ width) plus `pad`. The figure grows by the band, except with `reference="figure"`, where
185
+ the plots shrink by it. `over="axes"` aligns it within the leftmost to
112
186
  rightmost axes (a left-aligned title starts at the first y axis line), `"figure"` within
113
187
  the figure minus `margin`. Rich content styles a second line (`["Title\n",
114
188
  pl.Span("subtitle", font_size=7, font_weight="normal")]`). It is drawn last and is not
@@ -120,13 +194,13 @@ width.
120
194
  | Setting | Default | Meaning |
121
195
  |---|---|---|
122
196
  | `text` | — | Title text: a string or rich content; `\n` starts a line. |
123
- | `font_size` | 1.4 × the figure's font size | Font size (pt); default 1.4 × the base font size. |
197
+ | `font_size` | '1.4rem' | Font size; default 1.4 × the base font size. Length; `%`: of the parent's font size. |
124
198
  | `font_weight` | 'bold' | `bold` or `normal`. |
125
199
  | `align` | 'center' | Alignment. |
126
200
  | `over` | 'axes' | Width it is aligned and wrapped within: from the leftmost to the rightmost axes, or the whole figure. |
127
- | `pad` | 0.5 × the title's font size | Gap between the title and the plots (pt); default half the font size. |
128
- | `color` | The figure's text color | Text color. |
129
- | `font_family` | inherited ('sans-serif') | Font family. |
201
+ | `pad` | '0.5em' | Gap between the title and the plots; default half the font size. Length. |
202
+ | `color` | 'var(text_color)' | Text color. |
203
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
130
204
  <!-- /settings -->
131
205
 
132
206
  ### Shared axes
@@ -182,31 +256,30 @@ with outer labels only.
182
256
  | `cols` | — | Automatic arrangement: columns. |
183
257
  | `order` | 'auto' | Fill order of the automatic arrangement: `auto` (row by row with `cols`, column by column with `rows`), `row` or `col`. |
184
258
  | `align` | 'axes' | `axes`: axis lines line up across plots; `borders`: plot boxes line up. |
185
- | `widths` | — | Column width ratios. |
186
- | `heights` | — | Row height ratios. |
187
- | `plot_width` | 3 in, in the figure's unit | Width of one grid cell's aligned box (axes, or whole plot with `align="borders"`), in `unit`; default 3 in. |
188
- | `plot_height` | 2.25 in, in the figure's unit | Height of one grid cell's aligned box, in `unit`; default 2.25 in. |
189
- | `width` | — | Figure width in `unit` (instead of `plot_width`). |
190
- | `height` | — | Figure height in `unit` (instead of `plot_height`). |
191
- | `unit` | 'in' | Unit of the figure's sizes: `in`, `cm`, `mm` or `pt`. |
192
- | `spacing` | 10 pt, in the figure's unit | Minimum gap between neighbouring plots, in `unit`; default 10 pt. |
193
- | `margin` | 4 pt, in the figure's unit | Space around the figure, in `unit`; default 4 pt. |
194
- | `background` | — | Figure background; unset: none in PDF, `image_background` in images. |
195
- | `image_background` | 'white' | Background of PNG, JPEG and JPEG XL output when `background` is unset. |
196
- | `dpi` | 150.0 | Resolution of PNG, JPEG and JPEG XL output. |
197
- | `quality` | — | Quality (1–100), as pdf_io's: of JPEG and JPEG XL output, and of rasterized content in PDFs (stored as JPEG). Unset: pdf_io's defaults (JPEG 90; JPEG XL and PDF images lossless). |
259
+ | `widths` | — | Column widths: ratios (numbers or `fr`) sharing the room left by fixed lengths (`"2in"`, `"30%"` of the figure width). |
260
+ | `heights` | — | Row heights, as `widths`. |
261
+ | `width` | '3in' | Width of the `reference` box: one cell's axes, one cell's plot, or the figure. Length. |
262
+ | `height` | 'calc(var(width) / var(aspect_ratio))' | Height of the `reference` box. Length. |
263
+ | `aspect_ratio` | 1.3333333333333333 | Width / height of the `reference` box (16:9 → `16 / 9`), when only one of `width` and `height` is given. |
264
+ | `reference` | 'axes' | What `width` and `height` measure: `axes` (each grid cell's axes rectangle), `plot` (each cell's whole plot box) or `figure`. |
265
+ | `spacing` | 13.0 | Minimum gap between neighbouring plots. Length. |
266
+ | `margin` | 5.0 | Space around the figure. Length. |
267
+ | `background` | — | Figure background; unset: transparent (white in JPEG, which has no transparency). |
268
+ | `dpi` | 192.0 | Resolution of PNG, JPEG, JPEG XL and AVIF output: `96` gives one image pixel per px, the default `192` two; up to 16, a multiple of 96 (`2` is 192). |
269
+ | `quality` | — | Quality (1–100), as pdf_io's: of JPEG, JPEG XL and AVIF output, and of rasterized content in PDFs (stored as JPEG). Unset: pdf_io's defaults (JPEG 90; JPEG XL, AVIF and PDF images lossless). |
198
270
  | `title_rule` | — | Color of a rule above the figure title, across its width (The Economist's red bar); default none. |
199
- | `title_rule_width` | 3.0 | Thickness of the title rule (pt). |
271
+ | `title_rule_width` | 4.0 | Thickness of the title rule. Length. |
200
272
  | `share_x` | — | Plots sharing their x axis: `False`, `True`/`"all"`, `"col"` (same column span) or `"row"` (same row span). |
201
273
  | `share_y` | — | Plots sharing their y axis, as `share_x`. |
202
274
  | `share` | — | Both axes at once: as `share_x`, or `"grid"` (x per column, y per row); `share_x`/`share_y` override it. |
203
275
  | `label_outer` | — | Tick labels and axis titles of shared axes only on the outer plots (bottom of each column, left of each row); default `True` for groups from the figure's settings, `False` for plots paired with `share_x=plot`. |
204
276
  | `style` | — | A style name (`"ggplot2"`, …) or a dict of settings with an optional `"base"`; default: the session style (`set_style`, `use_style`), else `"default"`. |
277
+ | `vars` | — | Custom variables, read by `var(--name)` in any setting here and below: `{"accent": "#c00"}`. |
205
278
  | `scaling` | 1.0 | Multiplies every font size, line width, marker size, tick length and pad of the style; default 1. |
206
- | `font_size` | inherited (8.0) | Base font size (pt). |
207
- | `font_family` | inherited ('sans-serif') | Font family. |
279
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
280
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
208
281
  | `text_color` | inherited ('black') | Text color. |
209
- | `line_width` | inherited (1.0) | Default line width (pt). |
282
+ | `line_width` | inherited (1.25) | Default line width. Length. |
210
283
  | `palette` | inherited (10 colors) | Colors of series without one. |
211
284
  | `alpha` | inherited (1.0) | Default opacity of series. |
212
285
  | `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
@@ -239,19 +312,20 @@ axes clip.
239
312
  | Setting | Default | Meaning |
240
313
  |---|---|---|
241
314
  | `spines` | 'bottom left' | Axis lines drawn: any of `left`, `bottom`, `right`, `top`, or `all`, `none`. |
242
- | `aspect` | — | Data aspect ratio: 1 makes one unit as long on both axes. |
315
+ | `data_ratio` | — | Data aspect ratio: 1 makes one unit as long on both axes. |
243
316
  | `background` | — | Background color of the axes area. |
244
317
  | `border` | — | Color of a frame around the axes area (drawn under the axis lines); default none. |
245
- | `border_width` | 0.8 | Width of the frame (pt). |
318
+ | `border_width` | 0.75 | Width of the frame. Length. |
246
319
  | `clip` | True | Clip series to the axes area. |
247
320
  | `axes` | True | Draw axes; `False` hides both axes, drops padding and fixes the aspect to 1 (set by pie charts). |
248
321
  | `share_x` | — | Another plot of the figure whose x axis this plot shares (groups chain); overrides the figure's `share_x`. |
249
322
  | `share_y` | — | Another plot whose y axis this plot shares. |
323
+ | `vars` | — | Custom variables, read by `var(--name)` in any setting here and below: `{"accent": "#c00"}`. |
250
324
  | `share` | — | Another plot whose x and y axes this plot shares. |
251
- | `font_size` | inherited (8.0) | Base font size (pt). |
252
- | `font_family` | inherited ('sans-serif') | Font family. |
325
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
326
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
253
327
  | `text_color` | inherited ('black') | Text color. |
254
- | `line_width` | inherited (1.0) | Default line width (pt). |
328
+ | `line_width` | inherited (1.25) | Default line width. Length. |
255
329
  | `palette` | inherited (10 colors) | Colors of series without one. |
256
330
  | `alpha` | inherited (1.0) | Default opacity of series. |
257
331
  | `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
@@ -272,20 +346,20 @@ axes clip.
272
346
  | Setting | Default | Meaning |
273
347
  |---|---|---|
274
348
  | `text` | — | Title text: a string or rich content. |
275
- | `font_size` | 1.2 × the plot's font size | Font size (pt); default 1.2 × the base font size. |
349
+ | `font_size` | '1.2em' | Font size; default 1.2 × the base font size. Length; `%`: of the parent's font size. |
276
350
  | `font_weight` | 'normal' | `normal` or `bold`. |
277
- | `color` | The plot's text color | Text color. |
351
+ | `color` | 'var(text_color)' | Text color. |
278
352
  | `align` | 'center' | Alignment over the axes. |
279
- | `pad` | 4.0 | Gap above the axes (pt). |
353
+ | `pad` | 5.0 | Gap above the axes. Length; `%`: of the axes height. |
280
354
  | `over` | 'axes' | Width the title is aligned within: the axes, or the axes and the y axis labels. |
281
- | `font_family` | inherited ('sans-serif') | Font family. |
355
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
282
356
  <!-- /settings -->
283
357
 
284
358
  ### Legend
285
359
 
286
360
  One entry per series with a `name`, drawn as the series draws itself (marker, line,
287
361
  swatch or box), or with `glyph="box"`, `"circle"` or `"line"` in the series color. At
288
- `top`, `bottom`, `outside top` and `outside bottom` entries are side by side unless
362
+ `top`, `bottom`, `outside_top` and `outside_bottom` entries are side by side unless
289
363
  `orientation` or `columns` is set.
290
364
 
291
365
  **Size keys.** A series whose `size` goes through a `size_map` adds a size key to its
@@ -301,33 +375,36 @@ id=…, values=None, title=None)` places a key in its own grid area, as colorbar
301
375
  whole length), bars, histogram bins, boxes, violins, areas and fills (the area they cover),
302
376
  heatmaps, 2-D histograms and contours (the whole axes). Data are sampled beyond 50,000
303
377
  points and curves thinned to 4,096 vertices (twin plots' series included). The legend
304
- goes to the first of `top right`, `top left`, `bottom left`, `bottom right`, `top`,
305
- `bottom`, `center right`, `center left` whose box covers no marked cell; else to the free
378
+ goes to the first of `top_right`, `top_left`, `bottom_left`, `bottom_right`, `top`,
379
+ `bottom`, `center_right`, `center_left` whose box covers no marked cell; else to the free
306
380
  place (any position inside, one grid cell apart, covering no marked cell) nearest to a
307
- corner of the axes; else `outside right`, with room made in the layout, when every
381
+ corner of the axes; else `outside_right`, with room made in the layout, when every
308
382
  candidate covers more than 2 % marked cells; else the candidate covering the fewest.
309
383
 
310
384
  <!-- settings:Legend -->
311
385
  | Setting | Default | Meaning |
312
386
  |---|---|---|
313
- | `position` | 'auto' | `auto`, `top right`, `top left`, `bottom right`, `bottom left`, `top`, `bottom`, `outside right`, `outside top`, `outside bottom` or `none`. |
387
+ | `position` | 'auto' | `auto`, `top_right`, `top_left`, `bottom_right`, `bottom_left`, `top`, `bottom`, `outside_right`, `outside_top`, `outside_bottom` or `none`. |
314
388
  | `columns` | 1 | Number of columns. |
315
389
  | `frame` | False | Draw a frame and background. |
316
- | `title` | The `group` column name, when there is one | Legend title; default the `group` column name. |
317
- | `font_size` | The plot's font size | Font size (pt). |
318
- | `color` | The plot's text color | Text color. |
390
+ | `title` | — | Legend title; default the `group` column name. |
391
+ | `font_size` | '1em' | Font size. Length; `%`: of the parent's font size. |
392
+ | `color` | 'var(text_color)' | Text color. |
319
393
  | `background` | 'white' | Background of a framed legend. |
320
394
  | `frame_color` | '#999999' | Frame color. |
321
- | `pad` | 4.0 | Gap to the axes (pt). |
322
- | `frame_width` | 0.5 | Frame line width (pt). |
323
- | `frame_radius` | 0.0 | Corner radius of the frame (pt). |
395
+ | `pad` | 5.0 | Gap to the axes. Length. |
396
+ | `frame_width` | 0.5 | Frame line width. Length. |
397
+ | `frame_radius` | 0.0 | Corner radius of the frame. Length. |
324
398
  | `frame_alpha` | 1.0 | Opacity of the frame and background. |
325
399
  | `glyph_alpha` | — | Fill opacity of `box` and `circle` symbols, outlined in the opaque color; default: the series' own fill. |
326
400
  | `glyph` | 'series' | Entry symbol: as the series draws itself, or a filled `box`, a `circle` or a `line` in the series color. |
327
- | `orientation` | 'auto' | `horizontal`: entries side by side; `auto`: horizontal at `top`, `bottom`, `outside top` and `outside bottom`. |
328
- | `glyph_width` | 2.0 | Width of an entry's symbol, in font sizes. |
329
- | `row_height` | 1.35 | Height of an entry, in font sizes. |
330
- | `font_family` | inherited ('sans-serif') | Font family. |
401
+ | `orientation` | 'auto' | `horizontal`: entries side by side; `auto`: horizontal at `top`, `bottom`, `outside_top` and `outside_bottom`. |
402
+ | `glyph_length` | '2em' | Width of an entry's symbol. Length; `%`: of the font size. |
403
+ | `row_height` | '1.35em' | Height of an entry. Length; `%`: of the font size. |
404
+ | `glyph_gap` | '0.5em' | Gap between a symbol and its text. Length; `%`: of the font size. |
405
+ | `column_gap` | '1em' | Gap between columns. Length; `%`: of the font size. |
406
+ | `inner_pad` | 'auto' | Space inside the box; `"auto"`: 0.5em with a frame, 0.15em without. Length; `%`: of the font size. |
407
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
331
408
  <!-- /settings -->
332
409
 
333
410
  ### Decorations
@@ -338,7 +415,7 @@ are drawn among the series by `z`: spans under the series (`z=-1`), lines and te
338
415
  them (`z=1`).
339
416
 
340
417
  ```python
341
- p.hline(y, min=0, max=1, color="#4d4d4d", line_style="solid", ...) # min/max: fractions of the axes width
418
+ p.hline(y, min="0%", max="100%", color="#4d4d4d", line_style="solid", ...) # min/max: data values or % of the axes
342
419
  p.vline(x, ...)
343
420
  p.axline((x0, y0), slope=None, point2=None, ...) # slope: linear axes only
344
421
  p.hspan(y0, y1, color="#e5e5e5", ...); p.vspan(x0, x1, ...)
@@ -357,10 +434,10 @@ HLine:
357
434
  | Setting | Default | Meaning |
358
435
  |---|---|---|
359
436
  | `color` | '#4d4d4d' | Line color. |
360
- | `line_width` | inherited (1.0) | Line width (pt). |
361
- | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. |
362
- | `min` | 0.0 | Start, as a fraction of the axes width. |
363
- | `max` | 1.0 | End, as a fraction of the axes width. |
437
+ | `line_width` | inherited (1.25) | Line width. Length. |
438
+ | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
439
+ | `min` | '0%' | Start: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
440
+ | `max` | '100%' | End: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
364
441
  | `name` | — | Legend entry; unset: not in the legend. |
365
442
  | `alpha` | 1.0 | Opacity. |
366
443
  | `z` | 1.0 | Drawing order among the series (default 0). |
@@ -374,8 +451,8 @@ AxLine:
374
451
  | Setting | Default | Meaning |
375
452
  |---|---|---|
376
453
  | `color` | '#4d4d4d' | Line color. |
377
- | `line_width` | inherited (1.0) | Line width (pt). |
378
- | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. |
454
+ | `line_width` | inherited (1.25) | Line width. Length. |
455
+ | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
379
456
  | `name` | — | Legend entry; unset: not in the legend. |
380
457
  | `alpha` | 1.0 | Opacity. |
381
458
  | `z` | 1.0 | Drawing order among the series (default 0). |
@@ -389,10 +466,10 @@ HSpan:
389
466
  | Setting | Default | Meaning |
390
467
  |---|---|---|
391
468
  | `color` | '#e5e5e5' | Fill color. |
392
- | `line_color` | — | Outline color; default none. |
393
- | `line_width` | 0.0 | Outline width (pt). |
394
- | `min` | 0.0 | Start, as a fraction of the axes width. |
395
- | `max` | 1.0 | End, as a fraction of the axes width. |
469
+ | `edge_color` | — | Outline color; default none. |
470
+ | `edge_width` | 0.0 | Outline width. Length. |
471
+ | `min` | '0%' | Start: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
472
+ | `max` | '100%' | End: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
396
473
  | `name` | — | Legend entry; unset: not in the legend. |
397
474
  | `alpha` | 1.0 | Opacity. |
398
475
  | `z` | -1.0 | Drawing order among the series (default 0). |
@@ -407,11 +484,11 @@ Text:
407
484
  |---|---|---|
408
485
  | `align` | 'left' | Horizontal alignment on the point. |
409
486
  | `valign` | 'baseline' | Vertical alignment on the point. |
410
- | `rotation` | 0.0 | Rotation (degrees, counterclockwise). |
487
+ | `rotation` | 0.0 | Rotation (degrees, counterclockwise). Angle (bare: degrees). |
411
488
  | `coords` | 'data' | `data`, `axes` (0–1) or `figure` (0–1). |
412
- | `color` | The text color | Text color; default `text_color`. |
413
- | `font_size` | inherited (8.0) | Font size (pt). |
414
- | `font_family` | inherited ('sans-serif') | Font family. |
489
+ | `color` | 'var(text_color)' | Text color; default `text_color`. |
490
+ | `font_size` | inherited (11.0) | Font size. Length; `%`: of the parent's font size. |
491
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
415
492
  | `font_weight` | 'normal' | `normal` or `bold`. |
416
493
  | `text_color` | inherited ('black') | Text color. |
417
494
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -426,11 +503,11 @@ Annotate:
426
503
  <!-- settings:Annotate -->
427
504
  | Setting | Default | Meaning |
428
505
  |---|---|---|
429
- | `rotation` | 0.0 | Rotation (degrees, counterclockwise). |
506
+ | `rotation` | 0.0 | Rotation (degrees, counterclockwise). Angle (bare: degrees). |
430
507
  | `coords` | 'data' | `data`, `axes` (0–1) or `figure` (0–1). |
431
- | `color` | The text color | Text color; default `text_color`. |
432
- | `font_size` | inherited (8.0) | Font size (pt). |
433
- | `font_family` | inherited ('sans-serif') | Font family. |
508
+ | `color` | 'var(text_color)' | Text color; default `text_color`. |
509
+ | `font_size` | inherited (11.0) | Font size. Length; `%`: of the parent's font size. |
510
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
434
511
  | `font_weight` | 'normal' | `normal` or `bold`. |
435
512
  | `text_color` | inherited ('black') | Text color. |
436
513
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -440,13 +517,13 @@ Annotate:
440
517
  | `clip` | False | Clip to the axes area. |
441
518
  | `align` | 'center' | Horizontal alignment on `xytext`. |
442
519
  | `valign` | 'center' | Vertical alignment on `xytext`. |
443
- | `text_coords` | As `coords` | Coordinates of `xytext`: as `coords`, or `offset` (pt from `xy`, y up); default `coords`. |
520
+ | `text_coords` | 'var(coords)' | Coordinates of `xytext`: as `coords`, or `offset` (px from `xy`, y up); default `coords`. |
444
521
  | `arrow` | True | Draw an arrow from the text to `xy`. |
445
522
  | `arrow_style` | '->' | `->` (open head), `-\|>` (filled head) or `-` (no head). |
446
- | `arrow_color` | The text's `color` | Arrow color; default the text color. |
447
- | `arrow_width` | 0.8 | Arrow line width (pt). |
448
- | `head_size` | 5.0 | Arrowhead length (pt). |
449
- | `shrink` | 2.0 | Gap left at both ends of the arrow (pt). |
523
+ | `arrow_color` | 'var(color)' | Arrow color; default the text color. |
524
+ | `arrow_width` | 0.75 | Arrow line width. Length. |
525
+ | `head_length` | 7.0 | Arrowhead length. Length. |
526
+ | `shrink` | 3.0 | Gap left at both ends of the arrow. Length. |
450
527
  <!-- /settings -->
451
528
 
452
529
  ## 4. Axes
@@ -551,60 +628,60 @@ or the plot's `spines` is set.
551
628
  | Setting | Default | Meaning |
552
629
  |---|---|---|
553
630
  | `label` | — | Axis title: a string or rich content. |
554
- | `label_size` | The axis font size | Font size of the label (pt); default: the base font size. |
631
+ | `label_font_size` | '1em' | Font size of the label; default: the base font size. Length; `%`: of the font size. |
555
632
  | `scale` | — | `linear`, `log`, `log2`, `log10`, `sqrt`, `exp`, `symlog`, `logit`, `time` or `category`; default: `category` for categorical series, `time` for dates, else `linear`. |
556
633
  | `linthresh` | 1.0 | Half-width of the linear region of a `symlog` axis. |
557
634
  | `tz` | — | Time zone of a time axis (a `tzinfo`); default: the zone of the first aware date, else naive (UTC). |
558
635
  | `limits` | 'auto' | `"auto"`, `"lo/hi"` (`min`, `max`, numbers, `q:F`) or `(lo, hi)`. |
559
- | `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. |
560
- | `auto_padding` | 0.05 | The fraction `padding="auto"` adds on each side. |
636
+ | `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. |
637
+ | `auto_padding` | '5%' | The fraction `padding="auto"` adds on each side. Length. |
561
638
  | `invert` | False | Reverse the axis. |
562
639
  | `ticks` | — | `False` (no ticks) or a list of tick values. |
563
640
  | `tick_labels` | — | Labels of `ticks`. |
564
641
  | `minor_ticks` | — | `True`, `False` or a list of values; default: on for log10. |
565
642
  | `tick_format` | 'auto' | Number format: `auto`, `percent`, `sci`, `eng`, `si`, `int`, a format string or a function. |
566
- | `tick_rotation` | 'auto' | Label rotation in degrees, or `"auto"` (45° when category labels overlap). |
643
+ | `tick_rotation` | 'auto' | Label rotation in degrees, or `"auto"` (45° when category labels overlap). Angle (bare: degrees). |
567
644
  | `max_ticks` | 'auto' | Most major ticks; `"auto"`: one per `tick_spacing` of axis length, at least 2, at most `auto_max_ticks`. |
568
- | `tick_spacing` | (3.5, 2.5) | Space per automatic tick, in tick label font sizes, on horizontal and vertical axes. |
569
- | `time_tick_spacing` | (5.0, 2.5) | `tick_spacing` of time axes. |
645
+ | `tick_spacing` | ('calc(3.5 * var(tick_font_size))', 'calc(2.5 * var(tick_font_size))') | Space per automatic tick, in tick label font sizes, on horizontal and vertical axes. Length; `%`: of the font size. |
646
+ | `time_tick_spacing` | ('calc(5 * var(tick_font_size))', 'calc(2.5 * var(tick_font_size))') | `tick_spacing` of time axes. Length; `%`: of the font size. |
570
647
  | `auto_max_ticks` | (10, 8) | Most automatic ticks on numeric and time axes. |
571
648
  | `sci_limits` | (-4, 5) | Exponents beyond which labels become mantissas × 10ᵏ. |
572
- | `tick_length` | 3.0 | Tick length (pt). |
573
- | `minor_tick_length` | 0.6 × `tick_length` | Minor tick length (pt); default 0.6 × `tick_length`. |
649
+ | `tick_length` | 6.0 | Tick length. Length; `%`: of the axes side across the axis. |
650
+ | `minor_tick_length` | '60%' | Minor tick length; default 0.6 × `tick_length`. Length; `%`: of `tick_length`. |
574
651
  | `tick_direction` | 'out' | `out`, `in` or `both`. |
575
- | `tick_width` | 0.6 | Tick line width (pt). |
576
- | `tick_size` | The axis font size | Font size of tick labels (pt). |
577
- | `tick_pad` | 2.0 | Gap between ticks and labels (pt). |
578
- | `label_pad` | 3.0 | Gap between tick labels and the label (pt). |
579
- | `color` | The text color | Color of the axis line, ticks and labels (the default of `line_color`, `tick_color`, `tick_label_color`, `label_color`). |
580
- | `line_color` | The axis `color` | Axis line color. |
581
- | `tick_color` | The axis `color` | Tick color. |
582
- | `tick_label_color` | The axis `color` | Tick label color. |
583
- | `label_color` | The axis `color` | Axis title color. |
652
+ | `tick_width` | 0.75 | Tick line width. Length. |
653
+ | `tick_font_size` | '1em' | Font size of tick labels. Length; `%`: of the font size. |
654
+ | `tick_pad` | 3.0 | Gap between ticks and labels. Length; `%`: of the axes side across the axis. |
655
+ | `label_pad` | 4.0 | Gap between tick labels and the label. Length; `%`: of the axes side across the axis. |
656
+ | `color` | 'var(text_color)' | Color of the axis line, ticks and labels (the default of `line_color`, `tick_color`, `tick_label_color`, `label_color`). |
657
+ | `line_color` | 'var(color)' | Axis line color. |
658
+ | `tick_color` | 'var(color)' | Tick color. |
659
+ | `tick_label_color` | 'var(color)' | Tick label color. |
660
+ | `label_color` | 'var(color)' | Axis title color. |
584
661
  | `label_weight` | 'normal' | Axis title weight. |
585
662
  | `label_style` | 'normal' | Axis title style. |
586
- | `side` | `bottom` for x, `left` for y | Where the ticks, labels and axis line go: `bottom` or `top` (x axis), `left` or `right` (y axis). |
663
+ | `side` | x: 'bottom' / y: 'left' | Where the ticks, labels and axis line go: `bottom` or `top` (x axis), `left` or `right` (y axis). |
587
664
  | `tick_label_weight` | 'normal' | Tick label weight. |
588
665
  | `mirror` | False | Ticks also on the opposite side of the axes. |
589
- | `spine_offset` | 0.0 | Distance the axis line (with its ticks and labels) is moved away from the axes (pt). |
666
+ | `spine_offset` | 0.0 | Distance the axis line (with its ticks and labels) is moved away from the axes. Length; `%`: of the axes side across the axis. |
590
667
  | `spine_trim` | False | Axis line from the first to the last major tick only. |
591
668
  | `include_zero` | False | Extend automatic limits to 0 (linear and sqrt scales), before padding and `nice`: `True`, or `"auto"` where a series on the axis asks for it (Vega-Lite's rule: scatter axes, the value axis of lines, areas and boxes). |
592
669
  | `zero_line` | False | A line across the plot at 0. |
593
- | `zero_line_color` | The axis `line_color` | Zero line color; default `line_color`. |
594
- | `zero_line_width` | The axis `line_width` | Zero line width (pt); default `line_width`. |
670
+ | `zero_line_color` | 'var(line_color)' | Zero line color; default `line_color`. |
671
+ | `zero_line_width` | 'var(line_width)' | Zero line width; default `line_width`. Length. |
595
672
  | `nice` | False | Extend automatic limits to the enclosing major ticks (linear and log scales). |
596
- | `line_width` | 0.8 | Axis line width (pt). |
673
+ | `line_width` | 0.75 | Axis line width. Length. |
597
674
  | `grid` | False | Major grid lines across the plot. |
598
675
  | `grid_color` | '#dddddd' | Grid line color. |
599
- | `grid_width` | 0.5 | Grid line width (pt). |
600
- | `grid_style` | 'solid' | Grid line style or dash list. |
676
+ | `grid_width` | 0.5 | Grid line width. Length. |
677
+ | `grid_style` | 'solid' | Grid line style or dash list. Length. |
601
678
  | `minor_grid` | False | Minor grid lines: at the minor ticks, or halfway between major ticks on linear axes without minor ticks. |
602
- | `minor_grid_color` | `grid_color` | Minor grid color; default `grid_color`. |
603
- | `minor_grid_width` | 0.5 × `grid_width` | Minor grid width (pt); default half `grid_width`. |
604
- | `minor_grid_style` | `grid_style` | Minor grid style; default `grid_style`. |
679
+ | `minor_grid_color` | 'var(grid_color)' | Minor grid color; default `grid_color`. |
680
+ | `minor_grid_width` | '50%' | Minor grid width; default half `grid_width`. Length; `%`: of `grid_width`. |
681
+ | `minor_grid_style` | 'var(grid_style)' | Minor grid style; default `grid_style`. Length. |
605
682
  | `visible` | True | Draw the axis (ticks, labels). |
606
- | `font_size` | inherited (8.0) | Base font size (pt). |
607
- | `font_family` | inherited ('sans-serif') | Font family. |
683
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
684
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
608
685
  | `text_color` | inherited ('black') | Text color. |
609
686
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
610
687
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -623,7 +700,8 @@ with several value sets (histograms, densities, areas, pies) take one per set.
623
700
  * **Category slots.** Box and violin series, bar series, and strip and swarm series form
624
701
  three dodge groups: the series of a group that have a category split its slot (`width`)
625
702
  side by side, in call order; `dodge=False` overlays a series; `gap` leaves part of each
626
- share empty. Stacked bars count as one, and so do split violins.
703
+ share empty (`"10%"`). `width` is in data units (`0.8` is 80 % of a category) or `%` of
704
+ the slot: one category, or the smallest gap between numeric `positions`. Stacked bars count as one, and so do split violins.
627
705
  * **Stacking.** `stack=True` (bars, histograms, densities) puts a series on the previous
628
706
  stacked series of its kind in the plot, per category or bin; positive and negative
629
707
  values stack apart; `stack="normalize"` divides each position by its total.
@@ -642,7 +720,7 @@ p = pl.Plot(data=df); p.scatter("a", "b") # data inherited by the plot's s
642
720
  `data` is any object returning a column for `data[name]`: a dict of sequences, a pandas
643
721
  or polars data frame, a numpy structured array. Columns are read through `__getitem__`
644
722
  (and `to_numpy()` when present); no table library is imported. With `data`, a string in
645
- a positional data argument or in `color`, `line_color`, `size`, `alpha`, `group`,
723
+ a positional data argument or in `color`, `edge_color`, `size`, `alpha`, `group`,
646
724
  `order`, `x_error`, `y_error`, `weights`, `positions`, `x`, `y` or `labels` names a
647
725
  column. Positional arguments, `group`, `weights` and `positions` must be columns; in
648
726
  `color`, a color name that is no column stays a color (a column wins, with a warning if
@@ -679,28 +757,29 @@ member, and `order` sorts within each member.
679
757
  pl.Scatter(x, y, plot=None, **settings)
680
758
  ```
681
759
 
682
- `color`, `line_color`, `size`, `marker` take one value or one per point. Numbers per
683
- point in `color` and `line_color` are mapped through `color_map` (alias `cmap`; default:
760
+ `color`, `edge_color`, `size`, `marker` take one value or one per point. Numbers per
761
+ point in `color` and `edge_color` are mapped through `color_map` (alias `cmap`; default:
684
762
  the style's map); numbers in `size` are diameters, or values mapped through `size_map`
685
763
  (alias `smap`) when it is set. See [values](#values-in-color-and-size).
686
764
 
687
- * `size` is a diameter in points. With `size_basis="area"` (default) every shape has the
688
- area of the circle of that diameter: a square of size 4 is drawn 3.54 pt wide.
765
+ * `size` is a diameter (a length; per-point numbers are px). With `size_basis="area"` (default) every shape has the
766
+ area of the circle of that diameter: a square of size 4 is drawn 3.54 px wide.
689
767
  * Error bars: `x_error`/`y_error` take a value, a sequence, `(low, high)` sequences or
690
- `ErrorBars(values, color=None, line_width=None, cap=3)`.
768
+ `ErrorBars(values, color=None, line_width=None, cap_length=None)` (cap: the series'
769
+ `cap_length`, else 4 px).
691
770
 
692
771
  <!-- settings:Scatter -->
693
772
  | Setting | Default | Meaning |
694
773
  |---|---|---|
695
774
  | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
696
- | `size` | 4.0 | Marker size (pt): 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"`. |
775
+ | `size` | 5.0 | 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. |
697
776
  | `color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
698
- | `line_color` | — | Outline: as the fill color. |
699
- | `line_width` | 0.5 | Outline width (pt). |
777
+ | `edge_color` | — | Outline: as the fill color. |
778
+ | `edge_width` | 0.5 | Outline width. Length. |
700
779
  | `filled` | True | `True`: filled with the color; `False`: hollow, outlined in the color; a number: filled at that opacity and outlined in the color. |
701
780
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
702
781
  | `color_map` | inherited ('viridis') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
703
- | `size_map` | — | How numbers in `size` become sizes: a `SizeMap` (alias `smap`); without it, numbers are sizes in pt. |
782
+ | `size_map` | — | How numbers in `size` become sizes: a `SizeMap` (alias `smap`); without it, numbers are sizes in px. |
704
783
  | `size_legend` | True | With a `size_map`: a size key in the legend (`True`), none (`False`), or the values to show (a list). |
705
784
  | `order` | — | Drawing order: `"density"` (densest drawn last), `"-density"`, or sort keys per point (ascending); default: call order. |
706
785
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `alpha_range`. |
@@ -711,8 +790,8 @@ the style's map); numbers in `size` are diameters, or values mapped through `siz
711
790
  | `z` | — | Drawing order (higher on top); default: call order. |
712
791
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
713
792
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
714
- | `font_size` | inherited (8.0) | Base font size (pt). |
715
- | `font_family` | inherited ('sans-serif') | Font family. |
793
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
794
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
716
795
  | `text_color` | inherited ('black') | Text color. |
717
796
  <!-- /settings -->
718
797
 
@@ -738,17 +817,17 @@ Named line styles scale with the width. Markers (`marker`, `marker_size`,
738
817
  | Setting | Default | Meaning |
739
818
  |---|---|---|
740
819
  | `color` | — | Line color; default: the next palette color. |
741
- | `line_width` | inherited (1.0) | Line width (pt). |
742
- | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list (pt); named styles scale with the width. |
820
+ | `line_width` | inherited (1.25) | Line width. Length. |
821
+ | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list; named styles scale with the width. Length. |
743
822
  | `interpolation` | 'linear' | How points are joined: `linear`, `step-pre`, `step-post`, `step-mid`, `monotone` (a curve that never overshoots) or `spline` (centripetal Catmull–Rom). |
744
823
  | `missing` | 'break' | Missing values: `break` the line there, or `skip` them and connect their neighbours. |
745
824
  | `cap` | 'butt' | Line cap. |
746
825
  | `join` | 'round' | Line join. |
747
826
  | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
748
- | `marker_size` | 4.0 | Marker size (pt): 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"`. |
827
+ | `marker_size` | 5.0 | 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. |
749
828
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
750
- | `marker_line_color` | — | Outline: as the fill color. |
751
- | `marker_line_width` | 0.5 | Outline width (pt). |
829
+ | `marker_edge_color` | — | Outline: as the fill color. |
830
+ | `marker_edge_width` | 0.5 | Outline width. Length. |
752
831
  | `marker_filled` | True | `True`: filled with the color; `False`: hollow, outlined in the color; a number: filled at that opacity and outlined in the color. |
753
832
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
754
833
  | `x_error` | — | Horizontal error bars at the points. |
@@ -759,8 +838,8 @@ Named line styles scale with the width. Markers (`marker`, `marker_size`,
759
838
  | `z` | — | Drawing order (higher on top); default: call order. |
760
839
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
761
840
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
762
- | `font_size` | inherited (8.0) | Base font size (pt). |
763
- | `font_family` | inherited ('sans-serif') | Font family. |
841
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
842
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
764
843
  | `text_color` | inherited ('black') | Text color. |
765
844
  <!-- /settings -->
766
845
 
@@ -778,9 +857,9 @@ x, y1 or y2 is), so a band with the settings of its line matches it. With
778
857
  | Setting | Default | Meaning |
779
858
  |---|---|---|
780
859
  | `color` | — | Fill color; default: the next palette color. |
781
- | `alpha` | 0.3 × the plot's alpha | Opacity; default 0.3. |
782
- | `line_color` | — | Outline color; default none. |
783
- | `line_width` | inherited (1.0) | Outline width (pt). |
860
+ | `alpha` | 'calc(0.3 * var(alpha))' | Opacity; default 0.3. |
861
+ | `edge_color` | — | Outline color; default none. |
862
+ | `edge_width` | 'var(line_width)' | Outline width; default the line width. Length. |
784
863
  | `interpolation` | 'linear' | How points are joined: `linear`, `step-pre`, `step-post`, `step-mid`, `monotone` (a curve that never overshoots) or `spline` (centripetal Catmull–Rom). |
785
864
  | `missing` | 'break' | Missing values: `break` the line there, or `skip` them and connect their neighbours. |
786
865
  | `orientation` | 'vertical' | `vertical`: between y curves; `horizontal`: between x curves. |
@@ -788,8 +867,8 @@ x, y1 or y2 is), so a band with the settings of its line matches it. With
788
867
  | `z` | — | Drawing order (higher on top); default: call order. |
789
868
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
790
869
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
791
- | `font_size` | inherited (8.0) | Base font size (pt). |
792
- | `font_family` | inherited ('sans-serif') | Font family. |
870
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
871
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
793
872
  | `text_color` | inherited ('black') | Text color. |
794
873
  <!-- /settings -->
795
874
 
@@ -812,29 +891,30 @@ category.
812
891
  |---|---|---|
813
892
  | `color` | — | Box fill: a color, one per box (list or dict by category), or numbers per box (list or dict) mapped through `color_map`; default: the next palette color. |
814
893
  | `color_map` | inherited ('viridis') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
815
- | `line_color` | 'black' | 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). |
816
- | `whisker_color` | — | Whisker and cap color; default `line_color`. |
817
- | `whisker_style` | 'solid' | Whisker line style: `solid`, `dashed`, `dotted`, `dashdot` or a dash list (caps stay solid). |
818
- | `line_width` | 0.8 | Outline and whisker width (pt). |
819
- | `median_color` | — | Median line color; default `line_color`. |
820
- | `median_width` | 1.5 | Median line width (pt). |
821
- | `width` | 0.8 | Width of a category's slot (category units). |
822
- | `cap_width` | 0.5 | Whisker cap width, as a fraction of the box. |
894
+ | `edge_color` | 'black' | 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). |
895
+ | `whisker_color` | — | Whisker and cap color; default `edge_color`. |
896
+ | `whisker_style` | 'solid' | Whisker line style: `solid`, `dashed`, `dotted`, `dashdot` or a dash list (caps stay solid). Length. |
897
+ | `edge_width` | 0.75 | Outline width. Length. |
898
+ | `whisker_width` | 'var(edge_width)' | Whisker and cap width; default `edge_width`. Length. |
899
+ | `median_color` | — | Median line color; default `edge_color`. |
900
+ | `median_width` | 1.5 | Median line width. Length. |
901
+ | `width` | 0.8 | Width of a category's slot (category units). Length; bare numbers: data units. |
902
+ | `cap_length` | '50%' | Whisker cap width (`%` of the box width). Length. |
823
903
  | `whiskers` | 1.5 | Whisker reach: a multiple of the IQR, `"range"`, or percentiles `(lo, hi)`. |
824
904
  | `outliers` | True | Draw points beyond the whiskers. |
825
905
  | `saturation` | 1.0 | Saturation of the box fills (1: the colors as given; seaborn uses 0.75). |
826
906
  | `mean` | False | Draw the mean as a marker. |
827
907
  | `mean_marker` | 'diamond' | Marker of the mean. |
828
- | `mean_color` | 'white' | Fill of the mean marker (outline: `line_color`). |
908
+ | `mean_color` | 'white' | Fill of the mean marker (outline: `edge_color`). |
829
909
  | `orientation` | 'vertical' | `vertical` (categories on x) or `horizontal`. |
830
910
  | `dodge` | True | Box and violin series sharing a category share its slot side by side; `False` overlays them. |
831
- | `gap` | 0.1 | Fraction of each box's part of a shared slot left empty. |
911
+ | `gap` | '10%' | Fraction of each box's part of a shared slot left empty. Length. |
832
912
  | `categories` | — | Category names of a list of arrays. |
833
913
  | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
834
- | `marker_size` | 3.0 | Marker size (pt): 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"`. |
914
+ | `marker_size` | 4.0 | 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. |
835
915
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
836
- | `marker_line_color` | — | Outline: as the fill color. |
837
- | `marker_line_width` | 0.6 | Outline width (pt). |
916
+ | `marker_edge_color` | — | Outline: as the fill color. |
917
+ | `marker_edge_width` | 0.5 | Outline width. Length. |
838
918
  | `marker_filled` | True | `True`: filled with the color; `False`: hollow, outlined in the color; a number: filled at that opacity and outlined in the color. |
839
919
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
840
920
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -842,8 +922,8 @@ category.
842
922
  | `z` | — | Drawing order (higher on top); default: call order. |
843
923
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
844
924
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
845
- | `font_size` | inherited (8.0) | Base font size (pt). |
846
- | `font_family` | inherited ('sans-serif') | Font family. |
925
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
926
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
847
927
  | `text_color` | inherited ('black') | Text color. |
848
928
  <!-- /settings -->
849
929
 
@@ -873,15 +953,15 @@ all cells), in black or white, whichever contrasts more (at most 2,500 cells unl
873
953
  | `origin` | 'top' | `top`: row 0 at the top (y axis inverted); `bottom`: at the bottom. |
874
954
  | `labels` | False | Write each cell's value (`"all"` above 2,500 cells). |
875
955
  | `label_format` | 'auto' | Number format of cell labels (`auto`: 3 significant digits, the same decimals for all cells). |
876
- | `label_size` | 0.9 × the font size | Font size of cell labels (pt). |
956
+ | `label_font_size` | '0.9em' | Font size of cell labels. Length; `%`: of the font size. |
877
957
  | `colorbar` | False | Attach a colorbar to the plot. |
878
958
  | `name` | — | Legend entry; unset: not in the legend. |
879
959
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
880
960
  | `z` | — | Drawing order (higher on top); default: call order. |
881
961
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
882
962
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
883
- | `font_size` | inherited (8.0) | Base font size (pt). |
884
- | `font_family` | inherited ('sans-serif') | Font family. |
963
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
964
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
885
965
  | `text_color` | inherited ('black') | Text color. |
886
966
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
887
967
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -904,17 +984,18 @@ pl.Bar(x, height=None, plot=None, **settings)
904
984
  |---|---|---|
905
985
  | `color` | — | Bar fill: a color, one per bar (list or dict by category), or numbers per bar (list or dict) mapped through `color_map`; default: the next palette color. |
906
986
  | `color_map` | inherited ('viridis') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
907
- | `line_color` | — | Outline color; default none. |
908
- | `line_width` | 0.0 | Outline width (pt). |
909
- | `width` | 0.8 | Bar width: a category's slot (category units) or data units (a `timedelta` on time axes). |
987
+ | `edge_color` | — | Outline color; default none. |
988
+ | `edge_width` | 0.0 | Outline width. Length. |
989
+ | `width` | 0.8 | Bar width: a category's slot (category units) or data units (a `timedelta` on time axes). Length; bare numbers: data units. |
910
990
  | `bottom` | 0.0 | Base of the bars: a value or one per bar. |
911
991
  | `orientation` | 'vertical' | `vertical` (bars rise from the x axis) or `horizontal`. |
912
992
  | `stack` | False | `True`: on top of the previous stacked bars of the plot; `"normalize"`: stacks scaled to 1. |
913
993
  | `dodge` | True | Bar series sharing a category share its slot side by side; `False` overlays them. |
914
- | `gap` | 0.0 | Fraction of each bar's part of a shared slot left empty. |
994
+ | `gap` | 0.0 | Fraction of each bar's part of a shared slot left empty. Length. |
915
995
  | `saturation` | 1.0 | Saturation of the fills (seaborn: 0.75). |
916
996
  | `error` | — | Error bars at the bar ends: a value, a sequence, `(low, high)` or `ErrorBars`. |
917
997
  | `error_color` | '#333333' | Error bar color. |
998
+ | `error_width` | 0.75 | Error bar line width. Length. |
918
999
  | `labels` | False | Value labels: `True`/`"outside"`, `"inside"`, `"center"`. |
919
1000
  | `label_format` | 'auto' | Number format of the labels. |
920
1001
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -922,8 +1003,8 @@ pl.Bar(x, height=None, plot=None, **settings)
922
1003
  | `z` | — | Drawing order (higher on top); default: call order. |
923
1004
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
924
1005
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
925
- | `font_size` | inherited (8.0) | Base font size (pt). |
926
- | `font_family` | inherited ('sans-serif') | Font family. |
1006
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1007
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
927
1008
  | `text_color` | inherited ('black') | Text color. |
928
1009
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
929
1010
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -955,9 +1036,11 @@ pl.Hist(values, plot=None, **settings)
955
1036
  | `stack` | False | Stack the sets (and other stacked histograms with the same bins). |
956
1037
  | `dodge` | False | Put the sets side by side within each bin. |
957
1038
  | `color` | — | Fill color, or one per set; default palette colors. |
958
- | `line_color` | — | Outline color (bars: default none; steps: the fill color). |
959
- | `line_width` | No outline on bars, 1 pt for step outlines | Outline width (pt); default 0 for bars, 1 for steps. |
960
- | `alpha` | 0.5 when several value sets overlap (neither stacked nor dodged), else the plot's | Opacity; default 1, 0.5 for overlaid sets. |
1039
+ | `edge_color` | — | Bar outline color; default none. |
1040
+ | `edge_width` | 0.0 | Bar outline width. Length. |
1041
+ | `line_color` | — | Step line color; default the fill color. |
1042
+ | `line_width` | inherited (1.25) | Step line width. Length. |
1043
+ | `alpha` | 'auto' | Opacity; `"auto"`: 0.5 for overlaid sets, else the plot's. |
961
1044
  | `saturation` | 1.0 | Saturation of the fills. |
962
1045
  | `labels` | False | Value labels on bars. |
963
1046
  | `label_format` | 'auto' | Number format of the labels. |
@@ -965,8 +1048,8 @@ pl.Hist(values, plot=None, **settings)
965
1048
  | `z` | — | Drawing order (higher on top); default: call order. |
966
1049
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
967
1050
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
968
- | `font_size` | inherited (8.0) | Base font size (pt). |
969
- | `font_family` | inherited ('sans-serif') | Font family. |
1051
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1052
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
970
1053
  | `text_color` | inherited ('black') | Text color. |
971
1054
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
972
1055
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -998,15 +1081,15 @@ A Gaussian kernel density of each set on a common grid of `grid` points, extendi
998
1081
  | `orientation` | 'vertical' | `vertical` (values along x) or `horizontal`. |
999
1082
  | `stack` | False | Stack the sets (seaborn's `multiple="stack"`). |
1000
1083
  | `color` | — | Color, or one per set; default palette colors. |
1001
- | `alpha` | Fill opacity: 1 when stacked, 0.25 otherwise | Fill opacity; default 0.25 (1 when stacked). |
1002
- | `line_width` | inherited (1.0) | Line width (pt). |
1003
- | `line_style` | 'solid' | Line style. |
1084
+ | `alpha` | 'auto' | Fill opacity; `"auto"`: 0.25, 1 when stacked. |
1085
+ | `line_width` | inherited (1.25) | Line width. Length. |
1086
+ | `line_style` | 'solid' | Line style. Length. |
1004
1087
  | `name` | — | Legend entry; unset: not in the legend. |
1005
1088
  | `z` | — | Drawing order (higher on top); default: call order. |
1006
1089
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1007
1090
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1008
- | `font_size` | inherited (8.0) | Base font size (pt). |
1009
- | `font_family` | inherited ('sans-serif') | Font family. |
1091
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1092
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1010
1093
  | `text_color` | inherited ('black') | Text color. |
1011
1094
  <!-- /settings -->
1012
1095
 
@@ -1033,19 +1116,19 @@ labels, colorbar).
1033
1116
  | `lines` | True | Draw the iso-lines. |
1034
1117
  | `color_map` | inherited ('viridis') | Color map of the levels. |
1035
1118
  | `colors` | — | Line color, or one per level, instead of the map. |
1036
- | `line_width` | 0.8 | Line width (pt). |
1037
- | `line_style` | 'solid' | Line style. |
1119
+ | `line_width` | 'calc(0.6 * var(line_width))' | Line width; default 0.6 × the plot's. Length. |
1120
+ | `line_style` | 'solid' | Line style. Length. |
1038
1121
  | `negative_style` | — | Line style of negative levels drawn with a single color (matplotlib: dashed). |
1039
1122
  | `alpha` | 1.0 | Opacity. |
1040
1123
  | `labels` | False | Write the level values on the lines. |
1041
1124
  | `label_format` | 'auto' | Number format of the labels. |
1042
- | `label_size` | 0.8 × the font size | Label font size (pt). |
1125
+ | `label_font_size` | '0.8em' | Label font size. Length; `%`: of the font size. |
1043
1126
  | `name` | — | Legend entry; unset: not in the legend. |
1044
1127
  | `z` | — | Drawing order (higher on top); default: call order. |
1045
1128
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1046
1129
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1047
- | `font_size` | inherited (8.0) | Base font size (pt). |
1048
- | `font_family` | inherited ('sans-serif') | Font family. |
1130
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1131
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1049
1132
  | `text_color` | inherited ('black') | Text color. |
1050
1133
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1051
1134
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -1079,15 +1162,15 @@ A step line through the sorted values of each set: `stat` `proportion`, `count`
1079
1162
  | `complementary` | False | Plot 1 − F (survival). |
1080
1163
  | `orientation` | 'vertical' | `vertical`: values along x; `horizontal`: along y. |
1081
1164
  | `color` | — | Line color, or one per set; default palette colors. |
1082
- | `line_width` | inherited (1.0) | Line width (pt). |
1083
- | `line_style` | 'solid' | Line style. |
1165
+ | `line_width` | inherited (1.25) | Line width. Length. |
1166
+ | `line_style` | 'solid' | Line style. Length. |
1084
1167
  | `name` | — | Legend entry; unset: not in the legend. |
1085
1168
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1086
1169
  | `z` | — | Drawing order (higher on top); default: call order. |
1087
1170
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1088
1171
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1089
- | `font_size` | inherited (8.0) | Base font size (pt). |
1090
- | `font_family` | inherited ('sans-serif') | Font family. |
1172
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1173
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1091
1174
  | `text_color` | inherited ('black') | Text color. |
1092
1175
  <!-- /settings -->
1093
1176
 
@@ -1104,11 +1187,11 @@ pl.Violin(values, positions=None, plot=None, **settings)
1104
1187
  |---|---|---|
1105
1188
  | `color` | — | Fill: a color, one per violin (list or dict by category), or numbers per violin mapped through `color_map`; default the next palette color. |
1106
1189
  | `color_map` | inherited ('viridis') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
1107
- | `line_color` | '#333333' | Outline and inner color. |
1108
- | `line_width` | 0.8 | Outline width (pt). |
1190
+ | `edge_color` | '#333333' | Outline and inner color. |
1191
+ | `edge_width` | 0.75 | Outline width. Length. |
1109
1192
  | `saturation` | 1.0 | Saturation of the fills. |
1110
1193
  | `alpha` | 1.0 | Fill opacity. |
1111
- | `width` | 0.8 | Width of a category's slot. |
1194
+ | `width` | 0.8 | Width of a category's slot. Length; bare numbers: data units. |
1112
1195
  | `bandwidth` | 'scott' | `scott`, `silverman` or a number. |
1113
1196
  | `adjust` | 1.0 | Factor applied to the bandwidth. |
1114
1197
  | `cut` | 2.0 | The density extends this many bandwidths past the data. |
@@ -1118,14 +1201,14 @@ pl.Violin(values, positions=None, plot=None, **settings)
1118
1201
  | `split` | False | Two violin series share each slot as facing halves. |
1119
1202
  | `orientation` | 'vertical' | `vertical` (categories on x) or `horizontal`. |
1120
1203
  | `dodge` | True | Violin and box series sharing a category share its slot side by side; `False` overlays them. |
1121
- | `gap` | 0.1 | Fraction of each part of a shared slot left empty. |
1204
+ | `gap` | '10%' | Fraction of each part of a shared slot left empty. Length. |
1122
1205
  | `categories` | — | Category names of a list of arrays. |
1123
1206
  | `name` | — | Legend entry; unset: not in the legend. |
1124
1207
  | `z` | — | Drawing order (higher on top); default: call order. |
1125
1208
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1126
1209
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1127
- | `font_size` | inherited (8.0) | Base font size (pt). |
1128
- | `font_family` | inherited ('sans-serif') | Font family. |
1210
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1211
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1129
1212
  | `text_color` | inherited ('black') | Text color. |
1130
1213
  <!-- /settings -->
1131
1214
 
@@ -1136,27 +1219,27 @@ pl.Strip(values, positions=None, plot=None, **settings)
1136
1219
  pl.Swarm(values, positions=None, plot=None, **settings)
1137
1220
  ```
1138
1221
 
1139
- Points of each category's values: `Strip` spreads them by uniform jitter (± `jitter` × the slot width, from `seed`), `Swarm` places them side by side without overlaps (points that do not fit go to the slot edge, with a warning). Marker settings as `Scatter`. `Swarm` takes the same settings as `Strip` except `jitter` and `seed`.
1222
+ Points of each category's values: `Strip` spreads them by uniform jitter (± `jitter`, `%` of the slot width, from `seed`), `Swarm` places them side by side without overlaps (points that do not fit go to the slot edge, with a warning). Marker settings as `Scatter`. `Swarm` takes the same settings as `Strip` except `jitter` and `seed`.
1140
1223
 
1141
1224
  <!-- settings:Strip -->
1142
1225
  | Setting | Default | Meaning |
1143
1226
  |---|---|---|
1144
1227
  | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
1145
- | `size` | 4.0 | Marker size (pt): 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"`. |
1228
+ | `size` | 5.0 | 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. |
1146
1229
  | `color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1147
- | `line_color` | — | Outline: as the fill color. |
1148
- | `line_width` | 0.5 | Outline width (pt). |
1230
+ | `edge_color` | — | Outline: as the fill color. |
1231
+ | `edge_width` | 0.5 | Outline width. Length. |
1149
1232
  | `filled` | True | `True`: filled with the color; `False`: hollow, outlined in the color; a number: filled at that opacity and outlined in the color. |
1150
1233
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1151
1234
  | `color_map` | inherited ('viridis') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
1152
- | `size_map` | — | How numbers in `size` become sizes: a `SizeMap` (alias `smap`); without it, numbers are sizes in pt. |
1235
+ | `size_map` | — | How numbers in `size` become sizes: a `SizeMap` (alias `smap`); without it, numbers are sizes in px. |
1153
1236
  | `size_legend` | True | With a `size_map`: a size key in the legend (`True`), none (`False`), or the values to show (a list). |
1154
1237
  | `orientation` | 'vertical' | `vertical` (categories on x) or `horizontal`. |
1155
- | `width` | 0.8 | Width of a category's slot. |
1238
+ | `width` | 0.8 | Width of a category's slot. Length; bare numbers: data units. |
1156
1239
  | `dodge` | True | Point series sharing a category share its slot side by side; `False` overlays them. |
1157
- | `gap` | 0.0 | Fraction of each part of a shared slot left empty. |
1240
+ | `gap` | 0.0 | Fraction of each part of a shared slot left empty. Length. |
1158
1241
  | `categories` | — | Category names of a list of arrays. |
1159
- | `jitter` | 0.1 | Half-width of the jitter, as a fraction of the slot width. |
1242
+ | `jitter` | '10%' | Half-width of the jitter (`%` of the slot width). Length. |
1160
1243
  | `seed` | 0 | Seed of the jitter. |
1161
1244
  | `order` | — | Drawing order: `"density"` (densest drawn last), `"-density"`, or sort keys per point (ascending); default: call order. |
1162
1245
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `alpha_range`. |
@@ -1165,8 +1248,8 @@ Points of each category's values: `Strip` spreads them by uniform jitter (± `ji
1165
1248
  | `z` | — | Drawing order (higher on top); default: call order. |
1166
1249
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1167
1250
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1168
- | `font_size` | inherited (8.0) | Base font size (pt). |
1169
- | `font_family` | inherited ('sans-serif') | Font family. |
1251
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1252
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1170
1253
  | `text_color` | inherited ('black') | Text color. |
1171
1254
  <!-- /settings -->
1172
1255
 
@@ -1185,16 +1268,16 @@ Layers (rows of `ys`, or a dict `{name: values}`, one legend entry each) stacked
1185
1268
  | `stack` | True | Stack the layers; `False` overlays them from 0. |
1186
1269
  | `color` | — | A color, or one per layer; default palette colors. |
1187
1270
  | `alpha` | 0.85 | Opacity of the fills. |
1188
- | `line_color` | — | Outline color of each layer's top; default none. |
1189
- | `line_width` | inherited (1.0) | Outline width (pt). |
1271
+ | `edge_color` | — | Outline color of each layer's top; default none. |
1272
+ | `edge_width` | 'var(line_width)' | Outline width; default the line width. Length. |
1190
1273
  | `interpolation` | 'linear' | How points are joined: `linear`, `step-pre`, `step-post`, `step-mid`, `monotone` (a curve that never overshoots) or `spline` (centripetal Catmull–Rom). |
1191
1274
  | `missing` | 'break' | Missing values: `break` the line there, or `skip` them and connect their neighbours. |
1192
1275
  | `name` | — | Legend entry; unset: not in the legend. |
1193
1276
  | `z` | — | Drawing order (higher on top); default: call order. |
1194
1277
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1195
1278
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1196
- | `font_size` | inherited (8.0) | Base font size (pt). |
1197
- | `font_family` | inherited ('sans-serif') | Font family. |
1279
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1280
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1198
1281
  | `text_color` | inherited ('black') | Text color. |
1199
1282
  <!-- /settings -->
1200
1283
 
@@ -1210,15 +1293,15 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
1210
1293
  | Setting | Default | Meaning |
1211
1294
  |---|---|---|
1212
1295
  | `marker` | — | Marker at the points; default none. |
1213
- | `marker_size` | 4.0 | Marker size (pt): 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"`. |
1296
+ | `marker_size` | 5.0 | 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. |
1214
1297
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1215
- | `marker_line_color` | — | Outline: as the fill color. |
1216
- | `marker_line_width` | 0.0 | Outline width (pt). |
1298
+ | `marker_edge_color` | — | Outline: as the fill color. |
1299
+ | `marker_edge_width` | 0.0 | Outline width. Length. |
1217
1300
  | `marker_filled` | True | `True`: filled with the color; `False`: hollow, outlined in the color; a number: filled at that opacity and outlined in the color. |
1218
1301
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1219
1302
  | `color` | — | Bar color; default: the next palette color. |
1220
- | `line_width` | inherited (1.0) | Bar width (pt). |
1221
- | `cap` | 3.0 | Cap width (pt); 0: no caps. |
1303
+ | `line_width` | inherited (1.25) | Bar width. Length. |
1304
+ | `cap_length` | 4.0 | Cap width (`data`: in data units across the bar); 0: no caps. Length. |
1222
1305
  | `x_error` | — | Horizontal errors. |
1223
1306
  | `y_error` | — | Vertical errors. |
1224
1307
  | `y_error_style` | 'bars' | `bars`, or `band`: a filled band between the y error ends (points sorted by x). |
@@ -1228,8 +1311,8 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
1228
1311
  | `z` | — | Drawing order (higher on top); default: call order. |
1229
1312
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1230
1313
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1231
- | `font_size` | inherited (8.0) | Base font size (pt). |
1232
- | `font_family` | inherited ('sans-serif') | Font family. |
1314
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1315
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1233
1316
  | `text_color` | inherited ('black') | Text color. |
1234
1317
  <!-- /settings -->
1235
1318
 
@@ -1245,25 +1328,25 @@ Stems from `baseline` to each value with a marker (lollipops), and a baseline li
1245
1328
  | Setting | Default | Meaning |
1246
1329
  |---|---|---|
1247
1330
  | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
1248
- | `marker_size` | 5.0 | Marker size (pt): 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"`. |
1331
+ | `marker_size` | 7.0 | 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. |
1249
1332
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1250
- | `marker_line_color` | — | Outline: as the fill color. |
1251
- | `marker_line_width` | 0.0 | Outline width (pt). |
1333
+ | `marker_edge_color` | — | Outline: as the fill color. |
1334
+ | `marker_edge_width` | 0.0 | Outline width. Length. |
1252
1335
  | `marker_filled` | True | `True`: filled with the color; `False`: hollow, outlined in the color; a number: filled at that opacity and outlined in the color. |
1253
1336
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1254
1337
  | `color` | — | Stem and marker color; default: the next palette color. |
1255
- | `line_width` | inherited (1.0) | Stem width (pt). |
1338
+ | `line_width` | inherited (1.25) | Stem width. Length. |
1256
1339
  | `baseline` | 0.0 | Value the stems start from. |
1257
1340
  | `baseline_color` | '#4d4d4d' | Baseline color; `none`: no baseline. |
1258
- | `baseline_width` | 0.8 | Baseline width (pt). |
1341
+ | `baseline_width` | 0.75 | Baseline width. Length. |
1259
1342
  | `orientation` | 'vertical' | `vertical` stems (values on y) or `horizontal`. |
1260
1343
  | `name` | — | Legend entry; unset: not in the legend. |
1261
1344
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1262
1345
  | `z` | — | Drawing order (higher on top); default: call order. |
1263
1346
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1264
1347
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1265
- | `font_size` | inherited (8.0) | Base font size (pt). |
1266
- | `font_family` | inherited ('sans-serif') | Font family. |
1348
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1349
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1267
1350
  | `text_color` | inherited ('black') | Text color. |
1268
1351
  <!-- /settings -->
1269
1352
 
@@ -1287,14 +1370,14 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
1287
1370
  | `truncate` | True | Draw the fit over the data range only (`False`: over the axis range). |
1288
1371
  | `points` | 100 | Points of the fitted curve. |
1289
1372
  | `color` | — | Line, band and point color; default the next palette color. |
1290
- | `line_width` | 1.5 | Line width (pt). |
1291
- | `line_style` | 'solid' | Line style. |
1373
+ | `line_width` | 'calc(1.4 * var(line_width))' | Line width; default 1.4 × the plot's. Length. |
1374
+ | `line_style` | 'solid' | Line style or dash list. Length. |
1292
1375
  | `band_alpha` | 0.2 | Opacity of the band. |
1293
1376
  | `marker` | 'circle' | Marker name, `Path` or path data, or one per point. |
1294
- | `marker_size` | 4.0 | Marker size (pt): 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"`. |
1377
+ | `marker_size` | 5.0 | 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. |
1295
1378
  | `marker_color` | — | Fill: a color, colors per point, numbers per point (mapped through `color_map`) or `"density"`. |
1296
- | `marker_line_color` | — | Outline: as the fill color. |
1297
- | `marker_line_width` | 0.0 | Outline width (pt). |
1379
+ | `marker_edge_color` | — | Outline: as the fill color. |
1380
+ | `marker_edge_width` | 0.0 | Outline width. Length. |
1298
1381
  | `marker_filled` | True | `True`: filled with the color; `False`: hollow, outlined in the color; a number: filled at that opacity and outlined in the color. |
1299
1382
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1300
1383
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -1302,8 +1385,8 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
1302
1385
  | `z` | — | Drawing order (higher on top); default: call order. |
1303
1386
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1304
1387
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1305
- | `font_size` | inherited (8.0) | Base font size (pt). |
1306
- | `font_family` | inherited ('sans-serif') | Font family. |
1388
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1389
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1307
1390
  | `text_color` | inherited ('black') | Text color. |
1308
1391
  <!-- /settings -->
1309
1392
 
@@ -1325,15 +1408,15 @@ Counts in rectangular bins (even on the axis scales), drawn as a heatmap with th
1325
1408
  | `nan_color` | — | Color of missing cells; default: the map's `bad` (transparent). |
1326
1409
  | `labels` | False | Write each cell's value (`"all"` above 2,500 cells). |
1327
1410
  | `label_format` | 'auto' | Number format of cell labels (`auto`: 3 significant digits, the same decimals for all cells). |
1328
- | `label_size` | 0.9 × the font size | Font size of cell labels (pt). |
1411
+ | `label_font_size` | '0.9em' | Font size of cell labels. Length; `%`: of the font size. |
1329
1412
  | `colorbar` | False | Attach a colorbar to the plot. |
1330
1413
  | `name` | — | Legend entry; unset: not in the legend. |
1331
1414
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1332
1415
  | `z` | — | Drawing order (higher on top); default: call order. |
1333
1416
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1334
1417
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1335
- | `font_size` | inherited (8.0) | Base font size (pt). |
1336
- | `font_family` | inherited ('sans-serif') | Font family. |
1418
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1419
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1337
1420
  | `text_color` | inherited ('black') | Text color. |
1338
1421
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1339
1422
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -1370,16 +1453,16 @@ aspect (and the counts depend on it). Points outside the axes are not counted. C
1370
1453
  | `color_map` | inherited ('viridis') | A `ColorMap`, a map name or colors. |
1371
1454
  | `color_limits` | — | Override of the map's limits. |
1372
1455
  | `color_scale` | — | Override of the map's scale. |
1373
- | `line_color` | — | Hexagon outline color; default none. |
1374
- | `line_width` | 0.0 | Outline width (pt). |
1456
+ | `edge_color` | — | Hexagon outline color; default none. |
1457
+ | `edge_width` | 0.0 | Outline width. Length. |
1375
1458
  | `colorbar` | False | Attach a colorbar to the plot. |
1376
1459
  | `name` | — | Legend entry; unset: not in the legend. |
1377
1460
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1378
1461
  | `z` | — | Drawing order (higher on top); default: call order. |
1379
1462
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1380
1463
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1381
- | `font_size` | inherited (8.0) | Base font size (pt). |
1382
- | `font_family` | inherited ('sans-serif') | Font family. |
1464
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1465
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1383
1466
  | `text_color` | inherited ('black') | Text color. |
1384
1467
  <!-- /settings -->
1385
1468
 
@@ -1399,20 +1482,20 @@ Iso-lines (`lines`) and filled bands (`filled`) of a grid at nodes `x`/`y`. `lev
1399
1482
  | `lines` | True | Draw the iso-lines. |
1400
1483
  | `color_map` | inherited ('viridis') | Color map of the levels. |
1401
1484
  | `colors` | — | Line color, or one per level, instead of the map. |
1402
- | `line_width` | 0.8 | Line width (pt). |
1403
- | `line_style` | 'solid' | Line style. |
1485
+ | `line_width` | 'calc(0.6 * var(line_width))' | Line width; default 0.6 × the plot's. Length. |
1486
+ | `line_style` | 'solid' | Line style. Length. |
1404
1487
  | `negative_style` | — | Line style of negative levels drawn with a single color (matplotlib: dashed). |
1405
1488
  | `alpha` | 1.0 | Opacity. |
1406
1489
  | `labels` | False | Write the level values on the lines. |
1407
1490
  | `label_format` | 'auto' | Number format of the labels. |
1408
- | `label_size` | 0.8 × the font size | Label font size (pt). |
1491
+ | `label_font_size` | '0.8em' | Label font size. Length; `%`: of the font size. |
1409
1492
  | `colorbar` | False | Attach a colorbar to the plot. |
1410
1493
  | `name` | — | Legend entry; unset: not in the legend. |
1411
1494
  | `z` | — | Drawing order (higher on top); default: call order. |
1412
1495
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1413
1496
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1414
- | `font_size` | inherited (8.0) | Base font size (pt). |
1415
- | `font_family` | inherited ('sans-serif') | Font family. |
1497
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1498
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1416
1499
  | `text_color` | inherited ('black') | Text color. |
1417
1500
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1418
1501
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -1428,30 +1511,30 @@ Iso-lines (`lines`) and filled bands (`filled`) of a grid at nodes `x`/`y`. `lev
1428
1511
  pl.Pie(values, plot=None, **settings)
1429
1512
  ```
1430
1513
 
1431
- Wedges of `values` (a sequence or a dict `{label: value}`) from `start`, on a plot drawn without axes (`Plot.axes=False`, aspect 1). `hole` makes a donut, `explode` moves wedges out. Names go outside (pushed apart so that they do not overlap), inside, or into the legend (`label_position="none"`, the legend then outside right); `value_labels` writes percents or values inside, or outside with a leader line when a wedge is too thin.
1514
+ Wedges of `values` (a sequence or a dict `{label: value}`) from `start`, on a plot drawn without axes (`Plot.axes=False`, aspect 1). `hole` makes a donut (`"40%"` of the radius), `explode` moves wedges out (`%` of the radius, one value or one per wedge). Names go outside (pushed apart so that they do not overlap), inside, or into the legend (`label_position="none"`, the legend then outside right); `value_labels` writes percents or values inside, or outside with a leader line when a wedge is too thin.
1432
1515
 
1433
1516
  <!-- settings:Pie -->
1434
1517
  | Setting | Default | Meaning |
1435
1518
  |---|---|---|
1436
1519
  | `labels` | — | Wedge names (default: the dict's keys). |
1437
1520
  | `colors` | — | One color per wedge; default palette colors. |
1438
- | `start` | 90.0 | Angle where the first wedge starts (degrees, 0: 3 o'clock, 90: 12 o'clock). |
1521
+ | `start` | 90.0 | Angle where the first wedge starts (degrees, 0: 3 o'clock, 90: 12 o'clock). Angle (bare: degrees). |
1439
1522
  | `counterclockwise` | True | Direction of the wedges. |
1440
- | `hole` | 0.0 | Radius of the hole (fraction of the radius): a donut. |
1441
- | `explode` | — | Offset of the wedges from the centre (fraction of the radius): one value or one per wedge. |
1523
+ | `hole` | 0.0 | Radius of the hole (`%` of the radius): a donut. Length. |
1524
+ | `explode` | — | Offset of the wedges from the centre (`%` of the radius): one value or one per wedge. Length. |
1442
1525
  | `sort` | False | Sort the wedges by decreasing value. |
1443
1526
  | `label_position` | 'outside' | Where the names go: `outside`, `inside` or `none` (in the legend instead). |
1444
1527
  | `value_labels` | False | Write each wedge's `percent` or `value` inside it (outside, with a leader line, when it does not fit). |
1445
1528
  | `label_format` | 'auto' | Number format of the value labels (percentages: of 100). |
1446
- | `line_color` | 'white' | Wedge outline color; `none`: no outline. |
1447
- | `line_width` | 1.0 | Wedge outline width (pt). |
1529
+ | `edge_color` | 'white' | Wedge outline color; `none`: no outline. |
1530
+ | `edge_width` | 1.25 | Wedge outline width. Length. |
1448
1531
  | `alpha` | 1.0 | Opacity. |
1449
1532
  | `name` | — | Legend entry; unset: not in the legend. |
1450
1533
  | `z` | — | Drawing order (higher on top); default: call order. |
1451
1534
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1452
1535
  | `simplify` | inherited ('auto') | `"auto"`, `True`, a dpi or `False`: pdf_io's `simplify`. |
1453
- | `font_size` | inherited (8.0) | Base font size (pt). |
1454
- | `font_family` | inherited ('sans-serif') | Font family. |
1536
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1537
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1455
1538
  | `text_color` | inherited ('black') | Text color. |
1456
1539
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1457
1540
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -1479,17 +1562,17 @@ side, so axes stay aligned. A bar in its own area runs along the neighbouring ax
1479
1562
  | Setting | Default | Meaning |
1480
1563
  |---|---|---|
1481
1564
  | `position` | 'right' | Side of the plot an attached bar takes. |
1482
- | `orientation` | `vertical` beside the axes or in a grid area, `horizontal` above or below them | Bar direction; default: vertical, or horizontal for bars attached at the top or bottom. |
1483
- | `size` | 10 pt, in the figure's unit | Bar thickness, in the figure's unit; default 10 pt. |
1484
- | `length` | 1.0 | Bar length as a fraction of the axes side (attached bars). |
1485
- | `pad` | 8 pt, in the figure's unit | Gap between the axes and an attached bar, in the figure's unit. |
1565
+ | `orientation` | 'auto' | Bar direction; default: vertical, or horizontal for bars attached at the top or bottom. |
1566
+ | `thickness` | 13.0 | Bar thickness (`%` of the attached axes side across it). Length. |
1567
+ | `length` | '100%' | Bar length as a fraction of the axes side (attached bars). Length. |
1568
+ | `pad` | 11.0 | Gap between the axes and an attached bar. Length. |
1486
1569
  | `label` | — | Bar label: a string or rich content. |
1487
1570
  | `extend` | 'auto' | Triangular ends in the under/over colors: `auto` shows them when the limits clip the data. |
1488
1571
  | `frame` | False | Outline the bar. |
1489
1572
  | `frame_color` | '#666666' | Outline color. |
1490
- | `frame_width` | 0.5 | Outline width (pt). |
1491
- | `font_size` | inherited (8.0) | Base font size (pt). |
1492
- | `font_family` | inherited ('sans-serif') | Font family. |
1573
+ | `frame_width` | 0.5 | Outline width. Length. |
1574
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1575
+ | `font_family` | inherited ('SF Pro Text, Inter, Helvetica, Arial, sans-serif') | Font family. |
1493
1576
  | `text_color` | inherited ('black') | Text color. |
1494
1577
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1495
1578
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -1577,7 +1660,7 @@ value); `by="diameter"` moves the diameter. `under`/`over` default to the end si
1577
1660
 
1578
1661
  ### Values in color and size
1579
1662
 
1580
- | Given to `color` (also `line_color`, `marker_color`) | Meaning |
1663
+ | Given to `color` (also `edge_color`, `marker_color`) | Meaning |
1581
1664
  |---|---|
1582
1665
  | a color string, `CMYK`, `Spot`, or a **tuple** of 3 or 4 numbers | one color |
1583
1666
  | a list of colors | one color per point |
@@ -1590,7 +1673,7 @@ A tuple of numbers is always one color and a list of numbers is always values, s
1590
1673
  `color=[0.2, 0.4, 0.6]` with a point count other than 3 is an error (use a tuple for one
1591
1674
  RGB color). A `ColorMap` goes in `color_map`, not `color`.
1592
1675
 
1593
- `size` takes a diameter (pt), diameters per point, or values per point mapped through
1676
+ `size` takes a diameter (a length), diameters per point (px), or values per point mapped through
1594
1677
  `size_map` when it is set; `"density"` uses `size_map` or `SizeMap()`. A `SizeMap` goes in
1595
1678
  `size_map`.
1596
1679
 
@@ -1614,7 +1697,7 @@ on the axis positions (log axes in log space); NaN points get NaN. `normalize`:
1614
1697
  under automatic limits. `method`: `"exact"` (the sum over all points, multithreaded in
1615
1698
  C, equal to scipy's), `"grid"` (binned, blurred and read back, about 1e-4 relative) or
1616
1699
  `"auto"` (exact up to 20,000 points). A `Density` (or `"density"`) is accepted by
1617
- `color`, `line_color`, `size` (through `size_map`, default `SizeMap()`), `alpha` (mapped
1700
+ `color`, `edge_color`, `size` (through `size_map`, default `SizeMap()`), `alpha` (mapped
1618
1701
  linearly to `alpha_range`, default (0.2, 1)) and `order`; one object computes each
1619
1702
  series' own density, cached until a setting changes, and exposed as
1620
1703
  `series.stats["density"]`. The colorbar label defaults to `"density"`.
@@ -1678,18 +1761,18 @@ for pdf_io's `draw_markers`; `pl.marker_area(name)` its area.
1678
1761
  ## 8. Output
1679
1762
 
1680
1763
  ```python
1681
- fig.save(path, **options) # .pdf, .png, .jpg/.jpeg, .jxl
1764
+ fig.save(path, **options) # .pdf, .png, .jpg/.jpeg, .jxl, .avif
1682
1765
  fig.to_bytes(format="pdf", **options)
1683
- fig.draw(canvas, x=0, y=0) # on any pdf_io canvas; returns (width, height) in pt
1684
- fig.size() # (width, height) in pt
1766
+ fig.draw(canvas, x=0, y=0) # on any pdf_io canvas; returns (width, height) in px
1767
+ fig.size() # (width, height) in px
1685
1768
  p.save(path, …) p.to_bytes(…) p.draw(canvas, …) # one plot alone, at its size in the figure
1686
1769
  ```
1687
1770
 
1688
- Options: `dpi` (images, default 150), `background` (images, default the figure's or
1689
- white), `quality` (the figure's `quality` when not given; JPEG, default 90; JPEG XL,
1771
+ Options: `dpi` (images, default 192: two image pixels per px), `background` (default the figure's; unset is
1772
+ transparent, white in JPEG), `quality` (the figure's `quality` when not given; JPEG, default 90; JPEG XL and AVIF,
1690
1773
  default lossless; in a PDF, of rasterized content, default lossless), and pdf_io `Document` arguments: `title`, `author`, `compress`, `compression`,
1691
1774
  `system_fonts`, `font_dirs`, `color_mode`, `pdf_a`, … JPEG XL output (`.jxl`) needs
1692
- libjxl. Images inside a PDF (rasterized series, heatmaps) are stored losslessly or as
1775
+ libjxl, AVIF output (`.avif`) libavif 1.x. Images inside a PDF (rasterized series, heatmaps) are stored losslessly or as
1693
1776
  JPEG (`quality`), never as JPEG XL, so every PDF reader shows them. `simplify` culls hidden content in PDF output only: PNG, JPEG and
1694
1777
  JPEG XL output draw everything (rasterizing hidden content costs less than culling it,
1695
1778
  and the pixels are the same), and dense lines are still decimated. A plot
@@ -1746,7 +1829,8 @@ pl.style_settings("house") # the resolved dict (base theme included)
1746
1829
  `"Colorbar.<axis setting>"` (`"Colorbar.tick_direction"`, `"Colorbar.tick_color"`, …)
1747
1830
  applies to colorbar axes only, and `"XAxis.<setting>"`, `"YAxis.<setting>"` to the x or
1748
1831
  y axis of plots only; each wins over `"Axis.<setting>"` there.
1749
- Values are checked when the style is registered or set.
1832
+ Keys starting with `--` are custom variables (`"--accent": "#c00"`), read by
1833
+ `var(--accent)`. Values are checked when the style is registered or set.
1750
1834
  * **`"base"`.** A style name or a list of names, applied left to right (later ones win);
1751
1835
  the dict's own keys are applied over them. Registered styles use the same form.
1752
1836
  * **Resolution.** A setting is looked up on the object, then as `"Class.name"` in the
@@ -1757,8 +1841,9 @@ pl.style_settings("house") # the resolved dict (base theme included)
1757
1841
  created (`use_style` innermost, else `set_style`), else `"default"`, which adds nothing
1758
1842
  to `DEFAULTS`.
1759
1843
  * **`scaling`.** A figure setting (default 1, or `"Figure.scaling"` in the style) that
1760
- multiplies the style's lengths: font sizes, line widths, marker sizes, tick lengths and
1761
- pads, including the defaults. Values set on objects are not scaled.
1844
+ multiplies every absolute length: font sizes, line widths, marker sizes, tick lengths,
1845
+ pads and gaps, from the defaults, the style or set on objects (not the figure size).
1846
+ Lengths in `em` follow the scaled font size.
1762
1847
 
1763
1848
  Bundled styles (`pl.styles()`), each the defaults of a library expressed in these
1764
1849
  settings (colors, fonts, grid, axis lines, ticks, legend and title placement, palette,
@@ -1809,7 +1894,7 @@ documented default properties. What cannot be expressed: legend titles naming a
1809
1894
  | `maps/` | `ColorMap`, `SizeMap`, Oklab, bundled map data |
1810
1895
  | `markers.py`, `style.py`, `text.py` | marker shapes, palette references and dashes, rich one-line text |
1811
1896
  | `palettes.py` | palette registry, bundled palettes, ggplot2's hues (CIE LCh(uv)) |
1812
- | `styles/` | style registry, expansion and scaling; bundled styles |
1897
+ | `styles/` | style registry and expansion; bundled styles (point libraries in `pt`) |
1813
1898
  | `values.py`, `density.py` | values given to `color`/`size` and their rules; `Density` (point density) |
1814
1899
  | `tables.py`, `facets.py` | columns of tables, `group=` splitting (`SeriesGroup`); `facet` |
1815
1900
  | `sharing.py`, `times.py` | shared axes; dates and times on axes |