plot-io 0.1.0__tar.gz → 0.3.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 (251) hide show
  1. {plot_io-0.1.0 → plot_io-0.3.0}/API.md +538 -303
  2. {plot_io-0.1.0 → plot_io-0.3.0}/EXAMPLES.md +64 -9
  3. {plot_io-0.1.0 → plot_io-0.3.0}/PKG-INFO +14 -4
  4. {plot_io-0.1.0 → plot_io-0.3.0}/README.md +12 -2
  5. plot_io-0.3.0/examples/annotated.png +0 -0
  6. {plot_io-0.1.0 → plot_io-0.3.0}/examples/annotated.py +5 -5
  7. plot_io-0.3.0/examples/bars.png +0 -0
  8. {plot_io-0.1.0 → plot_io-0.3.0}/examples/bars.py +5 -5
  9. plot_io-0.3.0/examples/box_plots.png +0 -0
  10. {plot_io-0.1.0 → plot_io-0.3.0}/examples/box_plots.py +1 -1
  11. plot_io-0.3.0/examples/density.png +0 -0
  12. {plot_io-0.1.0 → plot_io-0.3.0}/examples/density.py +6 -6
  13. plot_io-0.3.0/examples/distributions.png +0 -0
  14. {plot_io-0.1.0 → plot_io-0.3.0}/examples/distributions.py +3 -3
  15. plot_io-0.3.0/examples/error_bars.png +0 -0
  16. {plot_io-0.1.0 → plot_io-0.3.0}/examples/error_bars.py +2 -2
  17. plot_io-0.3.0/examples/facets.png +0 -0
  18. {plot_io-0.1.0 → plot_io-0.3.0}/examples/facets.py +4 -4
  19. plot_io-0.3.0/examples/grids2d.png +0 -0
  20. {plot_io-0.1.0 → plot_io-0.3.0}/examples/grids2d.py +3 -3
  21. plot_io-0.3.0/examples/groups.png +0 -0
  22. {plot_io-0.1.0 → plot_io-0.3.0}/examples/groups.py +3 -3
  23. plot_io-0.3.0/examples/heatmap.png +0 -0
  24. {plot_io-0.1.0 → plot_io-0.3.0}/examples/heatmap.py +2 -2
  25. plot_io-0.3.0/examples/large_data.png +0 -0
  26. {plot_io-0.1.0 → plot_io-0.3.0}/examples/large_data.py +3 -3
  27. plot_io-0.3.0/examples/layout_axes.png +0 -0
  28. plot_io-0.3.0/examples/layout_borders.png +0 -0
  29. {plot_io-0.1.0 → plot_io-0.3.0}/examples/layouts.py +3 -2
  30. plot_io-0.3.0/examples/line_band.png +0 -0
  31. {plot_io-0.1.0 → plot_io-0.3.0}/examples/line_band.py +3 -3
  32. plot_io-0.3.0/examples/scales.png +0 -0
  33. {plot_io-0.1.0 → plot_io-0.3.0}/examples/scales.py +4 -4
  34. plot_io-0.3.0/examples/scatter_groups.png +0 -0
  35. {plot_io-0.1.0 → plot_io-0.3.0}/examples/scatter_groups.py +2 -2
  36. plot_io-0.3.0/examples/shared_colorbar.png +0 -0
  37. {plot_io-0.1.0 → plot_io-0.3.0}/examples/shared_colorbar.py +2 -2
  38. plot_io-0.3.0/examples/styles/altair-2.png +0 -0
  39. plot_io-0.3.0/examples/styles/altair.png +0 -0
  40. plot_io-0.3.0/examples/styles/bokeh-2.png +0 -0
  41. plot_io-0.3.0/examples/styles/bokeh.png +0 -0
  42. plot_io-0.3.0/examples/styles/chartjs-2.png +0 -0
  43. plot_io-0.3.0/examples/styles/chartjs.png +0 -0
  44. plot_io-0.3.0/examples/styles/default-2.png +0 -0
  45. plot_io-0.3.0/examples/styles/default.png +0 -0
  46. plot_io-0.3.0/examples/styles/economist-2.png +0 -0
  47. plot_io-0.3.0/examples/styles/economist.png +0 -0
  48. plot_io-0.3.0/examples/styles/excel-2.png +0 -0
  49. plot_io-0.3.0/examples/styles/excel.png +0 -0
  50. plot_io-0.3.0/examples/styles/fivethirtyeight-2.png +0 -0
  51. plot_io-0.3.0/examples/styles/fivethirtyeight.png +0 -0
  52. plot_io-0.3.0/examples/styles/ggplot2-2.png +0 -0
  53. plot_io-0.3.0/examples/styles/ggplot2-bw-2.png +0 -0
  54. plot_io-0.3.0/examples/styles/ggplot2-bw.png +0 -0
  55. plot_io-0.3.0/examples/styles/ggplot2.png +0 -0
  56. plot_io-0.3.0/examples/styles/matlab-2.png +0 -0
  57. plot_io-0.3.0/examples/styles/matlab.png +0 -0
  58. plot_io-0.3.0/examples/styles/matplotlib-2.png +0 -0
  59. plot_io-0.3.0/examples/styles/matplotlib-classic-2.png +0 -0
  60. plot_io-0.3.0/examples/styles/matplotlib-classic.png +0 -0
  61. plot_io-0.3.0/examples/styles/matplotlib.png +0 -0
  62. plot_io-0.3.0/examples/styles/observable-2.png +0 -0
  63. plot_io-0.3.0/examples/styles/observable.png +0 -0
  64. plot_io-0.3.0/examples/styles/plotly-2.png +0 -0
  65. plot_io-0.3.0/examples/styles/plotly-white-2.png +0 -0
  66. plot_io-0.3.0/examples/styles/plotly-white.png +0 -0
  67. plot_io-0.3.0/examples/styles/plotly.png +0 -0
  68. plot_io-0.3.0/examples/styles/seaborn-2.png +0 -0
  69. plot_io-0.3.0/examples/styles/seaborn-whitegrid-2.png +0 -0
  70. plot_io-0.3.0/examples/styles/seaborn-whitegrid.png +0 -0
  71. plot_io-0.3.0/examples/styles/seaborn.png +0 -0
  72. plot_io-0.3.0/examples/styles/tufte-2.png +0 -0
  73. plot_io-0.3.0/examples/styles/tufte.png +0 -0
  74. {plot_io-0.1.0 → plot_io-0.3.0}/examples/styles.py +2 -2
  75. plot_io-0.3.0/examples/time_twin.png +0 -0
  76. {plot_io-0.1.0 → plot_io-0.3.0}/examples/time_twin.py +3 -3
  77. plot_io-0.3.0/examples/units.png +0 -0
  78. plot_io-0.3.0/examples/units.py +27 -0
  79. plot_io-0.3.0/examples/variable_fonts.png +0 -0
  80. plot_io-0.3.0/examples/variable_fonts.py +29 -0
  81. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/__init__.py +6 -5
  82. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/_backend.py +11 -4
  83. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/axis.py +175 -111
  84. plot_io-0.3.0/plot_io/color/__init__.py +4 -0
  85. plot_io-0.3.0/plot_io/color/data.py +1614 -0
  86. plot_io-0.3.0/plot_io/color/maps.py +282 -0
  87. plot_io-0.3.0/plot_io/color/palettes.py +205 -0
  88. plot_io-0.3.0/plot_io/color/values.py +244 -0
  89. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/colorbar.py +72 -50
  90. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/decorations.py +93 -72
  91. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/defaults.py +180 -318
  92. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/enums.py +7 -6
  93. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/facets.py +2 -2
  94. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/figure.py +114 -69
  95. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/labels.py +4 -22
  96. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/legend.py +74 -73
  97. plot_io-0.3.0/plot_io/lines.py +38 -0
  98. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/numbers.py +3 -3
  99. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/occupancy.py +1 -1
  100. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/plot.py +59 -30
  101. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/render.py +261 -174
  102. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/__init__.py +52 -24
  103. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/area.py +15 -13
  104. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/bar.py +32 -32
  105. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/box.py +52 -51
  106. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/catpoints.py +12 -9
  107. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/contour.py +32 -29
  108. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/curves.py +2 -2
  109. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/ecdf.py +19 -15
  110. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/errorbar.py +19 -17
  111. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/errors.py +47 -15
  112. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/fill.py +18 -16
  113. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/heatmap.py +20 -27
  114. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/hexbin.py +26 -22
  115. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/hist.py +48 -37
  116. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/hist2d.py +6 -6
  117. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/kde.py +32 -22
  118. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/kde2d.py +14 -13
  119. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/line.py +17 -18
  120. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/pie.py +66 -46
  121. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/points.py +23 -22
  122. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/regression.py +24 -20
  123. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/scatter.py +5 -4
  124. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/stem.py +17 -15
  125. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/violin.py +28 -25
  126. plot_io-0.3.0/plot_io/settings.py +610 -0
  127. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/sharing.py +7 -7
  128. plot_io-0.3.0/plot_io/sizemaps.py +93 -0
  129. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/slots.py +19 -9
  130. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/stacking.py +2 -2
  131. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/styles/__init__.py +19 -32
  132. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/styles/library.py +330 -318
  133. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/text.py +31 -8
  134. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/ticks.py +25 -2
  135. plot_io-0.3.0/plot_io/units.py +798 -0
  136. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/values.py +14 -10
  137. {plot_io-0.1.0 → plot_io-0.3.0}/pyproject.toml +1 -1
  138. plot_io-0.3.0/tests/fonts/VarTest.ttf +0 -0
  139. plot_io-0.3.0/tests/golden.json +21 -0
  140. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_bars.py +1 -1
  141. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_box.py +1 -1
  142. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_decorations.py +4 -4
  143. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_defaults.py +40 -22
  144. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_density.py +6 -6
  145. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_entry.py +2 -2
  146. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_figure_title.py +12 -12
  147. plot_io-0.3.0/tests/test_fonts.py +65 -0
  148. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_golden.py +4 -4
  149. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_jxl_output.py +11 -0
  150. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_layout.py +77 -20
  151. plot_io-0.3.0/tests/test_maps.py +231 -0
  152. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_markers.py +1 -1
  153. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_occupancy.py +8 -8
  154. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_output.py +23 -2
  155. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_palettes.py +47 -2
  156. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_pie.py +1 -1
  157. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_reflines.py +3 -3
  158. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_series.py +4 -4
  159. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_settings.py +34 -26
  160. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_sharing.py +1 -1
  161. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_simplify.py +1 -1
  162. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_style_settings.py +35 -27
  163. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_style_types.py +6 -6
  164. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_styles.py +42 -35
  165. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_tables.py +8 -8
  166. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_time_twin.py +1 -1
  167. plot_io-0.3.0/tests/test_units.py +355 -0
  168. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_values.py +71 -18
  169. {plot_io-0.1.0 → plot_io-0.3.0}/tools/settings_doc.py +40 -4
  170. plot_io-0.1.0/examples/annotated.png +0 -0
  171. plot_io-0.1.0/examples/bars.png +0 -0
  172. plot_io-0.1.0/examples/box_plots.png +0 -0
  173. plot_io-0.1.0/examples/density.png +0 -0
  174. plot_io-0.1.0/examples/distributions.png +0 -0
  175. plot_io-0.1.0/examples/error_bars.png +0 -0
  176. plot_io-0.1.0/examples/facets.png +0 -0
  177. plot_io-0.1.0/examples/grids2d.png +0 -0
  178. plot_io-0.1.0/examples/groups.png +0 -0
  179. plot_io-0.1.0/examples/heatmap.png +0 -0
  180. plot_io-0.1.0/examples/large_data.png +0 -0
  181. plot_io-0.1.0/examples/layout_axes.png +0 -0
  182. plot_io-0.1.0/examples/layout_borders.png +0 -0
  183. plot_io-0.1.0/examples/line_band.png +0 -0
  184. plot_io-0.1.0/examples/scales.png +0 -0
  185. plot_io-0.1.0/examples/scatter_groups.png +0 -0
  186. plot_io-0.1.0/examples/shared_colorbar.png +0 -0
  187. plot_io-0.1.0/examples/styles/altair-2.png +0 -0
  188. plot_io-0.1.0/examples/styles/altair.png +0 -0
  189. plot_io-0.1.0/examples/styles/bokeh-2.png +0 -0
  190. plot_io-0.1.0/examples/styles/bokeh.png +0 -0
  191. plot_io-0.1.0/examples/styles/chartjs-2.png +0 -0
  192. plot_io-0.1.0/examples/styles/chartjs.png +0 -0
  193. plot_io-0.1.0/examples/styles/default-2.png +0 -0
  194. plot_io-0.1.0/examples/styles/default.png +0 -0
  195. plot_io-0.1.0/examples/styles/economist-2.png +0 -0
  196. plot_io-0.1.0/examples/styles/economist.png +0 -0
  197. plot_io-0.1.0/examples/styles/excel-2.png +0 -0
  198. plot_io-0.1.0/examples/styles/excel.png +0 -0
  199. plot_io-0.1.0/examples/styles/fivethirtyeight-2.png +0 -0
  200. plot_io-0.1.0/examples/styles/fivethirtyeight.png +0 -0
  201. plot_io-0.1.0/examples/styles/ggplot2-2.png +0 -0
  202. plot_io-0.1.0/examples/styles/ggplot2-bw-2.png +0 -0
  203. plot_io-0.1.0/examples/styles/ggplot2-bw.png +0 -0
  204. plot_io-0.1.0/examples/styles/ggplot2.png +0 -0
  205. plot_io-0.1.0/examples/styles/matlab-2.png +0 -0
  206. plot_io-0.1.0/examples/styles/matlab.png +0 -0
  207. plot_io-0.1.0/examples/styles/matplotlib-2.png +0 -0
  208. plot_io-0.1.0/examples/styles/matplotlib-classic-2.png +0 -0
  209. plot_io-0.1.0/examples/styles/matplotlib-classic.png +0 -0
  210. plot_io-0.1.0/examples/styles/matplotlib.png +0 -0
  211. plot_io-0.1.0/examples/styles/observable-2.png +0 -0
  212. plot_io-0.1.0/examples/styles/observable.png +0 -0
  213. plot_io-0.1.0/examples/styles/plotly-2.png +0 -0
  214. plot_io-0.1.0/examples/styles/plotly-white-2.png +0 -0
  215. plot_io-0.1.0/examples/styles/plotly-white.png +0 -0
  216. plot_io-0.1.0/examples/styles/plotly.png +0 -0
  217. plot_io-0.1.0/examples/styles/seaborn-2.png +0 -0
  218. plot_io-0.1.0/examples/styles/seaborn-whitegrid-2.png +0 -0
  219. plot_io-0.1.0/examples/styles/seaborn-whitegrid.png +0 -0
  220. plot_io-0.1.0/examples/styles/seaborn.png +0 -0
  221. plot_io-0.1.0/examples/styles/tufte-2.png +0 -0
  222. plot_io-0.1.0/examples/styles/tufte.png +0 -0
  223. plot_io-0.1.0/examples/time_twin.png +0 -0
  224. plot_io-0.1.0/plot_io/maps/__init__.py +0 -365
  225. plot_io-0.1.0/plot_io/maps/data.py +0 -333
  226. plot_io-0.1.0/plot_io/palettes.py +0 -142
  227. plot_io-0.1.0/plot_io/settings.py +0 -281
  228. plot_io-0.1.0/plot_io/style.py +0 -71
  229. plot_io-0.1.0/tests/golden.json +0 -21
  230. plot_io-0.1.0/tests/test_maps.py +0 -126
  231. {plot_io-0.1.0 → plot_io-0.3.0}/.gitignore +0 -0
  232. {plot_io-0.1.0 → plot_io-0.3.0}/LICENSE +0 -0
  233. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/density.py +0 -0
  234. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/limits.py +0 -0
  235. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/markers.py +0 -0
  236. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/scales.py +0 -0
  237. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/series/catdata.py +0 -0
  238. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/shapes.py +0 -0
  239. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/stats.py +0 -0
  240. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/tables.py +0 -0
  241. {plot_io-0.1.0 → plot_io-0.3.0}/plot_io/times.py +0 -0
  242. {plot_io-0.1.0 → plot_io-0.3.0}/tests/helpers.py +0 -0
  243. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_distributions.py +0 -0
  244. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_docs.py +0 -0
  245. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_grids.py +0 -0
  246. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_heatmap.py +0 -0
  247. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_limits.py +0 -0
  248. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_numbers.py +0 -0
  249. {plot_io-0.1.0 → plot_io-0.3.0}/tests/test_ticks.py +0 -0
  250. {plot_io-0.1.0 → plot_io-0.3.0}/tools/bench.py +0 -0
  251. {plot_io-0.1.0 → plot_io-0.3.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 legend's font is `"1em"`, 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`.
@@ -52,10 +57,86 @@ Complete reference. Worked examples are in [EXAMPLES.md](EXAMPLES.md).
52
57
  * **Text.** Titles, axis labels and legend entries are strings or rich content: a list of
53
58
  strings and `pl.Span` (pdf_io's), e.g. `["Area (m", pl.Span("2",
54
59
  baseline_shift="super", font_scale=0.7), ")"]`.
60
+ * **Named colors.** `"blue"`, `"blue 0.45"`, `"blue 45%"`: 28 scales (`red`, `orange`,
61
+ `amber`, `yellow`, `lime`, `green`, `emerald`, `teal`, `cyan`, `sky`, `blue`, `indigo`,
62
+ `violet`, `purple`, `fuchsia`, `pink`, `rose`, `slate`, `gray`/`grey`, `zinc`, `neutral`,
63
+ `stone`, `taupe`, `mauve`, `mist`, `olive`, `black`, `white`), Tailwind CSS 4's OKLCh
64
+ shades 100–900 at levels 0.1–0.9, white at 0 and black at 1, interpolated in Oklab between
65
+ and gamut mapped into sRGB as CSS Color 4 specifies;
66
+ a bare name is level 0.5. They take precedence over CSS's names (`"red"` is `#fb2c36`,
67
+ not `#ff0000`); other CSS names (`"navy"`) keep their CSS values. `get()` returns the
68
+ name as given, `resolve()` the hex color.
69
+ * **Colors.** Named colors (above), any color pdf_io accepts: CSS names, `"#rrggbb[aa]"`, CSS Color 4 functions
70
+ (`"rgb(…)"`, `"hsl(…)"`, `"hwb(…)"`, `"lab(…)"`, `"lch(…)"`, `"oklab(…)"`,
71
+ `"oklch(64.5% 0.246 16.439)"`, `"color(display-p3 1 0 0)"`, …; colors outside sRGB are
72
+ gamut mapped as browsers do), tuples, `CMYK` and `Spot`; and `"C0"`, `"C1"`, … for the
73
+ palette's colors.
74
+ * **Fonts.** `font_family` is a CSS family list; weights (`font_weight`, `label_weight`,
75
+ `tick_label_weight`) are `normal`, `bold` or 1–1000, styles `normal`, `italic`,
76
+ `oblique` or `"oblique 10deg"`. With a variable font (pdf_io embeds the instance used),
77
+ the weight sets `wght`, the inherited `font_stretch` (`"condensed"`, `"87.5%"`) sets
78
+ `wdth`, the style `ital` or `slnt`, `font_optical_sizing="auto"` sets `opsz` from the
79
+ font size, and `font_variations` (`{"GRAD": 50}`) any axis:
80
+ `pl.Figure(font_family="Roboto Flex", font_stretch="85%", font_variations={"GRAD": 50})`.
55
81
  * **Enums.** Enum-like settings take strings; `pl.Marker`, `pl.LineStyle`,
56
82
  `pl.Orientation`, `pl.Scale`, `pl.Position`, `pl.Order` and `pl.Align` are `str` enums
57
83
  of the same values.
58
84
 
85
+ ### Values
86
+
87
+ Every length, angle and number setting takes a value with a unit, a reference to another
88
+ setting, or an expression:
89
+
90
+ ```python
91
+ pl.Plot(width="3in", font_size="9pt", title="T")
92
+ p.x_axis(tick_length="0.5em", minor_tick_length="50%", tick_rotation="0.125turn")
93
+ p.bar(days, counts, width="20h") # a duration on a time axis
94
+ p.errorbar(x, y, y_error=e, cap_length="0.2data") # data units across the bar
95
+ p.title(font_size="large", color="var(--accent)")
96
+ p.legend(pad="calc(1em - 2px)")
97
+ fig.set(vars={"accent": "#c00"}) # custom variables, read by var(--name)
98
+ ```
99
+
100
+ | Unit | Meaning |
101
+ |---|---|
102
+ | bare number | px (lengths), degrees (angles); data units for slot widths (`Bar`, `Box`, `Violin`, `Strip`, `Swarm` `width`) |
103
+ | `px` `pt` `pc` `in` `cm` `mm` `Q` | absolute lengths |
104
+ | `em` | the object's `font_size`; in a `font_size` setting, the parent's |
105
+ | `rem` | the figure's `font_size` |
106
+ | `%` | 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`) |
107
+ | `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 |
108
+ | `ms` `s` `min` `h` `d` `w` | durations, as data units of time axes (a `timedelta` too) |
109
+ | `fr` | a share of the room left by fixed tracks, in `Figure.widths`/`heights` |
110
+ | `deg` `grad` `rad` `turn` | angles |
111
+ | `xx-small` … `xx-large`, `smaller`, `larger` | font sizes: × 0.579 … 1.728 of `rem`; ÷/× 1.2 of the parent's |
112
+
113
+ * **`var(name[, fallback])`** reads another setting of the object, resolved through the
114
+ usual inheritance; `var()` of the setting's own name reads the parent's value
115
+ (`alpha="calc(var(alpha) / 2)"`). `var(--name)` reads a custom variable: from the
116
+ nearest `vars` (figure or plot), else a `"--name"` key of the style. The fallback is used
117
+ when the value is unset. Loops raise. Text settings (titles, labels, names, formats)
118
+ never read `var()`.
119
+ * **`calc()`** takes `+ - * /`, parentheses, numbers, dimensions with any unit and
120
+ `var()`: dimensions add to dimensions and multiply or divide by numbers.
121
+ * **Layout.** `%` of the axes is exact with `reference="axes"` (the axes size is given)
122
+ and resolved inside the layout loop otherwise; it is known only while the figure is
123
+ drawn. `spacing`, `margin` and fixed `widths`/`heights` in `%` of the figure are solved
124
+ exactly when the figure size follows from its contents.
125
+ * **Scaling.** `Figure.scaling` multiplies every absolute length (px and physical units)
126
+ wherever it is given: on objects, in styles, in `DEFAULTS`; not the figure size.
127
+ `em`, `rem` and font keywords follow `font_size`, which is scaled; `%`, `fr` and `data`
128
+ are not scaled.
129
+ * **Reading.** `get(name)` returns the value as given, `resolve(name)` the final value
130
+ (`resolve(name, of=…)` for settings whose `%` reference the caller passes), and
131
+ `explain(name)` a trace:
132
+
133
+ ```
134
+ >>> pl.Plot(style="matplotlib").x_axis.explain("tick_spacing")
135
+ 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)
136
+ Axis.tick_font_size = 13.3333px ← '1em' (default Axis.tick_font_size)
137
+ Axis.font_size = 13.3333px ← '10.0pt' (inherited from Figure: style "matplotlib" font_size)
138
+ ```
139
+
59
140
  ## 2. Figures
60
141
 
61
142
  ```python
@@ -85,15 +166,29 @@ are names; `fig.plot()` gives 1, 2, 3, … skipping taken ids.
85
166
 
86
167
  ### Sizes and alignment
87
168
 
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.
169
+ * `width` × `height` is the size of the box `reference` names:
170
+ * `"axes"` (default): each grid cell's axes rectangle; the figure size follows;
171
+ * `"plot"`: each cell's whole plot box (axes and decorations); the figure size follows;
172
+ * `"figure"`: the whole figure; the cells share what the decorations leave.
173
+
174
+ With only one of `width` and `height`, `aspect_ratio` (width / height, default 4/3)
175
+ gives the other; with neither, the default is 3 × 2.25 in (288 × 216 px). Giving all
176
+ three raises `ValueError`. Plots with a `data_ratio` (and pies) take the other side from
177
+ it when only `width` or only `height` is given. `widths`/`heights` are the columns' and
178
+ rows' ratios (numbers or `fr`), or fixed lengths (`["2in", "1fr", "1fr"]`) that the
179
+ ratios share the rest around; a plot spanning cells gets their sizes plus the gaps
180
+ between them.
181
+ * `align="axes"` (default): axis lines line up. Between columns the gutter holds the
182
+ widest right margin before it, the widest left margin after it and `spacing`.
183
+ * `align="borders"`: plot boxes (axes and decorations) line up, and each plot's axes are
184
+ what its own decorations leave.
185
+ * `reference` and `align` combine:
186
+
187
+ | `align` \ `reference` | `"axes"` | `"plot"` | `"figure"` |
188
+ |---|---|---|---|
189
+ | `"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 |
190
+ | `"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 |
191
+
97
192
  * Columns (rows) holding only vertical (horizontal) colorbars are as wide as the bar,
98
193
  unless `widths` (`heights`) is given.
99
194
  * Margins come from the real text metrics of tick labels, axis labels, titles, outside
@@ -107,8 +202,8 @@ fig.title(text, **settings) # None removes it
107
202
  ```
108
203
 
109
204
  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
205
+ width) plus `pad`. The figure grows by the band, except with `reference="figure"`, where
206
+ the plots shrink by it. `over="axes"` aligns it within the leftmost to
112
207
  rightmost axes (a left-aligned title starts at the first y axis line), `"figure"` within
113
208
  the figure minus `margin`. Rich content styles a second line (`["Title\n",
114
209
  pl.Span("subtitle", font_size=7, font_weight="normal")]`). It is drawn last and is not
@@ -120,13 +215,18 @@ width.
120
215
  | Setting | Default | Meaning |
121
216
  |---|---|---|
122
217
  | `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. |
124
- | `font_weight` | 'bold' | `bold` or `normal`. |
218
+ | `font_size` | '1em' | Font size; default the base font size. Length; `%`: of the parent's font size. |
219
+ | `font_weight` | 'bold' | `bold`, `normal` or a weight 1–1000. |
220
+ | `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
125
221
  | `align` | 'center' | Alignment. |
126
222
  | `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. |
223
+ | `pad` | '0.5em' | Gap between the title and the plots; default half the font size. Length. |
224
+ | `color` | 'var(text_color)' | Text color. |
225
+ | `rule_gap` | '0.5em' | Gap between the title and the figure's `title_rule`. Length; `%`: of the font size. |
226
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
227
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
228
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
229
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
130
230
  <!-- /settings -->
131
231
 
132
232
  ### Shared axes
@@ -182,37 +282,39 @@ with outer labels only.
182
282
  | `cols` | — | Automatic arrangement: columns. |
183
283
  | `order` | 'auto' | Fill order of the automatic arrangement: `auto` (row by row with `cols`, column by column with `rows`), `row` or `col`. |
184
284
  | `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). |
285
+ | `widths` | — | Column widths: ratios (numbers or `fr`) sharing the room left by fixed lengths (`"2in"`, `"30%"` of the figure width). |
286
+ | `heights` | — | Row heights, as `widths`. |
287
+ | `width` | '3in' | Width of the `reference` box: one cell's axes, one cell's plot, or the figure. Length. |
288
+ | `height` | 'calc(var(width) / var(aspect_ratio))' | Height of the `reference` box. Length. |
289
+ | `aspect_ratio` | 1.3333333333333333 | Width / height of the `reference` box (16:9 → `16 / 9`), when only one of `width` and `height` is given. |
290
+ | `reference` | 'axes' | What `width` and `height` measure: `axes` (each grid cell's axes rectangle), `plot` (each cell's whole plot box) or `figure`. |
291
+ | `spacing` | 13.0 | Minimum gap between neighbouring plots. Length. |
292
+ | `margin` | 5.0 | Space around the figure. Length. |
293
+ | `background` | — | Figure background; unset: transparent (white in JPEG, which has no transparency). |
294
+ | `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). |
295
+ | `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
296
  | `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). |
297
+ | `title_rule_width` | 4.0 | Thickness of the title rule. Length. |
200
298
  | `share_x` | — | Plots sharing their x axis: `False`, `True`/`"all"`, `"col"` (same column span) or `"row"` (same row span). |
201
299
  | `share_y` | — | Plots sharing their y axis, as `share_x`. |
202
300
  | `share` | — | Both axes at once: as `share_x`, or `"grid"` (x per column, y per row); `share_x`/`share_y` override it. |
203
301
  | `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
302
  | `style` | — | A style name (`"ggplot2"`, …) or a dict of settings with an optional `"base"`; default: the session style (`set_style`, `use_style`), else `"default"`. |
303
+ | `vars` | — | Custom variables, read by `var(--name)` in any setting here and below: `{"accent": "#c00"}`. |
205
304
  | `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. |
305
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
306
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
307
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
308
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
309
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
208
310
  | `text_color` | inherited ('black') | Text color. |
209
- | `line_width` | inherited (1.0) | Default line width (pt). |
311
+ | `line_width` | inherited (1.25) | Default line width. Length. |
210
312
  | `palette` | inherited (10 colors) | Colors of series without one. |
211
313
  | `alpha` | inherited (1.0) | Default opacity of series. |
212
314
  | `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
213
315
  | `simplify` | inherited ('auto') | pdf_io's `simplify` for every series; default `"auto"`. |
214
316
  | `data` | inherited (None) | A table whose columns the series' data arguments name. |
215
- | `color_map` | inherited ('viridis') | Default color map (alias `cmap`): of heatmaps, contours and numbers given as colors. |
317
+ | `color_map` | inherited ('rainbow_llhh') | Default color map (alias `cmap`): of heatmaps, contours and numbers given as colors. |
216
318
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
217
319
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
218
320
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -239,24 +341,28 @@ axes clip.
239
341
  | Setting | Default | Meaning |
240
342
  |---|---|---|
241
343
  | `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. |
344
+ | `data_ratio` | — | Data aspect ratio: 1 makes one unit as long on both axes. |
243
345
  | `background` | — | Background color of the axes area. |
244
346
  | `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). |
347
+ | `border_width` | 0.75 | Width of the frame. Length. |
246
348
  | `clip` | True | Clip series to the axes area. |
247
349
  | `axes` | True | Draw axes; `False` hides both axes, drops padding and fixes the aspect to 1 (set by pie charts). |
248
350
  | `share_x` | — | Another plot of the figure whose x axis this plot shares (groups chain); overrides the figure's `share_x`. |
249
351
  | `share_y` | — | Another plot whose y axis this plot shares. |
352
+ | `vars` | — | Custom variables, read by `var(--name)` in any setting here and below: `{"accent": "#c00"}`. |
250
353
  | `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. |
354
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
355
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
356
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
357
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
358
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
253
359
  | `text_color` | inherited ('black') | Text color. |
254
- | `line_width` | inherited (1.0) | Default line width (pt). |
360
+ | `line_width` | inherited (1.25) | Default line width. Length. |
255
361
  | `palette` | inherited (10 colors) | Colors of series without one. |
256
362
  | `alpha` | inherited (1.0) | Default opacity of series. |
257
363
  | `rasterize` | inherited (False) | `True` or a dpi: series drawn as images inside the PDF. |
258
364
  | `simplify` | inherited ('auto') | pdf_io's `simplify` for every series: `"auto"`, `True`, a dpi or `False`. |
259
- | `color_map` | inherited ('viridis') | Default color map (alias `cmap`): of heatmaps, contours and numbers given as colors. |
365
+ | `color_map` | inherited ('rainbow_llhh') | Default color map (alias `cmap`): of heatmaps, contours and numbers given as colors. |
260
366
  | `data` | inherited (None) | A table (dict, pandas or polars data frame, numpy structured array): strings in the data arguments of series name its columns. |
261
367
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
262
368
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -272,20 +378,24 @@ axes clip.
272
378
  | Setting | Default | Meaning |
273
379
  |---|---|---|
274
380
  | `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. |
276
- | `font_weight` | 'normal' | `normal` or `bold`. |
277
- | `color` | The plot's text color | Text color. |
381
+ | `font_size` | '1em' | Font size; default the base font size. Length; `%`: of the parent's font size. |
382
+ | `font_weight` | 'normal' | `normal`, `bold` or a weight 1–1000. |
383
+ | `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
384
+ | `color` | 'var(text_color)' | Text color. |
278
385
  | `align` | 'center' | Alignment over the axes. |
279
- | `pad` | 4.0 | Gap above the axes (pt). |
386
+ | `pad` | 5.0 | Gap above the axes. Length; `%`: of the axes height. |
280
387
  | `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. |
388
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
389
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
390
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
391
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
282
392
  <!-- /settings -->
283
393
 
284
394
  ### Legend
285
395
 
286
396
  One entry per series with a `name`, drawn as the series draws itself (marker, line,
287
397
  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
398
+ `top`, `bottom`, `outside_top` and `outside_bottom` entries are side by side unless
289
399
  `orientation` or `columns` is set.
290
400
 
291
401
  **Size keys.** A series whose `size` goes through a `size_map` adds a size key to its
@@ -301,33 +411,40 @@ id=…, values=None, title=None)` places a key in its own grid area, as colorbar
301
411
  whole length), bars, histogram bins, boxes, violins, areas and fills (the area they cover),
302
412
  heatmaps, 2-D histograms and contours (the whole axes). Data are sampled beyond 50,000
303
413
  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
414
+ goes to the first of `top_right`, `top_left`, `bottom_left`, `bottom_right`, `top`,
415
+ `bottom`, `center_right`, `center_left` whose box covers no marked cell; else to the free
306
416
  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
417
+ corner of the axes; else `outside_right`, with room made in the layout, when every
308
418
  candidate covers more than 2 % marked cells; else the candidate covering the fewest.
309
419
 
310
420
  <!-- settings:Legend -->
311
421
  | Setting | Default | Meaning |
312
422
  |---|---|---|
313
- | `position` | 'auto' | `auto`, `top right`, `top left`, `bottom right`, `bottom left`, `top`, `bottom`, `outside right`, `outside top`, `outside bottom` or `none`. |
423
+ | `position` | 'auto' | `auto`, `top_right`, `top_left`, `bottom_right`, `bottom_left`, `top`, `bottom`, `outside_right`, `outside_top`, `outside_bottom` or `none`. |
314
424
  | `columns` | 1 | Number of columns. |
315
425
  | `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. |
426
+ | `title` | — | Legend title; default the `group` column name. |
427
+ | `font_size` | '1em' | Font size. Length; `%`: of the parent's font size. |
428
+ | `color` | 'var(text_color)' | Text color. |
319
429
  | `background` | 'white' | Background of a framed legend. |
320
430
  | `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). |
431
+ | `pad` | 5.0 | Gap to the axes. Length. |
432
+ | `frame_width` | 0.5 | Frame line width. Length. |
433
+ | `frame_radius` | 0.0 | Corner radius of the frame. Length. |
324
434
  | `frame_alpha` | 1.0 | Opacity of the frame and background. |
325
435
  | `glyph_alpha` | — | Fill opacity of `box` and `circle` symbols, outlined in the opaque color; default: the series' own fill. |
326
436
  | `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. |
437
+ | `orientation` | 'auto' | `horizontal`: entries side by side; `auto`: horizontal at `top`, `bottom`, `outside_top` and `outside_bottom`. |
438
+ | `glyph_length` | '2em' | Width of an entry's symbol. Length; `%`: of the font size. |
439
+ | `row_height` | '1.35em' | Height of an entry. Length; `%`: of the font size. |
440
+ | `glyph_gap` | '0.5em' | Gap between a symbol and its text. Length; `%`: of the font size. |
441
+ | `column_gap` | '1em' | Gap between columns. Length; `%`: of the font size. |
442
+ | `title_gap` | '0.3em' | Gap below the title. Length; `%`: of the font size. |
443
+ | `inner_pad` | 'auto' | Space inside the box; `"auto"`: 0.5em with a frame, 0.15em without. Length; `%`: of the font size. |
444
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
445
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
446
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
447
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
331
448
  <!-- /settings -->
332
449
 
333
450
  ### Decorations
@@ -338,7 +455,7 @@ are drawn among the series by `z`: spans under the series (`z=-1`), lines and te
338
455
  them (`z=1`).
339
456
 
340
457
  ```python
341
- p.hline(y, min=0, max=1, color="#4d4d4d", line_style="solid", ...) # min/max: fractions of the axes width
458
+ p.hline(y, min="0%", max="100%", color="#4d4d4d", line_style="solid", ...) # min/max: data values or % of the axes
342
459
  p.vline(x, ...)
343
460
  p.axline((x0, y0), slope=None, point2=None, ...) # slope: linear axes only
344
461
  p.hspan(y0, y1, color="#e5e5e5", ...); p.vspan(x0, x1, ...)
@@ -357,10 +474,10 @@ HLine:
357
474
  | Setting | Default | Meaning |
358
475
  |---|---|---|
359
476
  | `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. |
477
+ | `line_width` | inherited (1.25) | Line width. Length. |
478
+ | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
479
+ | `min` | '0%' | Start: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
480
+ | `max` | '100%' | End: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
364
481
  | `name` | — | Legend entry; unset: not in the legend. |
365
482
  | `alpha` | 1.0 | Opacity. |
366
483
  | `z` | 1.0 | Drawing order among the series (default 0). |
@@ -374,8 +491,8 @@ AxLine:
374
491
  | Setting | Default | Meaning |
375
492
  |---|---|---|
376
493
  | `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. |
494
+ | `line_width` | inherited (1.25) | Line width. Length. |
495
+ | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list. Length. |
379
496
  | `name` | — | Legend entry; unset: not in the legend. |
380
497
  | `alpha` | 1.0 | Opacity. |
381
498
  | `z` | 1.0 | Drawing order among the series (default 0). |
@@ -389,10 +506,10 @@ HSpan:
389
506
  | Setting | Default | Meaning |
390
507
  |---|---|---|
391
508
  | `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. |
509
+ | `edge_color` | — | Outline color; default none. |
510
+ | `edge_width` | 0.0 | Outline width. Length. |
511
+ | `min` | '0%' | Start: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
512
+ | `max` | '100%' | End: a data value, or `%` (or a length) from the start of the axes. Length; bare numbers: data units. |
396
513
  | `name` | — | Legend entry; unset: not in the legend. |
397
514
  | `alpha` | 1.0 | Opacity. |
398
515
  | `z` | -1.0 | Drawing order among the series (default 0). |
@@ -407,12 +524,16 @@ Text:
407
524
  |---|---|---|
408
525
  | `align` | 'left' | Horizontal alignment on the point. |
409
526
  | `valign` | 'baseline' | Vertical alignment on the point. |
410
- | `rotation` | 0.0 | Rotation (degrees, counterclockwise). |
527
+ | `rotation` | 0.0 | Rotation (degrees, counterclockwise). Angle (bare: degrees). |
411
528
  | `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. |
415
- | `font_weight` | 'normal' | `normal` or `bold`. |
529
+ | `color` | 'var(text_color)' | Text color; default `text_color`. |
530
+ | `font_size` | inherited (11.0) | Font size. Length; `%`: of the parent's font size. |
531
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
532
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
533
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
534
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
535
+ | `font_weight` | 'normal' | `normal`, `bold` or a weight 1–1000. |
536
+ | `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
416
537
  | `text_color` | inherited ('black') | Text color. |
417
538
  | `name` | — | Legend entry; unset: not in the legend. |
418
539
  | `alpha` | 1.0 | Opacity. |
@@ -426,12 +547,16 @@ Annotate:
426
547
  <!-- settings:Annotate -->
427
548
  | Setting | Default | Meaning |
428
549
  |---|---|---|
429
- | `rotation` | 0.0 | Rotation (degrees, counterclockwise). |
550
+ | `rotation` | 0.0 | Rotation (degrees, counterclockwise). Angle (bare: degrees). |
430
551
  | `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. |
434
- | `font_weight` | 'normal' | `normal` or `bold`. |
552
+ | `color` | 'var(text_color)' | Text color; default `text_color`. |
553
+ | `font_size` | inherited (11.0) | Font size. Length; `%`: of the parent's font size. |
554
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
555
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
556
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
557
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
558
+ | `font_weight` | 'normal' | `normal`, `bold` or a weight 1–1000. |
559
+ | `font_style` | 'normal' | `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
435
560
  | `text_color` | inherited ('black') | Text color. |
436
561
  | `name` | — | Legend entry; unset: not in the legend. |
437
562
  | `alpha` | 1.0 | Opacity. |
@@ -440,13 +565,13 @@ Annotate:
440
565
  | `clip` | False | Clip to the axes area. |
441
566
  | `align` | 'center' | Horizontal alignment on `xytext`. |
442
567
  | `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`. |
568
+ | `text_coords` | 'var(coords)' | Coordinates of `xytext`: as `coords`, or `offset` (px from `xy`, y up); default `coords`. |
444
569
  | `arrow` | True | Draw an arrow from the text to `xy`. |
445
570
  | `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). |
571
+ | `arrow_color` | 'var(color)' | Arrow color; default the text color. |
572
+ | `arrow_width` | 0.75 | Arrow line width. Length. |
573
+ | `head_length` | 7.0 | Arrowhead length. Length. |
574
+ | `shrink` | 3.0 | Gap left at both ends of the arrow. Length. |
450
575
  <!-- /settings -->
451
576
 
452
577
  ## 4. Axes
@@ -551,60 +676,65 @@ or the plot's `spines` is set.
551
676
  | Setting | Default | Meaning |
552
677
  |---|---|---|
553
678
  | `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. |
679
+ | `label_font_size` | '1em' | Font size of the label; default: the base font size. Length; `%`: of the font size. |
555
680
  | `scale` | — | `linear`, `log`, `log2`, `log10`, `sqrt`, `exp`, `symlog`, `logit`, `time` or `category`; default: `category` for categorical series, `time` for dates, else `linear`. |
556
681
  | `linthresh` | 1.0 | Half-width of the linear region of a `symlog` axis. |
557
682
  | `tz` | — | Time zone of a time axis (a `tzinfo`); default: the zone of the first aware date, else naive (UTC). |
558
683
  | `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. |
684
+ | `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. |
685
+ | `auto_padding` | '5%' | The fraction `padding="auto"` adds on each side. Length. |
561
686
  | `invert` | False | Reverse the axis. |
562
687
  | `ticks` | — | `False` (no ticks) or a list of tick values. |
563
688
  | `tick_labels` | — | Labels of `ticks`. |
564
689
  | `minor_ticks` | — | `True`, `False` or a list of values; default: on for log10. |
565
690
  | `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). |
691
+ | `tick_rotation` | 'auto' | Label rotation in degrees, or `"auto"` (45° when category labels overlap). Angle (bare: degrees). |
567
692
  | `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. |
693
+ | `tick_spacing` | ('3em', '2em') | Space per automatic tick, in tick label font sizes, on horizontal and vertical axes. Length; `em` and `%`: of `tick_font_size`. |
694
+ | `time_tick_spacing` | ('5em', '2.5em') | `tick_spacing` of time axes. Length; `em` and `%`: of `tick_font_size`. |
695
+ | `tick_label_gap` | '0.6em' | Smallest gap between neighbouring tick labels side by side: fewer numeric ticks, or category labels rotated and thinned out, below it. Length; `em` and `%`: of `tick_font_size`. |
696
+ | `category_label_spacing` | ('1.6em', '1.3em') | Distance between category labels: rotated (horizontal axes) and stacked (vertical axes); labels closer than it are thinned out. Length; `em` and `%`: of `tick_font_size`. |
570
697
  | `auto_max_ticks` | (10, 8) | Most automatic ticks on numeric and time axes. |
571
698
  | `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`. |
699
+ | `tick_length` | 6.0 | Tick length. Length; `%`: of the axes side across the axis. |
700
+ | `minor_tick_length` | '60%' | Minor tick length; default 0.6 × `tick_length`. Length; `%`: of `tick_length`. |
574
701
  | `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. |
584
- | `label_weight` | 'normal' | Axis title weight. |
585
- | `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). |
587
- | `tick_label_weight` | 'normal' | Tick label weight. |
702
+ | `tick_width` | 0.75 | Tick line width. Length. |
703
+ | `tick_font_size` | '1em' | Font size of tick labels. Length; `%`: of the font size. |
704
+ | `tick_pad` | 3.0 | Gap between ticks and labels. Length; `%`: of the axes side across the axis. |
705
+ | `label_pad` | 4.0 | Gap between tick labels and the label. Length; `%`: of the axes side across the axis. |
706
+ | `color` | 'var(text_color)' | Color of the axis line, ticks and labels (the default of `line_color`, `tick_color`, `tick_label_color`, `label_color`). |
707
+ | `line_color` | 'var(color)' | Axis line color. |
708
+ | `tick_color` | 'var(color)' | Tick color. |
709
+ | `tick_label_color` | 'var(color)' | Tick label color. |
710
+ | `label_color` | 'var(color)' | Axis title color. |
711
+ | `label_weight` | 'normal' | Axis title weight: `normal`, `bold` or 1–1000. |
712
+ | `label_style` | 'normal' | Axis title style: `normal`, `italic`, `oblique` or `"oblique 10deg"`. |
713
+ | `side` | x: 'bottom' / y: 'left' | Where the ticks, labels and axis line go: `bottom` or `top` (x axis), `left` or `right` (y axis). |
714
+ | `tick_label_weight` | 'normal' | Tick label weight: `normal`, `bold` or 1–1000. |
588
715
  | `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). |
716
+ | `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
717
  | `spine_trim` | False | Axis line from the first to the last major tick only. |
591
718
  | `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
719
  | `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`. |
720
+ | `zero_line_color` | 'var(line_color)' | Zero line color; default `line_color`. |
721
+ | `zero_line_width` | 'var(line_width)' | Zero line width; default `line_width`. Length. |
595
722
  | `nice` | False | Extend automatic limits to the enclosing major ticks (linear and log scales). |
596
- | `line_width` | 0.8 | Axis line width (pt). |
723
+ | `line_width` | 0.75 | Axis line width. Length. |
597
724
  | `grid` | False | Major grid lines across the plot. |
598
725
  | `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. |
726
+ | `grid_width` | 0.5 | Grid line width. Length. |
727
+ | `grid_style` | 'solid' | Grid line style or dash list. Length. |
601
728
  | `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`. |
729
+ | `minor_grid_color` | 'var(grid_color)' | Minor grid color; default `grid_color`. |
730
+ | `minor_grid_width` | '50%' | Minor grid width; default half `grid_width`. Length; `%`: of `grid_width`. |
731
+ | `minor_grid_style` | 'var(grid_style)' | Minor grid style; default `grid_style`. Length. |
605
732
  | `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. |
733
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
734
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
735
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
736
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
737
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
608
738
  | `text_color` | inherited ('black') | Text color. |
609
739
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
610
740
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -623,7 +753,8 @@ with several value sets (histograms, densities, areas, pies) take one per set.
623
753
  * **Category slots.** Box and violin series, bar series, and strip and swarm series form
624
754
  three dodge groups: the series of a group that have a category split its slot (`width`)
625
755
  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.
756
+ share empty (`"10%"`). `width` is in data units (`0.8` is 80 % of a category) or `%` of
757
+ the slot: one category, or the smallest gap between numeric `positions`. Stacked bars count as one, and so do split violins.
627
758
  * **Stacking.** `stack=True` (bars, histograms, densities) puts a series on the previous
628
759
  stacked series of its kind in the plot, per category or bin; positive and negative
629
760
  values stack apart; `stack="normalize"` divides each position by its total.
@@ -642,7 +773,7 @@ p = pl.Plot(data=df); p.scatter("a", "b") # data inherited by the plot's s
642
773
  `data` is any object returning a column for `data[name]`: a dict of sequences, a pandas
643
774
  or polars data frame, a numpy structured array. Columns are read through `__getitem__`
644
775
  (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`,
776
+ a positional data argument or in `color`, `edge_color`, `size`, `alpha`, `group`,
646
777
  `order`, `x_error`, `y_error`, `weights`, `positions`, `x`, `y` or `labels` names a
647
778
  column. Positional arguments, `group`, `weights` and `positions` must be columns; in
648
779
  `color`, a color name that is no column stays a color (a column wins, with a warning if
@@ -679,28 +810,29 @@ member, and `order` sorts within each member.
679
810
  pl.Scatter(x, y, plot=None, **settings)
680
811
  ```
681
812
 
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:
813
+ `color`, `edge_color`, `size`, `marker` take one value or one per point. Numbers per
814
+ point in `color` and `edge_color` are mapped through `color_map` (alias `cmap`; default:
684
815
  the style's map); numbers in `size` are diameters, or values mapped through `size_map`
685
816
  (alias `smap`) when it is set. See [values](#values-in-color-and-size).
686
817
 
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.
818
+ * `size` is a diameter (a length; per-point numbers are px). With `size_basis="area"` (default) every shape has the
819
+ area of the circle of that diameter: a square of size 4 is drawn 3.54 px wide.
689
820
  * 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)`.
821
+ `ErrorBars(values, color=None, line_width=None, cap_length=None)` (cap: the series'
822
+ `cap_length`, else 4 px).
691
823
 
692
824
  <!-- settings:Scatter -->
693
825
  | Setting | Default | Meaning |
694
826
  |---|---|---|
695
827
  | `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"`. |
828
+ | `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
829
  | `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). |
830
+ | `edge_color` | — | Outline: as the fill color. |
831
+ | `edge_width` | 0.5 | Outline width. Length. |
700
832
  | `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
833
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
702
- | `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. |
834
+ | `color_map` | inherited ('rainbow_llhh') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
835
+ | `size_map` | — | How numbers in `size` become sizes: a `SizeMap` (alias `smap`); without it, numbers are sizes in px. |
704
836
  | `size_legend` | True | With a `size_map`: a size key in the legend (`True`), none (`False`), or the values to show (a list). |
705
837
  | `order` | — | Drawing order: `"density"` (densest drawn last), `"-density"`, or sort keys per point (ascending); default: call order. |
706
838
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `alpha_range`. |
@@ -711,9 +843,12 @@ the style's map); numbers in `size` are diameters, or values mapped through `siz
711
843
  | `z` | — | Drawing order (higher on top); default: call order. |
712
844
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
713
845
  | `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. |
846
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
847
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
716
848
  | `text_color` | inherited ('black') | Text color. |
849
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
850
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
851
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
717
852
  <!-- /settings -->
718
853
 
719
854
  ### Line
@@ -738,17 +873,17 @@ Named line styles scale with the width. Markers (`marker`, `marker_size`,
738
873
  | Setting | Default | Meaning |
739
874
  |---|---|---|
740
875
  | `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. |
876
+ | `line_width` | inherited (1.25) | Line width. Length. |
877
+ | `line_style` | 'solid' | `solid`, `dashed`, `dotted`, `dashdot` or a dash list; named styles scale with the width. Length. |
743
878
  | `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
879
  | `missing` | 'break' | Missing values: `break` the line there, or `skip` them and connect their neighbours. |
745
880
  | `cap` | 'butt' | Line cap. |
746
881
  | `join` | 'round' | Line join. |
747
882
  | `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"`. |
883
+ | `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
884
  | `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). |
885
+ | `marker_edge_color` | — | Outline: as the fill color. |
886
+ | `marker_edge_width` | 0.5 | Outline width. Length. |
752
887
  | `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
888
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
754
889
  | `x_error` | — | Horizontal error bars at the points. |
@@ -759,9 +894,12 @@ Named line styles scale with the width. Markers (`marker`, `marker_size`,
759
894
  | `z` | — | Drawing order (higher on top); default: call order. |
760
895
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
761
896
  | `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. |
897
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
898
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
764
899
  | `text_color` | inherited ('black') | Text color. |
900
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
901
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
902
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
765
903
  <!-- /settings -->
766
904
 
767
905
  ### Fill
@@ -778,9 +916,9 @@ x, y1 or y2 is), so a band with the settings of its line matches it. With
778
916
  | Setting | Default | Meaning |
779
917
  |---|---|---|
780
918
  | `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). |
919
+ | `alpha` | 'calc(0.3 * var(alpha))' | Opacity; default 0.3. |
920
+ | `edge_color` | — | Outline color; default none. |
921
+ | `edge_width` | 'var(line_width)' | Outline width; default the line width. Length. |
784
922
  | `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
923
  | `missing` | 'break' | Missing values: `break` the line there, or `skip` them and connect their neighbours. |
786
924
  | `orientation` | 'vertical' | `vertical`: between y curves; `horizontal`: between x curves. |
@@ -788,9 +926,12 @@ x, y1 or y2 is), so a band with the settings of its line matches it. With
788
926
  | `z` | — | Drawing order (higher on top); default: call order. |
789
927
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
790
928
  | `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. |
929
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
930
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
793
931
  | `text_color` | inherited ('black') | Text color. |
932
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
933
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
934
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
794
935
  <!-- /settings -->
795
936
 
796
937
  ### Box
@@ -811,30 +952,31 @@ category.
811
952
  | Setting | Default | Meaning |
812
953
  |---|---|---|
813
954
  | `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
- | `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. |
955
+ | `color_map` | inherited ('rainbow_llhh') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
956
+ | `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). |
957
+ | `whisker_color` | — | Whisker and cap color; default `edge_color`. |
958
+ | `whisker_style` | 'solid' | Whisker line style: `solid`, `dashed`, `dotted`, `dashdot` or a dash list (caps stay solid). Length. |
959
+ | `edge_width` | 0.75 | Outline width. Length. |
960
+ | `whisker_width` | 'var(edge_width)' | Whisker and cap width; default `edge_width`. Length. |
961
+ | `median_color` | — | Median line color; default `edge_color`. |
962
+ | `median_width` | 1.5 | Median line width. Length. |
963
+ | `width` | 0.8 | Width of a category's slot (category units). Length; bare numbers: data units. |
964
+ | `cap_length` | '50%' | Whisker cap width (`%` of the box width). Length. |
823
965
  | `whiskers` | 1.5 | Whisker reach: a multiple of the IQR, `"range"`, or percentiles `(lo, hi)`. |
824
966
  | `outliers` | True | Draw points beyond the whiskers. |
825
967
  | `saturation` | 1.0 | Saturation of the box fills (1: the colors as given; seaborn uses 0.75). |
826
968
  | `mean` | False | Draw the mean as a marker. |
827
969
  | `mean_marker` | 'diamond' | Marker of the mean. |
828
- | `mean_color` | 'white' | Fill of the mean marker (outline: `line_color`). |
970
+ | `mean_color` | 'white' | Fill of the mean marker (outline: `edge_color`). |
829
971
  | `orientation` | 'vertical' | `vertical` (categories on x) or `horizontal`. |
830
972
  | `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. |
973
+ | `gap` | '10%' | Fraction of each box's part of a shared slot left empty. Length. |
832
974
  | `categories` | — | Category names of a list of arrays. |
833
975
  | `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"`. |
976
+ | `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
977
  | `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). |
978
+ | `marker_edge_color` | — | Outline: as the fill color. |
979
+ | `marker_edge_width` | 0.5 | Outline width. Length. |
838
980
  | `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
981
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
840
982
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -842,9 +984,12 @@ category.
842
984
  | `z` | — | Drawing order (higher on top); default: call order. |
843
985
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
844
986
  | `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. |
987
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
988
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
847
989
  | `text_color` | inherited ('black') | Text color. |
990
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
991
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
992
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
848
993
  <!-- /settings -->
849
994
 
850
995
  ### Heatmap
@@ -865,7 +1010,7 @@ all cells), in black or white, whichever contrasts more (at most 2,500 cells unl
865
1010
  <!-- settings:Heatmap -->
866
1011
  | Setting | Default | Meaning |
867
1012
  |---|---|---|
868
- | `color_map` | inherited ('viridis') | A `ColorMap`, a map name or a list of colors. |
1013
+ | `color_map` | inherited ('rainbow_llhh') | A `ColorMap`, a map name or a list of colors. |
869
1014
  | `color_limits` | — | Override of the map's limits for this series. |
870
1015
  | `color_scale` | — | Override of the map's scale. |
871
1016
  | `mode` | 'image' | `image` (one image pixel per cell), `cells` (rectangles) or `smooth` (interpolated). |
@@ -873,16 +1018,19 @@ all cells), in black or white, whichever contrasts more (at most 2,500 cells unl
873
1018
  | `origin` | 'top' | `top`: row 0 at the top (y axis inverted); `bottom`: at the bottom. |
874
1019
  | `labels` | False | Write each cell's value (`"all"` above 2,500 cells). |
875
1020
  | `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). |
1021
+ | `label_font_size` | '0.9em' | Font size of cell labels. Length; `%`: of the font size. |
877
1022
  | `colorbar` | False | Attach a colorbar to the plot. |
878
1023
  | `name` | — | Legend entry; unset: not in the legend. |
879
1024
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
880
1025
  | `z` | — | Drawing order (higher on top); default: call order. |
881
1026
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
882
1027
  | `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. |
1028
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1029
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
885
1030
  | `text_color` | inherited ('black') | Text color. |
1031
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1032
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1033
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
886
1034
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
887
1035
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
888
1036
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -903,18 +1051,19 @@ pl.Bar(x, height=None, plot=None, **settings)
903
1051
  | Setting | Default | Meaning |
904
1052
  |---|---|---|
905
1053
  | `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
- | `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). |
1054
+ | `color_map` | inherited ('rainbow_llhh') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
1055
+ | `edge_color` | — | Outline color; default none. |
1056
+ | `edge_width` | 0.0 | Outline width. Length. |
1057
+ | `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
1058
  | `bottom` | 0.0 | Base of the bars: a value or one per bar. |
911
1059
  | `orientation` | 'vertical' | `vertical` (bars rise from the x axis) or `horizontal`. |
912
1060
  | `stack` | False | `True`: on top of the previous stacked bars of the plot; `"normalize"`: stacks scaled to 1. |
913
1061
  | `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. |
1062
+ | `gap` | 0.0 | Fraction of each bar's part of a shared slot left empty. Length. |
915
1063
  | `saturation` | 1.0 | Saturation of the fills (seaborn: 0.75). |
916
1064
  | `error` | — | Error bars at the bar ends: a value, a sequence, `(low, high)` or `ErrorBars`. |
917
1065
  | `error_color` | '#333333' | Error bar color. |
1066
+ | `error_width` | 0.75 | Error bar line width. Length. |
918
1067
  | `labels` | False | Value labels: `True`/`"outside"`, `"inside"`, `"center"`. |
919
1068
  | `label_format` | 'auto' | Number format of the labels. |
920
1069
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -922,9 +1071,12 @@ pl.Bar(x, height=None, plot=None, **settings)
922
1071
  | `z` | — | Drawing order (higher on top); default: call order. |
923
1072
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
924
1073
  | `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. |
1074
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1075
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
927
1076
  | `text_color` | inherited ('black') | Text color. |
1077
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1078
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1079
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
928
1080
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
929
1081
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
930
1082
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -955,9 +1107,11 @@ pl.Hist(values, plot=None, **settings)
955
1107
  | `stack` | False | Stack the sets (and other stacked histograms with the same bins). |
956
1108
  | `dodge` | False | Put the sets side by side within each bin. |
957
1109
  | `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. |
1110
+ | `edge_color` | — | Bar outline color; default none. |
1111
+ | `edge_width` | 0.0 | Bar outline width. Length. |
1112
+ | `line_color` | — | Step line color; default the fill color. |
1113
+ | `line_width` | inherited (1.25) | Step line width. Length. |
1114
+ | `alpha` | 'auto' | Opacity; `"auto"`: 0.5 for overlaid sets, else the plot's. |
961
1115
  | `saturation` | 1.0 | Saturation of the fills. |
962
1116
  | `labels` | False | Value labels on bars. |
963
1117
  | `label_format` | 'auto' | Number format of the labels. |
@@ -965,9 +1119,12 @@ pl.Hist(values, plot=None, **settings)
965
1119
  | `z` | — | Drawing order (higher on top); default: call order. |
966
1120
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
967
1121
  | `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. |
1122
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1123
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
970
1124
  | `text_color` | inherited ('black') | Text color. |
1125
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1126
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1127
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
971
1128
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
972
1129
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
973
1130
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -998,16 +1155,19 @@ A Gaussian kernel density of each set on a common grid of `grid` points, extendi
998
1155
  | `orientation` | 'vertical' | `vertical` (values along x) or `horizontal`. |
999
1156
  | `stack` | False | Stack the sets (seaborn's `multiple="stack"`). |
1000
1157
  | `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. |
1158
+ | `alpha` | 'auto' | Fill opacity; `"auto"`: 0.25, 1 when stacked. |
1159
+ | `line_width` | inherited (1.25) | Line width. Length. |
1160
+ | `line_style` | 'solid' | Line style. Length. |
1004
1161
  | `name` | — | Legend entry; unset: not in the legend. |
1005
1162
  | `z` | — | Drawing order (higher on top); default: call order. |
1006
1163
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1007
1164
  | `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. |
1165
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1166
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1010
1167
  | `text_color` | inherited ('black') | Text color. |
1168
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1169
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1170
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1011
1171
  <!-- /settings -->
1012
1172
 
1013
1173
  ### Kde2d
@@ -1031,22 +1191,25 @@ labels, colorbar).
1031
1191
  |---|---|---|
1032
1192
  | `filled` | False | Fill the bands between levels. |
1033
1193
  | `lines` | True | Draw the iso-lines. |
1034
- | `color_map` | inherited ('viridis') | Color map of the levels. |
1194
+ | `color_map` | inherited ('rainbow_llhh') | Color map of the levels. |
1035
1195
  | `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. |
1196
+ | `line_width` | 'calc(0.6 * var(line_width))' | Line width; default 0.6 × the plot's. Length. |
1197
+ | `line_style` | 'solid' | Line style. Length. |
1038
1198
  | `negative_style` | — | Line style of negative levels drawn with a single color (matplotlib: dashed). |
1039
1199
  | `alpha` | 1.0 | Opacity. |
1040
1200
  | `labels` | False | Write the level values on the lines. |
1041
1201
  | `label_format` | 'auto' | Number format of the labels. |
1042
- | `label_size` | 0.8 × the font size | Label font size (pt). |
1202
+ | `label_font_size` | '0.8em' | Label font size. Length; `%`: of the font size. |
1043
1203
  | `name` | — | Legend entry; unset: not in the legend. |
1044
1204
  | `z` | — | Drawing order (higher on top); default: call order. |
1045
1205
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1046
1206
  | `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. |
1207
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1208
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1049
1209
  | `text_color` | inherited ('black') | Text color. |
1210
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1211
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1212
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1050
1213
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1051
1214
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
1052
1215
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -1079,16 +1242,19 @@ A step line through the sorted values of each set: `stat` `proportion`, `count`
1079
1242
  | `complementary` | False | Plot 1 − F (survival). |
1080
1243
  | `orientation` | 'vertical' | `vertical`: values along x; `horizontal`: along y. |
1081
1244
  | `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. |
1245
+ | `line_width` | inherited (1.25) | Line width. Length. |
1246
+ | `line_style` | 'solid' | Line style. Length. |
1084
1247
  | `name` | — | Legend entry; unset: not in the legend. |
1085
1248
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1086
1249
  | `z` | — | Drawing order (higher on top); default: call order. |
1087
1250
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1088
1251
  | `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. |
1252
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1253
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1091
1254
  | `text_color` | inherited ('black') | Text color. |
1255
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1256
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1257
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1092
1258
  <!-- /settings -->
1093
1259
 
1094
1260
  ### Violin
@@ -1103,12 +1269,12 @@ pl.Violin(values, positions=None, plot=None, **settings)
1103
1269
  | Setting | Default | Meaning |
1104
1270
  |---|---|---|
1105
1271
  | `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
- | `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). |
1272
+ | `color_map` | inherited ('rainbow_llhh') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
1273
+ | `edge_color` | '#333333' | Outline and inner color. |
1274
+ | `edge_width` | 0.75 | Outline width. Length. |
1109
1275
  | `saturation` | 1.0 | Saturation of the fills. |
1110
1276
  | `alpha` | 1.0 | Fill opacity. |
1111
- | `width` | 0.8 | Width of a category's slot. |
1277
+ | `width` | 0.8 | Width of a category's slot. Length; bare numbers: data units. |
1112
1278
  | `bandwidth` | 'scott' | `scott`, `silverman` or a number. |
1113
1279
  | `adjust` | 1.0 | Factor applied to the bandwidth. |
1114
1280
  | `cut` | 2.0 | The density extends this many bandwidths past the data. |
@@ -1118,15 +1284,18 @@ pl.Violin(values, positions=None, plot=None, **settings)
1118
1284
  | `split` | False | Two violin series share each slot as facing halves. |
1119
1285
  | `orientation` | 'vertical' | `vertical` (categories on x) or `horizontal`. |
1120
1286
  | `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. |
1287
+ | `gap` | '10%' | Fraction of each part of a shared slot left empty. Length. |
1122
1288
  | `categories` | — | Category names of a list of arrays. |
1123
1289
  | `name` | — | Legend entry; unset: not in the legend. |
1124
1290
  | `z` | — | Drawing order (higher on top); default: call order. |
1125
1291
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1126
1292
  | `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. |
1293
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1294
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1129
1295
  | `text_color` | inherited ('black') | Text color. |
1296
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1297
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1298
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1130
1299
  <!-- /settings -->
1131
1300
 
1132
1301
  ### Strip and swarm
@@ -1136,27 +1305,27 @@ pl.Strip(values, positions=None, plot=None, **settings)
1136
1305
  pl.Swarm(values, positions=None, plot=None, **settings)
1137
1306
  ```
1138
1307
 
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`.
1308
+ 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
1309
 
1141
1310
  <!-- settings:Strip -->
1142
1311
  | Setting | Default | Meaning |
1143
1312
  |---|---|---|
1144
1313
  | `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"`. |
1314
+ | `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
1315
  | `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). |
1316
+ | `edge_color` | — | Outline: as the fill color. |
1317
+ | `edge_width` | 0.5 | Outline width. Length. |
1149
1318
  | `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
1319
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1151
- | `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. |
1320
+ | `color_map` | inherited ('rainbow_llhh') | How numbers in `color` become colors: a `ColorMap`, a map name or colors (alias `cmap`); default: the style's. |
1321
+ | `size_map` | — | How numbers in `size` become sizes: a `SizeMap` (alias `smap`); without it, numbers are sizes in px. |
1153
1322
  | `size_legend` | True | With a `size_map`: a size key in the legend (`True`), none (`False`), or the values to show (a list). |
1154
1323
  | `orientation` | 'vertical' | `vertical` (categories on x) or `horizontal`. |
1155
- | `width` | 0.8 | Width of a category's slot. |
1324
+ | `width` | 0.8 | Width of a category's slot. Length; bare numbers: data units. |
1156
1325
  | `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. |
1326
+ | `gap` | 0.0 | Fraction of each part of a shared slot left empty. Length. |
1158
1327
  | `categories` | — | Category names of a list of arrays. |
1159
- | `jitter` | 0.1 | Half-width of the jitter, as a fraction of the slot width. |
1328
+ | `jitter` | '10%' | Half-width of the jitter (`%` of the slot width). Length. |
1160
1329
  | `seed` | 0 | Seed of the jitter. |
1161
1330
  | `order` | — | Drawing order: `"density"` (densest drawn last), `"-density"`, or sort keys per point (ascending); default: call order. |
1162
1331
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own; or `"density"` / a `Density`, mapped linearly to `alpha_range`. |
@@ -1165,9 +1334,12 @@ Points of each category's values: `Strip` spreads them by uniform jitter (± `ji
1165
1334
  | `z` | — | Drawing order (higher on top); default: call order. |
1166
1335
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1167
1336
  | `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. |
1337
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1338
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1170
1339
  | `text_color` | inherited ('black') | Text color. |
1340
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1341
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1342
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1171
1343
  <!-- /settings -->
1172
1344
 
1173
1345
  ### Area
@@ -1185,17 +1357,20 @@ Layers (rows of `ys`, or a dict `{name: values}`, one legend entry each) stacked
1185
1357
  | `stack` | True | Stack the layers; `False` overlays them from 0. |
1186
1358
  | `color` | — | A color, or one per layer; default palette colors. |
1187
1359
  | `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). |
1360
+ | `edge_color` | — | Outline color of each layer's top; default none. |
1361
+ | `edge_width` | 'var(line_width)' | Outline width; default the line width. Length. |
1190
1362
  | `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
1363
  | `missing` | 'break' | Missing values: `break` the line there, or `skip` them and connect their neighbours. |
1192
1364
  | `name` | — | Legend entry; unset: not in the legend. |
1193
1365
  | `z` | — | Drawing order (higher on top); default: call order. |
1194
1366
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1195
1367
  | `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. |
1368
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1369
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1198
1370
  | `text_color` | inherited ('black') | Text color. |
1371
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1372
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1373
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1199
1374
  <!-- /settings -->
1200
1375
 
1201
1376
  ### Errorbar
@@ -1210,15 +1385,15 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
1210
1385
  | Setting | Default | Meaning |
1211
1386
  |---|---|---|
1212
1387
  | `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"`. |
1388
+ | `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
1389
  | `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). |
1390
+ | `marker_edge_color` | — | Outline: as the fill color. |
1391
+ | `marker_edge_width` | 0.0 | Outline width. Length. |
1217
1392
  | `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
1393
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1219
1394
  | `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. |
1395
+ | `line_width` | inherited (1.25) | Bar width. Length. |
1396
+ | `cap_length` | 4.0 | Cap width (`data`: in data units across the bar); 0: no caps. Length. |
1222
1397
  | `x_error` | — | Horizontal errors. |
1223
1398
  | `y_error` | — | Vertical errors. |
1224
1399
  | `y_error_style` | 'bars' | `bars`, or `band`: a filled band between the y error ends (points sorted by x). |
@@ -1228,9 +1403,12 @@ Error bars on their own (markers only with `marker=`); `y_error_style="band"` fi
1228
1403
  | `z` | — | Drawing order (higher on top); default: call order. |
1229
1404
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1230
1405
  | `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. |
1406
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1407
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1233
1408
  | `text_color` | inherited ('black') | Text color. |
1409
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1410
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1411
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1234
1412
  <!-- /settings -->
1235
1413
 
1236
1414
  ### Stem
@@ -1245,26 +1423,29 @@ Stems from `baseline` to each value with a marker (lollipops), and a baseline li
1245
1423
  | Setting | Default | Meaning |
1246
1424
  |---|---|---|
1247
1425
  | `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"`. |
1426
+ | `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
1427
  | `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). |
1428
+ | `marker_edge_color` | — | Outline: as the fill color. |
1429
+ | `marker_edge_width` | 0.0 | Outline width. Length. |
1252
1430
  | `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
1431
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1254
1432
  | `color` | — | Stem and marker color; default: the next palette color. |
1255
- | `line_width` | inherited (1.0) | Stem width (pt). |
1433
+ | `line_width` | inherited (1.25) | Stem width. Length. |
1256
1434
  | `baseline` | 0.0 | Value the stems start from. |
1257
1435
  | `baseline_color` | '#4d4d4d' | Baseline color; `none`: no baseline. |
1258
- | `baseline_width` | 0.8 | Baseline width (pt). |
1436
+ | `baseline_width` | 0.75 | Baseline width. Length. |
1259
1437
  | `orientation` | 'vertical' | `vertical` stems (values on y) or `horizontal`. |
1260
1438
  | `name` | — | Legend entry; unset: not in the legend. |
1261
1439
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1262
1440
  | `z` | — | Drawing order (higher on top); default: call order. |
1263
1441
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1264
1442
  | `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. |
1443
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1444
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1267
1445
  | `text_color` | inherited ('black') | Text color. |
1446
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1447
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1448
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1268
1449
  <!-- /settings -->
1269
1450
 
1270
1451
  ### Regression
@@ -1287,14 +1468,14 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
1287
1468
  | `truncate` | True | Draw the fit over the data range only (`False`: over the axis range). |
1288
1469
  | `points` | 100 | Points of the fitted curve. |
1289
1470
  | `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. |
1471
+ | `line_width` | 'calc(1.4 * var(line_width))' | Line width; default 1.4 × the plot's. Length. |
1472
+ | `line_style` | 'solid' | Line style or dash list. Length. |
1292
1473
  | `band_alpha` | 0.2 | Opacity of the band. |
1293
1474
  | `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"`. |
1475
+ | `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
1476
  | `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). |
1477
+ | `marker_edge_color` | — | Outline: as the fill color. |
1478
+ | `marker_edge_width` | 0.0 | Outline width. Length. |
1298
1479
  | `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
1480
  | `size_basis` | 'area' | `area`: shapes of the same size have the same area; `box`: size is the width of the shape's box. |
1300
1481
  | `name` | — | Legend entry; unset: not in the legend. |
@@ -1302,9 +1483,12 @@ A least-squares polynomial of `order` with the confidence band of the mean (Stud
1302
1483
  | `z` | — | Drawing order (higher on top); default: call order. |
1303
1484
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1304
1485
  | `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. |
1486
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1487
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1307
1488
  | `text_color` | inherited ('black') | Text color. |
1489
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1490
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1491
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1308
1492
  <!-- /settings -->
1309
1493
 
1310
1494
  ### Hist2d
@@ -1318,23 +1502,26 @@ Counts in rectangular bins (even on the axis scales), drawn as a heatmap with th
1318
1502
  <!-- settings:Hist2d -->
1319
1503
  | Setting | Default | Meaning |
1320
1504
  |---|---|---|
1321
- | `color_map` | inherited ('viridis') | A `ColorMap`, a map name or a list of colors. |
1505
+ | `color_map` | inherited ('rainbow_llhh') | A `ColorMap`, a map name or a list of colors. |
1322
1506
  | `color_limits` | — | Override of the map's limits for this series. |
1323
1507
  | `color_scale` | — | Override of the map's scale. |
1324
1508
  | `mode` | 'image' | `image` (one image pixel per cell), `cells` (rectangles) or `smooth` (interpolated). |
1325
1509
  | `nan_color` | — | Color of missing cells; default: the map's `bad` (transparent). |
1326
1510
  | `labels` | False | Write each cell's value (`"all"` above 2,500 cells). |
1327
1511
  | `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). |
1512
+ | `label_font_size` | '0.9em' | Font size of cell labels. Length; `%`: of the font size. |
1329
1513
  | `colorbar` | False | Attach a colorbar to the plot. |
1330
1514
  | `name` | — | Legend entry; unset: not in the legend. |
1331
1515
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1332
1516
  | `z` | — | Drawing order (higher on top); default: call order. |
1333
1517
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1334
1518
  | `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. |
1519
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1520
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1337
1521
  | `text_color` | inherited ('black') | Text color. |
1522
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1523
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1524
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1338
1525
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1339
1526
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
1340
1527
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -1367,20 +1554,23 @@ aspect (and the counts depend on it). Points outside the axes are not counted. C
1367
1554
  | `weights` | — | A weight per point (sums). |
1368
1555
  | `stat` | 'count' | `count`, `probability` or `percent`. |
1369
1556
  | `min_count` | 1.0 | Hexagons below this count are not drawn. |
1370
- | `color_map` | inherited ('viridis') | A `ColorMap`, a map name or colors. |
1557
+ | `color_map` | inherited ('rainbow_llhh') | A `ColorMap`, a map name or colors. |
1371
1558
  | `color_limits` | — | Override of the map's limits. |
1372
1559
  | `color_scale` | — | Override of the map's scale. |
1373
- | `line_color` | — | Hexagon outline color; default none. |
1374
- | `line_width` | 0.0 | Outline width (pt). |
1560
+ | `edge_color` | — | Hexagon outline color; default none. |
1561
+ | `edge_width` | 0.0 | Outline width. Length. |
1375
1562
  | `colorbar` | False | Attach a colorbar to the plot. |
1376
1563
  | `name` | — | Legend entry; unset: not in the legend. |
1377
1564
  | `alpha` | inherited (1.0) | Opacity, multiplying the colors' own. |
1378
1565
  | `z` | — | Drawing order (higher on top); default: call order. |
1379
1566
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1380
1567
  | `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. |
1568
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1569
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1383
1570
  | `text_color` | inherited ('black') | Text color. |
1571
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1572
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1573
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1384
1574
  <!-- /settings -->
1385
1575
 
1386
1576
  ### Contour
@@ -1397,23 +1587,26 @@ Iso-lines (`lines`) and filled bands (`filled`) of a grid at nodes `x`/`y`. `lev
1397
1587
  | `levels` | 10 | A number of levels (nice values over the data) or the level values. |
1398
1588
  | `filled` | False | Fill the bands between levels. |
1399
1589
  | `lines` | True | Draw the iso-lines. |
1400
- | `color_map` | inherited ('viridis') | Color map of the levels. |
1590
+ | `color_map` | inherited ('rainbow_llhh') | Color map of the levels. |
1401
1591
  | `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. |
1592
+ | `line_width` | 'calc(0.6 * var(line_width))' | Line width; default 0.6 × the plot's. Length. |
1593
+ | `line_style` | 'solid' | Line style. Length. |
1404
1594
  | `negative_style` | — | Line style of negative levels drawn with a single color (matplotlib: dashed). |
1405
1595
  | `alpha` | 1.0 | Opacity. |
1406
1596
  | `labels` | False | Write the level values on the lines. |
1407
1597
  | `label_format` | 'auto' | Number format of the labels. |
1408
- | `label_size` | 0.8 × the font size | Label font size (pt). |
1598
+ | `label_font_size` | '0.8em' | Label font size. Length; `%`: of the font size. |
1409
1599
  | `colorbar` | False | Attach a colorbar to the plot. |
1410
1600
  | `name` | — | Legend entry; unset: not in the legend. |
1411
1601
  | `z` | — | Drawing order (higher on top); default: call order. |
1412
1602
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1413
1603
  | `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. |
1604
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1605
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1416
1606
  | `text_color` | inherited ('black') | Text color. |
1607
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1608
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1609
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1417
1610
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1418
1611
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
1419
1612
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -1428,31 +1621,35 @@ Iso-lines (`lines`) and filled bands (`filled`) of a grid at nodes `x`/`y`. `lev
1428
1621
  pl.Pie(values, plot=None, **settings)
1429
1622
  ```
1430
1623
 
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.
1624
+ 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
1625
 
1433
1626
  <!-- settings:Pie -->
1434
1627
  | Setting | Default | Meaning |
1435
1628
  |---|---|---|
1436
1629
  | `labels` | — | Wedge names (default: the dict's keys). |
1437
1630
  | `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). |
1631
+ | `start` | 90.0 | Angle where the first wedge starts (degrees, 0: 3 o'clock, 90: 12 o'clock). Angle (bare: degrees). |
1439
1632
  | `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. |
1633
+ | `hole` | 0.0 | Radius of the hole (`%` of the radius): a donut. Length. |
1634
+ | `explode` | — | Offset of the wedges from the centre (`%` of the radius): one value or one per wedge. Length. |
1442
1635
  | `sort` | False | Sort the wedges by decreasing value. |
1443
1636
  | `label_position` | 'outside' | Where the names go: `outside`, `inside` or `none` (in the legend instead). |
1444
1637
  | `value_labels` | False | Write each wedge's `percent` or `value` inside it (outside, with a leader line, when it does not fit). |
1638
+ | `label_spacing` | '1.25em' | Smallest distance between outside labels on a side. Length; `%`: of the font size. |
1445
1639
  | `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). |
1640
+ | `edge_color` | 'white' | Wedge outline color; `none`: no outline. |
1641
+ | `edge_width` | 1.25 | Wedge outline width. Length. |
1448
1642
  | `alpha` | 1.0 | Opacity. |
1449
1643
  | `name` | — | Legend entry; unset: not in the legend. |
1450
1644
  | `z` | — | Drawing order (higher on top); default: call order. |
1451
1645
  | `rasterize` | inherited (False) | `True` or a dpi: drawn as an image inside the PDF. |
1452
1646
  | `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. |
1647
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1648
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1455
1649
  | `text_color` | inherited ('black') | Text color. |
1650
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1651
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1652
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1456
1653
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1457
1654
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
1458
1655
  | `minus` | inherited ('hyphen') | `hyphen` (`-`) or `minus` (U+2212, from an installed font). |
@@ -1479,17 +1676,20 @@ side, so axes stay aligned. A bar in its own area runs along the neighbouring ax
1479
1676
  | Setting | Default | Meaning |
1480
1677
  |---|---|---|
1481
1678
  | `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. |
1679
+ | `orientation` | 'auto' | Bar direction; default: vertical, or horizontal for bars attached at the top or bottom. |
1680
+ | `thickness` | 13.0 | Bar thickness (`%` of the attached axes side across it). Length. |
1681
+ | `length` | '100%' | Bar length as a fraction of the axes side (attached bars). Length. |
1682
+ | `pad` | 11.0 | Gap between the axes and an attached bar. Length. |
1486
1683
  | `label` | — | Bar label: a string or rich content. |
1487
1684
  | `extend` | 'auto' | Triangular ends in the under/over colors: `auto` shows them when the limits clip the data. |
1488
1685
  | `frame` | False | Outline the bar. |
1489
1686
  | `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. |
1687
+ | `frame_width` | 0.5 | Outline width. Length. |
1688
+ | `font_size` | inherited (11.0) | Base font size. Length; `%`: of the parent's font size. |
1689
+ | `font_family` | inherited ('SF Pro, Inter, Helvetica, Arial, sans-serif') | Font family. |
1690
+ | `font_stretch` | inherited ('normal') | Font width: `normal`, `condensed`, …, or a percentage (`"87.5%"`); the `wdth` axis of variable fonts. |
1691
+ | `font_variations` | inherited (None) | Variable font axes: `{"GRAD": 50}` or `'"GRAD" 50, "wght" 650'`. |
1692
+ | `font_optical_sizing` | inherited ('auto') | `auto`: a variable font's `opsz` axis follows the font size; `none`. |
1493
1693
  | `text_color` | inherited ('black') | Text color. |
1494
1694
  | `decimal_separator` | inherited ('.') | Decimal separator of numbers (`"."`). |
1495
1695
  | `thousands_separator` | inherited ('') | Thousands separator (`""`: none). |
@@ -1509,14 +1709,25 @@ default palette `pl.PALETTE` (`"okabe_ito"`) is Okabe–Ito's eight colorblind-s
1509
1709
  plus indigo and dark brown, chosen as the pair farthest from every other color (in Oklab)
1510
1710
  under normal and simulated protan, deutan and tritan vision.
1511
1711
 
1512
- `palette` takes a list of colors, a registered name, or a function `n -> colors`, called
1513
- with the number of series of the plot that take a palette color.
1712
+ `palette` takes a `pl.Palette`, a registered name (`"tab10"`; `"tab10_r"` reversed), a
1713
+ list of colors (or one comma-separated string: `"red, teal 0.7"`), or a function `n -> colors`, called with the number of series of the plot
1714
+ that take a palette color.
1514
1715
 
1515
1716
  ```python
1516
- pl.register_palette(name, colors_or_function)
1717
+ pl.Palette(colors="okabe_ito", name=None) # a name, colors, a Palette or n -> colors
1718
+ pl.register_palette(name, palette) # a Palette, colors or a function
1517
1719
  pl.palette_names()
1518
1720
  ```
1519
1721
 
1722
+ | `Palette` | |
1723
+ |---|---|
1724
+ | `colors(n=None)` | the colors: all, or `n` (a list repeats, as series reuse it; a function is called with `n`) |
1725
+ | `len(p)`, `p[i]`, `p[a:b]`, `iter(p)` | lists only: count; a color (indices wrap); a sub-palette |
1726
+ | `reversed()`, `lighter(k=0.25)`, `darker(k=0.25)` | copies: reversed; each color moved by `k` toward white or black in Oklab |
1727
+
1728
+ `ColorMap.to_palette(n)` samples a gradient into `n` colors, at the centers of `n` equal
1729
+ parts: `palette=pl.ColorMap("viridis").to_palette(5)` for ordered categories.
1730
+
1520
1731
  | Palette | Colors |
1521
1732
  |---|---|
1522
1733
  | `okabe_ito` | plot_io's default (10) |
@@ -1533,33 +1744,55 @@ pl.palette_names()
1533
1744
  | `economist` | The Economist (ggthemes, pre-2017) (10) |
1534
1745
  | `fivethirtyeight` | matplotlib's fivethirtyeight style (6) |
1535
1746
  | `greys` | black to light grey (4) |
1747
+ | `set1`, `set2`, `set3`, `paired`, `accent`, `dark2`, `pastel1`, `pastel2` | ColorBrewer's qualitative schemes by Brewer (Apache-2.0) (8–12) |
1748
+ | `batlow`, `batlowk`, `batloww`, `devon`, `lajolla`, `bamako`, `davos`, `bilbao`, `nuuk`, `oslo`, `grayc`, `hawaii`, `lapaz`, `tokyo`, `buda`, `acton`, `turku`, `imola`, `glasgow`, `lipari`, `navia` | Crameri's categorical Scientific colour maps 8 (MIT): the first colors differ most (100) |
1536
1749
 
1537
1750
  ### Color maps
1538
1751
 
1539
1752
  ```python
1540
- pl.ColorMap(colors="viridis", positions=None, limits="auto", scale="linear",
1541
- under=None, over=None, bad=None, space=None, name=None)
1753
+ pl.ColorMap(colors="rainbow_llhh", positions=None, limits="auto", scale="linear",
1754
+ under=None, over=None, bad=None, space=None, name=None, interpolation=None,
1755
+ widen_colors=1, widen_sides=1.0)
1542
1756
  pl.register_color_map(name, color_map)
1543
1757
  pl.color_map_names()
1544
1758
  ```
1545
1759
 
1546
1760
  | Member | |
1547
1761
  |---|---|
1548
- | `colors` | a name (`viridis`, `magma`, `inferno`, `plasma`, `cividis`, `coolwarm`, `grey`, `rocket`, `mako`, `flare`, `crest`, `vlag`, `icefire`, `jet`, `parula`, `turbo`, `ylgnbu`, `blues`, `ggplot2`; `_r` reverses), a list of colors (evenly spaced or at `positions`), a `ColorMap` (copied) or a function `t -> color` |
1762
+ | `colors` | a name (`viridis`, `magma`, `inferno`, `plasma`, `cividis`, `coolwarm`, `grey`, `rocket`, `mako`, `flare`, `crest`, `vlag`, `icefire`, `jet`, `parula`, `turbo`, `ggplot2`, the rainbows, ColorBrewer's and Crameri's maps below, in any case (`"RdBu"`, `"batlowK"`); `_r` reverses), a list of colors (evenly spaced or at `positions`; or one string, comma-separated: `"violet 0.4, sky 0.4, green 0.4"`), a `ColorMap` (copied) or a function `t -> color` |
1549
1763
  | `limits`, `scale` | axis syntax, applied to the mapped values; `"auto"` covers every series using the map |
1550
1764
  | `under`, `over`, `bad` | colors below/above the limits (default: the end colors) and of missing values (default: transparent) |
1551
- | `space` | `"oklab"` (default for color lists: perceptually even) or `"srgb"` (bundled maps, whose stops are already a dense perceptual sampling) |
1765
+ | `space` | interpolation between the colors: `"oklab"` (default, for every map: perceptually even) or `"srgb"` |
1766
+ | `interpolation` | `"linear"` (default): between neighboring colors; `"nearest"`: equal steps, one per color (`n` colors, `n` bins; with `positions`, each step starts at its position); `"smooth"`: a Bézier curve with the colors as control points, through the first and last only (no `positions`); `"spline"`: a monotone cubic curve through every color (PCHIP in Oklab: no overshoot between colors) |
1767
+ | `widen_colors`, `widen_sides` | each inner color of a list repeated `widen_colors` times, each end color `round(widen_sides × widen_colors)` times: wider bands around the colors |
1552
1768
  | `cm(t)`, `colors_at(ts)` | color at t ∈ [0, 1]; bulk colors (C) |
1553
1769
  | `reversed()`, `resampled(n)`, `truncated(lo, hi)`, `with_extremes(…)` | copies: reversed; n flat steps; a part stretched to [0, 1]; new extremes |
1554
- | `to_pdf_io()` | the equivalent pdf_io color map (Oklab maps as 256 sRGB stops) |
1770
+ | `to_palette(n)` | a `Palette` of `n` colors sampled at the centers of `n` equal parts |
1771
+ | `to_pdf_io()` | the equivalent pdf_io color map (maps with fewer than 256 colors as 256 sRGB stops) |
1555
1772
 
1556
1773
  Bundled data: viridis, magma, inferno and plasma by van der Walt and Smith (CC0); cividis
1557
1774
  by Nuñez, Anderton and Renslow; coolwarm by Moreland; rocket, mako, flare, crest, vlag and
1558
1775
  icefire from seaborn by Waskom (BSD-3-Clause); jet from matplotlib; a parula-like map;
1559
- turbo by Mikhailov (Google, Apache-2.0); YlGnBu and Blues from ColorBrewer by Brewer
1560
- (Apache-2.0);
1561
- `ggplot2` is ggplot2's continuous default (`#132B43` → `#56B1F7`, Oklab). The
1562
- `color_map` setting (alias `cmap`; inherited, default `"viridis"`) is the map of heatmaps,
1776
+ turbo by Mikhailov (Google, Apache-2.0);
1777
+ the rainbows, built from named colors with `widen_colors=6, widen_sides=0.6` and
1778
+ `interpolation="smooth"` (violet, sky,
1779
+ green, yellow, orange, rose): `rainbow` (all at level 0.4), `rainbow_neutral` (0.5),
1780
+ `rainbow_l0hh` (from white, then levels 0.1 to 0.6), `rainbow_llhh` (0.16 to 0.6),
1781
+ `rainbow_llh` (0.16 to 0.4), `rainbow_hlh` (dark ends, light middle); diverging maps from
1782
+ named colors: `blue_white_red` (sky, white, rose), `blue_white_red_hc` (levels 0.6 at the
1783
+ ends), `blue_gray_red` (a gray 0.2 middle), `blue_gray_red_hc`;
1784
+ ColorBrewer's schemes by Brewer (Apache-2.0): sequential `blues`, `bugn`, `bupu`, `gnbu`,
1785
+ `greens`, `greys`, `oranges`, `orrd`, `pubu`, `pubugn`, `purd`, `purples`, `rdpu`, `reds`,
1786
+ `ylgn`, `ylgnbu`, `ylorbr`, `ylorrd` (9 colors) and diverging `brbg`, `piyg`, `prgn`, `puor`,
1787
+ `rdbu`, `rdgy`, `rdylbu`, `rdylgn`, `spectral` (11 colors); Crameri's Scientific colour maps
1788
+ 8 (MIT; Crameri, Shephard and Heron 2020): sequential `batlow`, `batlowk`, `batloww`,
1789
+ `devon`, `lajolla`, `bamako`, `davos`, `bilbao`, `nuuk`, `oslo`, `grayc`, `hawaii`, `lapaz`,
1790
+ `tokyo`, `buda`, `acton`, `turku`, `imola`, `glasgow`, `lipari`, `navia`, diverging `broc`,
1791
+ `cork`, `vik`, `lisbon`, `tofino`, `berlin`, `roma`, `bam`, `vanimo`, `managua`,
1792
+ multi-sequential `oleron`, `bukavu`, `fes` and cyclic `romao`, `bamo`, `broco`, `corko`,
1793
+ `viko` (256 colors each);
1794
+ `ggplot2` is ggplot2's continuous default (`#132B43` → `#56B1F7`). The
1795
+ `color_map` setting (alias `cmap`; inherited, default `"rainbow_llhh"`) is the map of heatmaps,
1563
1796
  contours and numbers given as colors. One `ColorMap` object given to several series
1564
1797
  shares its `"auto"` limits.
1565
1798
 
@@ -1577,7 +1810,7 @@ value); `by="diameter"` moves the diameter. `under`/`over` default to the end si
1577
1810
 
1578
1811
  ### Values in color and size
1579
1812
 
1580
- | Given to `color` (also `line_color`, `marker_color`) | Meaning |
1813
+ | Given to `color` (also `edge_color`, `marker_color`) | Meaning |
1581
1814
  |---|---|
1582
1815
  | a color string, `CMYK`, `Spot`, or a **tuple** of 3 or 4 numbers | one color |
1583
1816
  | a list of colors | one color per point |
@@ -1590,7 +1823,7 @@ A tuple of numbers is always one color and a list of numbers is always values, s
1590
1823
  `color=[0.2, 0.4, 0.6]` with a point count other than 3 is an error (use a tuple for one
1591
1824
  RGB color). A `ColorMap` goes in `color_map`, not `color`.
1592
1825
 
1593
- `size` takes a diameter (pt), diameters per point, or values per point mapped through
1826
+ `size` takes a diameter (a length), diameters per point (px), or values per point mapped through
1594
1827
  `size_map` when it is set; `"density"` uses `size_map` or `SizeMap()`. A `SizeMap` goes in
1595
1828
  `size_map`.
1596
1829
 
@@ -1614,7 +1847,7 @@ on the axis positions (log axes in log space); NaN points get NaN. `normalize`:
1614
1847
  under automatic limits. `method`: `"exact"` (the sum over all points, multithreaded in
1615
1848
  C, equal to scipy's), `"grid"` (binned, blurred and read back, about 1e-4 relative) or
1616
1849
  `"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
1850
+ `color`, `edge_color`, `size` (through `size_map`, default `SizeMap()`), `alpha` (mapped
1618
1851
  linearly to `alpha_range`, default (0.2, 1)) and `order`; one object computes each
1619
1852
  series' own density, cached until a setting changes, and exposed as
1620
1853
  `series.stats["density"]`. The colorbar label defaults to `"density"`.
@@ -1678,18 +1911,18 @@ for pdf_io's `draw_markers`; `pl.marker_area(name)` its area.
1678
1911
  ## 8. Output
1679
1912
 
1680
1913
  ```python
1681
- fig.save(path, **options) # .pdf, .png, .jpg/.jpeg, .jxl
1914
+ fig.save(path, **options) # .pdf, .png, .jpg/.jpeg, .jxl, .avif
1682
1915
  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
1916
+ fig.draw(canvas, x=0, y=0) # on any pdf_io canvas; returns (width, height) in px
1917
+ fig.size() # (width, height) in px
1685
1918
  p.save(path, …) p.to_bytes(…) p.draw(canvas, …) # one plot alone, at its size in the figure
1686
1919
  ```
1687
1920
 
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,
1921
+ Options: `dpi` (images, default 192: two image pixels per px), `background` (default the figure's; unset is
1922
+ transparent, white in JPEG), `quality` (the figure's `quality` when not given; JPEG, default 90; JPEG XL and AVIF,
1690
1923
  default lossless; in a PDF, of rasterized content, default lossless), and pdf_io `Document` arguments: `title`, `author`, `compress`, `compression`,
1691
1924
  `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
1925
+ libjxl, AVIF output (`.avif`) libavif 1.x. Images inside a PDF (rasterized series, heatmaps) are stored losslessly or as
1693
1926
  JPEG (`quality`), never as JPEG XL, so every PDF reader shows them. `simplify` culls hidden content in PDF output only: PNG, JPEG and
1694
1927
  JPEG XL output draw everything (rasterizing hidden content costs less than culling it,
1695
1928
  and the pixels are the same), and dense lines are still decimated. A plot
@@ -1746,7 +1979,8 @@ pl.style_settings("house") # the resolved dict (base theme included)
1746
1979
  `"Colorbar.<axis setting>"` (`"Colorbar.tick_direction"`, `"Colorbar.tick_color"`, …)
1747
1980
  applies to colorbar axes only, and `"XAxis.<setting>"`, `"YAxis.<setting>"` to the x or
1748
1981
  y axis of plots only; each wins over `"Axis.<setting>"` there.
1749
- Values are checked when the style is registered or set.
1982
+ Keys starting with `--` are custom variables (`"--accent": "#c00"`), read by
1983
+ `var(--accent)`. Values are checked when the style is registered or set.
1750
1984
  * **`"base"`.** A style name or a list of names, applied left to right (later ones win);
1751
1985
  the dict's own keys are applied over them. Registered styles use the same form.
1752
1986
  * **Resolution.** A setting is looked up on the object, then as `"Class.name"` in the
@@ -1757,8 +1991,9 @@ pl.style_settings("house") # the resolved dict (base theme included)
1757
1991
  created (`use_style` innermost, else `set_style`), else `"default"`, which adds nothing
1758
1992
  to `DEFAULTS`.
1759
1993
  * **`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.
1994
+ multiplies every absolute length: font sizes, line widths, marker sizes, tick lengths,
1995
+ pads and gaps, from the defaults, the style or set on objects (not the figure size).
1996
+ Lengths in `em` follow the scaled font size.
1762
1997
 
1763
1998
  Bundled styles (`pl.styles()`), each the defaults of a library expressed in these
1764
1999
  settings (colors, fonts, grid, axis lines, ticks, legend and title placement, palette,
@@ -1806,10 +2041,10 @@ documented default properties. What cannot be expressed: legend titles naming a
1806
2041
  | `slots.py`, `stacking.py`, `labels.py`, `shapes.py` | category slots, stacking, value labels, bulk rectangles and polygons |
1807
2042
  | `stats.py` | bins, densities, contours, LOWESS and swarm layout (pdf_io's C helpers) |
1808
2043
  | `decorations.py` | reference lines, spans, text and annotations |
1809
- | `maps/` | `ColorMap`, `SizeMap`, Oklab, bundled map data |
1810
- | `markers.py`, `style.py`, `text.py` | marker shapes, palette references and dashes, rich one-line text |
1811
- | `palettes.py` | palette registry, bundled palettes, ggplot2's hues (CIE LCh(uv)) |
1812
- | `styles/` | style registry, expansion and scaling; bundled styles |
2044
+ | `color/` | colors: `values.py` (the `color` validator, named color scales, palette references, alpha, saturation, luminance), `palettes.py` (palettes: the discrete colors series take in turn; registry, ggplot2's hues), `maps.py` (`ColorMap`: gradients numbers are mapped onto; Oklab from pdf_io), `data.py` (bundled map and palette colors) |
2045
+ | `sizemaps.py` | `SizeMap`: values to marker diameters |
2046
+ | `markers.py`, `lines.py`, `text.py` | marker shapes, line dash styles, rich one-line text |
2047
+ | `styles/` | style registry and expansion; bundled styles (point libraries in `pt`) |
1813
2048
  | `values.py`, `density.py` | values given to `color`/`size` and their rules; `Density` (point density) |
1814
2049
  | `tables.py`, `facets.py` | columns of tables, `group=` splitting (`SeriesGroup`); `facet` |
1815
2050
  | `sharing.py`, `times.py` | shared axes; dates and times on axes |