umber 0.3.2__tar.gz → 0.4.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 (316) hide show
  1. {umber-0.3.2 → umber-0.4.0}/Cargo.lock +140 -7
  2. {umber-0.3.2 → umber-0.4.0}/Cargo.toml +7 -1
  3. {umber-0.3.2 → umber-0.4.0}/PKG-INFO +180 -29
  4. umber-0.4.0/README-ZH.md +431 -0
  5. umber-0.4.0/README.md +431 -0
  6. {umber-0.3.2 → umber-0.4.0}/THIRD-PARTY-LICENSES.txt +349 -2
  7. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/Cargo.toml +3 -0
  8. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/README.md +1 -1
  9. umber-0.4.0/crates/umber-core/src/binning.rs +598 -0
  10. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/bubble_fit.rs +193 -62
  11. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/bubble_fit_tests.rs +21 -6
  12. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/bubbles_tests.rs +21 -5
  13. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/category_label_tests.rs +24 -9
  14. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/cmap.rs +3 -3
  15. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/color_scale.rs +131 -6
  16. umber-0.4.0/crates/umber-core/src/contour/bands.rs +209 -0
  17. umber-0.4.0/crates/umber-core/src/contour/labels.rs +145 -0
  18. umber-0.4.0/crates/umber-core/src/contour/march.rs +174 -0
  19. umber-0.4.0/crates/umber-core/src/contour/mod.rs +238 -0
  20. umber-0.4.0/crates/umber-core/src/contour/tests.rs +497 -0
  21. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/coverage.rs +9 -3
  22. umber-0.4.0/crates/umber-core/src/draw/annotation.rs +351 -0
  23. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/bar.rs +61 -19
  24. umber-0.4.0/crates/umber-core/src/draw/bar_labels.rs +603 -0
  25. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/bubbles.rs +11 -1
  26. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/chrome.rs +20 -11
  27. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/clip/mod.rs +70 -0
  28. umber-0.4.0/crates/umber-core/src/draw/colorbar.rs +106 -0
  29. umber-0.4.0/crates/umber-core/src/draw/contour.rs +331 -0
  30. umber-0.4.0/crates/umber-core/src/draw/ecdf.rs +22 -0
  31. umber-0.4.0/crates/umber-core/src/draw/events.rs +62 -0
  32. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/heatmap.rs +19 -8
  33. umber-0.4.0/crates/umber-core/src/draw/hist.rs +208 -0
  34. umber-0.4.0/crates/umber-core/src/draw/kde.rs +24 -0
  35. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/mod.rs +103 -17
  36. umber-0.4.0/crates/umber-core/src/draw/pie.rs +117 -0
  37. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/rule.rs +12 -2
  38. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/scatter.rs +96 -8
  39. umber-0.4.0/crates/umber-core/src/draw/strip.rs +206 -0
  40. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/bar.rs +8 -4
  41. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/box_plot.rs +17 -5
  42. umber-0.4.0/crates/umber-core/src/draw/tests/contour.rs +400 -0
  43. umber-0.4.0/crates/umber-core/src/draw/tests/contour_fixes.rs +623 -0
  44. umber-0.4.0/crates/umber-core/src/draw/tests/events.rs +123 -0
  45. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/hist.rs +1 -1
  46. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/horizontal.rs +12 -1
  47. umber-0.4.0/crates/umber-core/src/draw/tests/mapped_points.rs +425 -0
  48. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/mod.rs +5 -0
  49. umber-0.4.0/crates/umber-core/src/draw/tests/strip.rs +218 -0
  50. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/violin.rs +14 -2
  51. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/error.rs +228 -8
  52. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/figure.rs +72 -14
  53. umber-0.4.0/crates/umber-core/src/font_error_tests.rs +108 -0
  54. umber-0.4.0/crates/umber-core/src/fonts.rs +927 -0
  55. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/header_tests.rs +53 -31
  56. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/label_cache_tests.rs +3 -2
  57. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/cache_tests.rs +13 -12
  58. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/colorbar.rs +68 -57
  59. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/grid.rs +500 -160
  60. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/legend.rs +160 -42
  61. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/mod.rs +608 -139
  62. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/panel.rs +532 -147
  63. umber-0.4.0/crates/umber-core/src/layout/pie/collision.rs +160 -0
  64. umber-0.4.0/crates/umber-core/src/layout/pie/property_tests.rs +397 -0
  65. umber-0.4.0/crates/umber-core/src/layout/pie/spread.rs +135 -0
  66. umber-0.4.0/crates/umber-core/src/layout/pie/tests.rs +348 -0
  67. umber-0.4.0/crates/umber-core/src/layout/pie.rs +468 -0
  68. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/placement.rs +18 -1
  69. umber-0.4.0/crates/umber-core/src/layout/title_tests.rs +845 -0
  70. umber-0.4.0/crates/umber-core/src/layout/twin.rs +134 -0
  71. umber-0.4.0/crates/umber-core/src/layout/twin_tests.rs +537 -0
  72. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/legend.rs +43 -3
  73. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/legend_position_tests.rs +46 -19
  74. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/legend_swatch_tests.rs +12 -3
  75. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/lib.rs +33 -9
  76. umber-0.4.0/crates/umber-core/src/line_break_tests.rs +1094 -0
  77. umber-0.4.0/crates/umber-core/src/model/annotation.rs +477 -0
  78. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/axes.rs +174 -3
  79. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/axes_mut.rs +1295 -146
  80. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/axis_data.rs +1 -1
  81. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/bar.rs +150 -22
  82. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/color_by.rs +6 -0
  83. umber-0.4.0/crates/umber-core/src/model/contour.rs +1162 -0
  84. umber-0.4.0/crates/umber-core/src/model/ecdf.rs +202 -0
  85. umber-0.4.0/crates/umber-core/src/model/events.rs +183 -0
  86. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/figure.rs +478 -46
  87. umber-0.4.0/crates/umber-core/src/model/hist.rs +440 -0
  88. umber-0.4.0/crates/umber-core/src/model/kde.rs +469 -0
  89. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/mark.rs +66 -3
  90. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/mesh.rs +25 -8
  91. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/mod.rs +63 -22
  92. umber-0.4.0/crates/umber-core/src/model/panel.rs +242 -0
  93. umber-0.4.0/crates/umber-core/src/model/pie.rs +378 -0
  94. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/share.rs +63 -12
  95. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/share_tests.rs +3 -5
  96. umber-0.4.0/crates/umber-core/src/model/strip.rs +287 -0
  97. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/validation.rs +718 -104
  98. umber-0.4.0/crates/umber-core/src/pie_grid_tests.rs +605 -0
  99. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/pipeline.rs +600 -187
  100. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/render/image.rs +2 -5
  101. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/render/mod.rs +4 -2
  102. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/render/normalize.rs +5 -2
  103. umber-0.4.0/crates/umber-core/src/render/pdf/image.rs +237 -0
  104. umber-0.4.0/crates/umber-core/src/render/pdf/mod.rs +857 -0
  105. umber-0.4.0/crates/umber-core/src/render/pdf/paint.rs +891 -0
  106. umber-0.4.0/crates/umber-core/src/render/pdf/text.rs +1039 -0
  107. umber-0.4.0/crates/umber-core/src/render/pdf/write.rs +155 -0
  108. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/render/png.rs +139 -96
  109. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/render/svg.rs +117 -46
  110. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/resolve/data_limits_tests.rs +3 -5
  111. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/resolve/horizontal_tests.rs +12 -7
  112. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/resolve/nice_ticks_tests.rs +3 -2
  113. umber-0.4.0/crates/umber-core/src/resolve/swarm.rs +207 -0
  114. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/resolve.rs +639 -117
  115. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/scene.rs +52 -9
  116. umber-0.4.0/crates/umber-core/src/scene_text.rs +348 -0
  117. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/size.rs +11 -9
  118. umber-0.4.0/crates/umber-core/src/stats.rs +402 -0
  119. umber-0.4.0/crates/umber-core/src/test_support/mod.rs +52 -0
  120. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/test_support/scene.rs +1 -1
  121. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/font.rs +137 -23
  122. umber-0.4.0/crates/umber-core/src/text/layout.rs +610 -0
  123. umber-0.4.0/crates/umber-core/src/text/library.rs +918 -0
  124. umber-0.4.0/crates/umber-core/src/text/lines.rs +223 -0
  125. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/mod.rs +26 -15
  126. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/shaping.rs +8 -1
  127. umber-0.4.0/crates/umber-core/src/text/style.rs +72 -0
  128. umber-0.4.0/crates/umber-core/src/text/system/family_tests.rs +507 -0
  129. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/system/index.rs +43 -9
  130. umber-0.4.0/crates/umber-core/src/text/system/lookup.rs +404 -0
  131. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/system/mod.rs +28 -6
  132. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/cmap.rs +11 -6
  133. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/fallback.rs +28 -17
  134. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/fixtures.rs +22 -5
  135. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/layout.rs +30 -18
  136. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/malformed.rs +3 -3
  137. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/mod.rs +1 -0
  138. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/outline.rs +5 -5
  139. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/runs.rs +10 -7
  140. umber-0.4.0/crates/umber-core/src/text/tests/scene_fonts.rs +185 -0
  141. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/shaping.rs +4 -4
  142. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/system_fallback.rs +19 -16
  143. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/tests/system_index.rs +23 -3
  144. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/theme.rs +49 -28
  145. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/tick_format.rs +2 -2
  146. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/ticks.rs +43 -0
  147. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/time.rs +12 -7
  148. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/time_axes_tests.rs +21 -6
  149. umber-0.4.0/crates/umber-core/tests/fixtures/font_file.rs +25 -0
  150. umber-0.4.0/crates/umber-core/tests/fixtures/outline-cff.otf +0 -0
  151. umber-0.4.0/crates/umber-core/tests/fixtures/outline-cff2.otf +0 -0
  152. umber-0.4.0/crates/umber-core/tests/fixtures/outline-variable.ttf +0 -0
  153. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/color.rs +1 -1
  154. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/enums.rs +33 -18
  155. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/errors.rs +29 -2
  156. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/figure.rs +792 -80
  157. umber-0.4.0/crates/umber-py/src/font.rs +216 -0
  158. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/lib.rs +11 -0
  159. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/test_support.rs +36 -0
  160. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/theme.rs +11 -9
  161. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/values.rs +36 -1
  162. {umber-0.3.2 → umber-0.4.0}/pyproject.toml +4 -0
  163. {umber-0.3.2 → umber-0.4.0}/python/umber/__init__.py +16 -2
  164. umber-0.4.0/python/umber/__main__.py +8 -0
  165. {umber-0.3.2 → umber-0.4.0}/python/umber/_args.py +156 -33
  166. {umber-0.3.2 → umber-0.4.0}/python/umber/_axes.py +1514 -181
  167. {umber-0.3.2 → umber-0.4.0}/python/umber/_cell.py +4 -2
  168. {umber-0.3.2 → umber-0.4.0}/python/umber/_color.py +9 -2
  169. {umber-0.3.2 → umber-0.4.0}/python/umber/_color_by.py +8 -1
  170. umber-0.4.0/python/umber/_display.py +134 -0
  171. {umber-0.3.2 → umber-0.4.0}/python/umber/_enums.py +68 -26
  172. {umber-0.3.2 → umber-0.4.0}/python/umber/_errors.py +17 -0
  173. {umber-0.3.2 → umber-0.4.0}/python/umber/_figure.py +327 -33
  174. umber-0.4.0/python/umber/_font.py +356 -0
  175. umber-0.4.0/python/umber/_group.py +543 -0
  176. umber-0.4.0/python/umber/_pie.py +306 -0
  177. umber-0.4.0/python/umber/_quick.py +333 -0
  178. {umber-0.3.2 → umber-0.4.0}/python/umber/_scale.py +1 -0
  179. {umber-0.3.2 → umber-0.4.0}/python/umber/_series.py +28 -15
  180. {umber-0.3.2 → umber-0.4.0}/python/umber/_size.py +9 -4
  181. umber-0.4.0/python/umber/_skill/umber/SKILL.md +42 -0
  182. umber-0.4.0/python/umber/_skill/umber/references/api.md +6342 -0
  183. umber-0.4.0/python/umber/_skill/umber/references/charts.md +143 -0
  184. umber-0.4.0/python/umber/_skill/umber/references/errors.md +48 -0
  185. umber-0.4.0/python/umber/_skill/umber/references/idioms.md +104 -0
  186. umber-0.4.0/python/umber/_skill/umber/references/matplotlib.md +64 -0
  187. umber-0.4.0/python/umber/_skill_cli.py +163 -0
  188. {umber-0.3.2 → umber-0.4.0}/python/umber/_theme.py +8 -7
  189. {umber-0.3.2 → umber-0.4.0}/python/umber/_ticks.py +4 -3
  190. {umber-0.3.2 → umber-0.4.0}/python/umber/_time.py +40 -6
  191. {umber-0.3.2 → umber-0.4.0}/python/umber/_types.py +2 -2
  192. {umber-0.3.2 → umber-0.4.0}/python/umber/_umber.pyi +362 -60
  193. {umber-0.3.2 → umber-0.4.0}/python/umber/_values.py +75 -30
  194. umber-0.3.2/README-ZH.md +0 -280
  195. umber-0.3.2/README.md +0 -280
  196. umber-0.3.2/crates/umber-core/src/binning.rs +0 -268
  197. umber-0.3.2/crates/umber-core/src/draw/colorbar.rs +0 -66
  198. umber-0.3.2/crates/umber-core/src/draw/hist.rs +0 -131
  199. umber-0.3.2/crates/umber-core/src/fonts.rs +0 -399
  200. umber-0.3.2/crates/umber-core/src/model/hist.rs +0 -178
  201. umber-0.3.2/crates/umber-core/src/scene_text.rs +0 -163
  202. umber-0.3.2/crates/umber-core/src/stats.rs +0 -196
  203. umber-0.3.2/crates/umber-core/src/test_support/mod.rs +0 -17
  204. umber-0.3.2/crates/umber-core/src/text/layout.rs +0 -265
  205. umber-0.3.2/crates/umber-core/src/text/library.rs +0 -560
  206. umber-0.3.2/crates/umber-core/src/text/style.rs +0 -25
  207. umber-0.3.2/crates/umber-core/src/text/system/lookup.rs +0 -146
  208. umber-0.3.2/python/umber/_quick.py +0 -195
  209. {umber-0.3.2 → umber-0.4.0}/LICENSE-APACHE +0 -0
  210. {umber-0.3.2 → umber-0.4.0}/LICENSE-MIT +0 -0
  211. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/LICENSE-APACHE +0 -0
  212. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/LICENSE-MIT +0 -0
  213. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/Geist-Regular.ttf +0 -0
  214. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/Geist-SemiBold.ttf +0 -0
  215. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/IBMPlexSans-Regular.ttf +0 -0
  216. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  217. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/Inter-Regular.ttf +0 -0
  218. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/Inter-SemiBold.ttf +0 -0
  219. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/JetBrainsMono-Regular.ttf +0 -0
  220. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/JetBrainsMono-SemiBold.ttf +0 -0
  221. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/LICENSES/Geist-OFL.txt +0 -0
  222. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/LICENSES/IBMPlexSans-OFL.txt +0 -0
  223. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/LICENSES/Inter-OFL.txt +0 -0
  224. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/LICENSES/JetBrainsMono-OFL.txt +0 -0
  225. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/LICENSES/SourceSerif4-OFL.txt +0 -0
  226. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/MANIFEST.md +0 -0
  227. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/SourceSerif4-Regular.ttf +0 -0
  228. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/fonts/SourceSerif4-SemiBold.ttf +0 -0
  229. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/bubble_scale.rs +0 -0
  230. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/cmap/tables.rs +0 -0
  231. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/color.rs +0 -0
  232. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/color_by_tests.rs +0 -0
  233. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/downsample.rs +0 -0
  234. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/area.rs +0 -0
  235. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/band.rs +0 -0
  236. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/bar_shape.rs +0 -0
  237. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/box_plot.rs +0 -0
  238. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/cells.rs +0 -0
  239. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/error_bars.rs +0 -0
  240. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/fill.rs +0 -0
  241. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/hexbin.rs +0 -0
  242. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/legend.rs +0 -0
  243. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/line.rs +0 -0
  244. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/mapping.rs +0 -0
  245. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/marker.rs +0 -0
  246. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/mesh.rs +0 -0
  247. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/stacked_area.rs +0 -0
  248. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/stem.rs +0 -0
  249. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/step.rs +0 -0
  250. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/stroke.rs +0 -0
  251. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/area.rs +0 -0
  252. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/band.rs +0 -0
  253. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/baseline.rs +0 -0
  254. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/cells.rs +0 -0
  255. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/chrome.rs +0 -0
  256. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/clip.rs +0 -0
  257. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/downsample.rs +0 -0
  258. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/error_bars.rs +0 -0
  259. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/line.rs +0 -0
  260. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/mapping.rs +0 -0
  261. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/marker.rs +0 -0
  262. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/marks.rs +0 -0
  263. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/oracle.rs +0 -0
  264. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/raster.rs +0 -0
  265. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/rule.rs +0 -0
  266. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/scatter.rs +0 -0
  267. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/stacked_area.rs +0 -0
  268. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/stem.rs +0 -0
  269. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/tests/step.rs +0 -0
  270. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/draw/violin.rs +0 -0
  271. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/exact/dyadic.rs +0 -0
  272. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/exact/expansion.rs +0 -0
  273. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/exact/mod.rs +0 -0
  274. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/geometry.rs +0 -0
  275. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/inset.rs +0 -0
  276. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/nudge.rs +0 -0
  277. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/layout/program.rs +0 -0
  278. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/band.rs +0 -0
  279. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/box_plot.rs +0 -0
  280. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/bubbles.rs +0 -0
  281. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/error_bars.rs +0 -0
  282. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/grid.rs +0 -0
  283. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/heatmap.rs +0 -0
  284. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/render.rs +0 -0
  285. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/rule.rs +0 -0
  286. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/stacked_area.rs +0 -0
  287. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/stem.rs +0 -0
  288. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/step.rs +0 -0
  289. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/ticks.rs +0 -0
  290. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/model/violin.rs +0 -0
  291. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/render/image_encoding_tests.rs +0 -0
  292. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/render/snapshots/umber_core__render__svg__tests__fill_stroke_and_markers_snapshot.snap +0 -0
  293. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/scale.rs +0 -0
  294. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/snapshots/umber_core__draw__tests__chrome_snapshot.snap +0 -0
  295. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/stacking.rs +0 -0
  296. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/stats/bin2d.rs +0 -0
  297. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/test_support/image.rs +0 -0
  298. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/test_support/polygon.rs +0 -0
  299. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/cmap.rs +0 -0
  300. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/guard.rs +0 -0
  301. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/marks.rs +0 -0
  302. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/outline.rs +0 -0
  303. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/runs.rs +0 -0
  304. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/text/system/shaping.rs +0 -0
  305. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/src/time/tests.rs +0 -0
  306. {umber-0.3.2 → umber-0.4.0}/crates/umber-core/tests/fixtures/fallback-only.ttf +0 -0
  307. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/Cargo.toml +0 -0
  308. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/cmap.rs +0 -0
  309. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/scale.rs +0 -0
  310. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/size.rs +0 -0
  311. {umber-0.3.2 → umber-0.4.0}/crates/umber-py/src/ticks.rs +0 -0
  312. {umber-0.3.2 → umber-0.4.0}/python/umber/_ansi.py +0 -0
  313. {umber-0.3.2 → umber-0.4.0}/python/umber/_cmap.py +0 -0
  314. {umber-0.3.2 → umber-0.4.0}/python/umber/_highlight.py +0 -0
  315. {umber-0.3.2 → umber-0.4.0}/python/umber/_report.py +0 -0
  316. {umber-0.3.2 → umber-0.4.0}/python/umber/py.typed +0 -0
@@ -242,6 +242,12 @@ version = "1.0.0"
242
242
  source = "registry+https://github.com/rust-lang/crates.io-index"
243
243
  checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0"
244
244
 
245
+ [[package]]
246
+ name = "equivalent"
247
+ version = "1.0.3"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
250
+
245
251
  [[package]]
246
252
  name = "errno"
247
253
  version = "0.3.14"
@@ -252,6 +258,15 @@ dependencies = [
252
258
  "windows-sys",
253
259
  ]
254
260
 
261
+ [[package]]
262
+ name = "euclid"
263
+ version = "0.22.14"
264
+ source = "registry+https://github.com/rust-lang/crates.io-index"
265
+ checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06"
266
+ dependencies = [
267
+ "num-traits",
268
+ ]
269
+
255
270
  [[package]]
256
271
  name = "fastrand"
257
272
  version = "2.5.0"
@@ -290,6 +305,15 @@ version = "1.0.7"
290
305
  source = "registry+https://github.com/rust-lang/crates.io-index"
291
306
  checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
292
307
 
308
+ [[package]]
309
+ name = "font-types"
310
+ version = "0.11.3"
311
+ source = "registry+https://github.com/rust-lang/crates.io-index"
312
+ checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7"
313
+ dependencies = [
314
+ "bytemuck",
315
+ ]
316
+
293
317
  [[package]]
294
318
  name = "font-types"
295
319
  version = "0.12.6"
@@ -363,16 +387,32 @@ checksum = "86aa776d6d32b072119e1f1650f4db843ff4382a4aaa6a2c9c4e35703cd377cb"
363
387
  dependencies = [
364
388
  "bitflags",
365
389
  "bytemuck",
366
- "read-fonts",
390
+ "read-fonts 0.45.0",
367
391
  "smallvec",
368
392
  ]
369
393
 
394
+ [[package]]
395
+ name = "hashbrown"
396
+ version = "0.17.1"
397
+ source = "registry+https://github.com/rust-lang/crates.io-index"
398
+ checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
399
+
370
400
  [[package]]
371
401
  name = "heck"
372
402
  version = "0.5.0"
373
403
  source = "registry+https://github.com/rust-lang/crates.io-index"
374
404
  checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
375
405
 
406
+ [[package]]
407
+ name = "indexmap"
408
+ version = "2.14.2"
409
+ source = "registry+https://github.com/rust-lang/crates.io-index"
410
+ checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
411
+ dependencies = [
412
+ "equivalent",
413
+ "hashbrown",
414
+ ]
415
+
376
416
  [[package]]
377
417
  name = "insta"
378
418
  version = "1.49.0"
@@ -400,6 +440,18 @@ version = "1.0.18"
400
440
  source = "registry+https://github.com/rust-lang/crates.io-index"
401
441
  checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
402
442
 
443
+ [[package]]
444
+ name = "kurbo"
445
+ version = "0.13.1"
446
+ source = "registry+https://github.com/rust-lang/crates.io-index"
447
+ checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2"
448
+ dependencies = [
449
+ "arrayvec",
450
+ "euclid",
451
+ "polycool",
452
+ "smallvec",
453
+ ]
454
+
403
455
  [[package]]
404
456
  name = "libc"
405
457
  version = "0.2.190"
@@ -484,6 +536,18 @@ dependencies = [
484
536
  "winapi",
485
537
  ]
486
538
 
539
+ [[package]]
540
+ name = "pdf-writer"
541
+ version = "0.15.0"
542
+ source = "registry+https://github.com/rust-lang/crates.io-index"
543
+ checksum = "f5e456864a7a304047bff84977dc6fb162bd956475d40ba50b2dcecaada7f753"
544
+ dependencies = [
545
+ "bitflags",
546
+ "itoa",
547
+ "memchr",
548
+ "ryu",
549
+ ]
550
+
487
551
  [[package]]
488
552
  name = "png"
489
553
  version = "0.18.1"
@@ -497,6 +561,15 @@ dependencies = [
497
561
  "miniz_oxide 0.8.9",
498
562
  ]
499
563
 
564
+ [[package]]
565
+ name = "polycool"
566
+ version = "0.4.0"
567
+ source = "registry+https://github.com/rust-lang/crates.io-index"
568
+ checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6"
569
+ dependencies = [
570
+ "arrayvec",
571
+ ]
572
+
500
573
  [[package]]
501
574
  name = "portable-atomic"
502
575
  version = "1.15.0"
@@ -662,6 +735,16 @@ dependencies = [
662
735
  "rand_core",
663
736
  ]
664
737
 
738
+ [[package]]
739
+ name = "read-fonts"
740
+ version = "0.39.2"
741
+ source = "registry+https://github.com/rust-lang/crates.io-index"
742
+ checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81"
743
+ dependencies = [
744
+ "bytemuck",
745
+ "font-types 0.11.3",
746
+ ]
747
+
665
748
  [[package]]
666
749
  name = "read-fonts"
667
750
  version = "0.45.0"
@@ -669,7 +752,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
669
752
  checksum = "8a5b7bed3d16ab428d8fa533640ab805ff50e7ad8a4d00649de1259e70023282"
670
753
  dependencies = [
671
754
  "bytemuck",
672
- "font-types",
755
+ "font-types 0.12.6",
673
756
  "once_cell",
674
757
  "yoke",
675
758
  ]
@@ -709,6 +792,12 @@ version = "0.20.0"
709
792
  source = "registry+https://github.com/rust-lang/crates.io-index"
710
793
  checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"
711
794
 
795
+ [[package]]
796
+ name = "rustc-hash"
797
+ version = "2.1.3"
798
+ source = "registry+https://github.com/rust-lang/crates.io-index"
799
+ checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
800
+
712
801
  [[package]]
713
802
  name = "rustix"
714
803
  version = "1.1.5"
@@ -734,6 +823,12 @@ dependencies = [
734
823
  "wait-timeout",
735
824
  ]
736
825
 
826
+ [[package]]
827
+ name = "ryu"
828
+ version = "1.0.23"
829
+ source = "registry+https://github.com/rust-lang/crates.io-index"
830
+ checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
831
+
737
832
  [[package]]
738
833
  name = "same-file"
739
834
  version = "1.0.6"
@@ -804,6 +899,16 @@ version = "2.7.0"
804
899
  source = "registry+https://github.com/rust-lang/crates.io-index"
805
900
  checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa"
806
901
 
902
+ [[package]]
903
+ name = "skrifa"
904
+ version = "0.42.1"
905
+ source = "registry+https://github.com/rust-lang/crates.io-index"
906
+ checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564"
907
+ dependencies = [
908
+ "bytemuck",
909
+ "read-fonts 0.39.2",
910
+ ]
911
+
807
912
  [[package]]
808
913
  name = "skrifa"
809
914
  version = "0.48.0"
@@ -811,7 +916,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
811
916
  checksum = "a5213b4825bac3587046330052d61bfac7bd3bd0d203c758d7c2ef726fcea034"
812
917
  dependencies = [
813
918
  "bytemuck",
814
- "read-fonts",
919
+ "read-fonts 0.45.0",
815
920
  ]
816
921
 
817
922
  [[package]]
@@ -841,6 +946,18 @@ version = "0.1.1"
841
946
  source = "registry+https://github.com/rust-lang/crates.io-index"
842
947
  checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731"
843
948
 
949
+ [[package]]
950
+ name = "subsetter"
951
+ version = "0.2.6"
952
+ source = "registry+https://github.com/rust-lang/crates.io-index"
953
+ checksum = "38803281d1c23166c5ebcb455439a5d2afe711cc909cf88af72448c297756ad6"
954
+ dependencies = [
955
+ "kurbo",
956
+ "rustc-hash",
957
+ "skrifa 0.42.1",
958
+ "write-fonts",
959
+ ]
960
+
844
961
  [[package]]
845
962
  name = "syn"
846
963
  version = "2.0.119"
@@ -956,24 +1073,27 @@ checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee"
956
1073
 
957
1074
  [[package]]
958
1075
  name = "umber-core"
959
- version = "0.3.2"
1076
+ version = "0.4.0"
960
1077
  dependencies = [
961
1078
  "criterion",
962
1079
  "fontdb",
963
1080
  "harfrust",
964
1081
  "insta",
1082
+ "miniz_oxide 0.8.9",
1083
+ "pdf-writer",
965
1084
  "png",
966
1085
  "proptest",
967
- "read-fonts",
1086
+ "read-fonts 0.45.0",
968
1087
  "roxmltree",
969
- "skrifa",
1088
+ "skrifa 0.48.0",
1089
+ "subsetter",
970
1090
  "thiserror",
971
1091
  "tiny-skia",
972
1092
  ]
973
1093
 
974
1094
  [[package]]
975
1095
  name = "umber-py"
976
- version = "0.3.2"
1096
+ version = "0.4.0"
977
1097
  dependencies = [
978
1098
  "pyo3",
979
1099
  "umber-core",
@@ -1077,6 +1197,19 @@ version = "0.46.0"
1077
1197
  source = "registry+https://github.com/rust-lang/crates.io-index"
1078
1198
  checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
1079
1199
 
1200
+ [[package]]
1201
+ name = "write-fonts"
1202
+ version = "0.48.1"
1203
+ source = "registry+https://github.com/rust-lang/crates.io-index"
1204
+ checksum = "cb731d4c4d93eacc69a1ad2f270f905788a98e4a3438267bcafbe08d3431c8d8"
1205
+ dependencies = [
1206
+ "font-types 0.11.3",
1207
+ "indexmap",
1208
+ "kurbo",
1209
+ "log",
1210
+ "read-fonts 0.39.2",
1211
+ ]
1212
+
1080
1213
  [[package]]
1081
1214
  name = "yoke"
1082
1215
  version = "0.8.3"
@@ -3,7 +3,7 @@ resolver = "3"
3
3
  members = ["crates/umber-core", "crates/umber-py"]
4
4
 
5
5
  [workspace.package]
6
- version = "0.3.2"
6
+ version = "0.4.0"
7
7
  edition = "2024"
8
8
  rust-version = "1.88"
9
9
  license = "MIT OR Apache-2.0"
@@ -18,3 +18,9 @@ pyo3 = { version = "0.29.3", features = ["abi3-py312", "abi3t-py315"] }
18
18
  unwrap_used = "deny"
19
19
  expect_used = "deny"
20
20
  panic = "deny"
21
+
22
+ # PyO3 needs unwinding panics, so `panic` stays at its default.
23
+ [profile.release]
24
+ lto = "fat"
25
+ codegen-units = 1
26
+ strip = "symbols"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: umber
3
- Version: 0.3.2
3
+ Version: 0.4.0
4
4
  Classifier: Development Status :: 3 - Alpha
5
5
  Classifier: Programming Language :: Python :: 3 :: Only
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -34,17 +34,18 @@ Project-URL: Source, https://github.com/TJ-Junhao/umber
34
34
 
35
35
  [![Coverage](https://codecov.io/gh/TJ-Junhao/umber/graph/badge.svg)](https://codecov.io/gh/TJ-Junhao/umber)
36
36
 
37
- umber is a plotting library for Python with a rendering core written in Rust. It draws line, step, scatter, area, stacked area, bar, histogram, box, violin, bubble, error bar, band, stem, reference-line, heatmap, mesh, 2-D histogram and hexbin charts on numeric, log, category and time axes, alone or on a grid of panels with shared axes. It has colormaps and colorbars, careful typography, three built-in themes, and PNG or SVG output.
37
+ umber is a plotting library for Python with a rendering core written in Rust. It draws line, step, scatter, area, stacked area, bar, histogram, ECDF, KDE, box, violin, strip, swarm, event, bubble, error bar, band, stem, reference-line, heatmap, mesh, contour, 2-D histogram, hexbin and pie charts on numeric, log, category and time axes, alone or on a grid of panels with shared axes, with a second y axis where needed. It has text and arrow annotations, colormaps and colorbars, careful typography with bundled or your own fonts, three built-in themes, and PNG, SVG or PDF output.
38
38
 
39
39
  [简体中文](https://github.com/TJ-Junhao/umber/blob/main/README-ZH.md)
40
40
 
41
- ![A line chart of daily temperature at two stations, in the Graphite theme](https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/lines-graphite.png)
41
+ ![Twelve kinds of chart drawn by umber on one grid: lines and bands, grouped bars, points colored by value, a donut, a histogram with a density curve, violins with swarms, contours, a heatmap, a time series with an annotation, two y axes, a hexbin and grouped ECDFs](https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/gallery.png)
42
42
 
43
- - **Fast on large data.** Rendering runs in Rust: a 1,000,000-point line renders to PNG in about 74 ms and a 100,000-point scatter in about 83 ms on a standard GitHub Actions runner, 2.8× and 3.5× faster than matplotlib (see [Performance](#performance)).
43
+ - **Fast on large data.** Rendering runs in Rust: a 1,000,000-point line renders to PNG in about 77 ms and to PDF in about 36 ms on a standard GitHub Actions runner, 2.7× and 4.5× faster than matplotlib (see [Performance](#performance)).
44
44
  - **Explicit.** Every option is a typed value (`Color`, `Size`, `Dash`, `TickFormat`, …). There are no format strings, no positional style arguments and no silent conversions.
45
45
  - **Fails fast, pointing at the problem.** Invalid input raises at the call that caused it, with a message, a hint and the offending argument highlighted in the traceback.
46
46
  - **Statically typed.** Category and numeric axes are distinct types: calling `bar` on a numeric axes is reported by pyright and mypy before the code runs.
47
- - **Bundled fonts.** Text in the bundled fonts' coverage looks the same on every machine; other characters fall back to system fonts.
47
+ - **Fonts that travel.** Text in the bundled fonts' coverage looks the same on every machine, and PDF output embeds the fonts it uses. Font files and installed families can be used too.
48
+ - **Ready for AI coding agents.** The package ships an Agent Skill that teaches coding agents the umber API of the installed version (see [Agent Skill](#agent-skill)).
48
49
 
49
50
  ## Installation
50
51
 
@@ -64,7 +65,7 @@ t = np.linspace(0, 10, 1_000)
64
65
  ub.line(t, np.sin(t), label="sin").title("A first chart").figure.save_png("chart.png")
65
66
  ```
66
67
 
67
- The quick functions `ub.line`, `ub.scatter`, `ub.bar` and `ub.hist` create a figure with one axes and return the axes, so the rest of the chart is built by chaining.
68
+ The quick functions `ub.line`, `ub.scatter`, `ub.bar`, `ub.hist` and `ub.pie` create a figure with one axes and return the axes, so the rest of the chart is built by chaining.
68
69
 
69
70
  ## Building a figure
70
71
 
@@ -86,21 +87,27 @@ ax.line(days, south, label="South", dash=ub.Dash.DASHED)
86
87
 
87
88
  fig.save_png("temperature.png", dpi=200)
88
89
  fig.save_svg("temperature.svg")
90
+ fig.save_pdf("temperature.pdf")
89
91
  ```
90
92
 
91
- This is the chart at the top of this page. Data can be a list, a tuple, a NumPy array, or a pandas or polars Series. Missing values (`NaN`, or nulls in nullable pandas and polars columns) leave a gap.
93
+ ![A line chart of daily temperature at two stations, in the Graphite theme](https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/lines-graphite.png)
94
+
95
+ Data can be a list, a tuple, a NumPy array, or a pandas or polars Series. Missing values (`NaN`, or nulls in nullable pandas and polars columns) leave a gap.
92
96
 
93
97
  | Chart | Method |
94
98
  | --- | --- |
95
99
  | Line | `ax.line(x, y)` |
96
100
  | Scatter | `ax.scatter(x, y, marker=ub.Marker.TRIANGLE, size=ub.Size.times(1.5))` |
97
101
  | Area | `ax.area(x, y)` |
98
- | Bar, grouped, stacked | `ax.bar(categories, heights)`, `ax.grouped_bar(categories, series)`, `ax.stacked_bar(categories, series)` |
99
- | Histogram | `ax.hist(values, bins=30)` |
102
+ | Bar, grouped, stacked | `ax.bar(categories, heights)`, `ax.grouped_bar(categories, series)`, `ax.stacked_bar(categories, series)`; `annotate=True` writes the values on the bars |
103
+ | Histogram | `ax.hist(values, bins=30)`; `style=ub.Hist.STEP`, `stat=ub.Stat.DENSITY` or `ub.Stat.FRACTION`, `cumulative=True` |
104
+ | ECDF, KDE | `ax.ecdf(values)`, `ax.kde(values)` |
100
105
  | Step | `ax.step(x, y, where=ub.Step.MID)` |
101
106
  | Stacked area | `ax.stacked_area(x, [ub.Series("A", a), ub.Series("B", b)])` |
102
107
  | Box, grouped | `ax.box(categories, groups)`, `ax.grouped_box(categories, [ub.Distribution("A", groups)])` |
103
108
  | Violin, grouped | `ax.violin(categories, groups)`, `ax.grouped_violin(categories, distributions)` |
109
+ | Strip, swarm | `ax.strip(categories, groups)`, `ax.swarm(categories, groups)` |
110
+ | Events | `ax.events(rows, positions)` |
104
111
  | Bubbles | `ax.bubbles(x, y, sizes, label="Cities")` (adds a size legend) |
105
112
  | Error bars | `ax.y_error_bars(x, low, high)`, `ax.x_error_bars(y, low, high)` |
106
113
  | Band | `ax.band(x, low, high)` |
@@ -108,10 +115,13 @@ This is the chart at the top of this page. Data can be a list, a tuple, a NumPy
108
115
  | Reference lines and spans | `ax.hline(y)`, `ax.vline(x)`, `ax.hspan(low, high)`, `ax.vspan(low, high)` |
109
116
  | Heatmap | `ax.heatmap(x_categories, y_categories, values, annotate=True)` |
110
117
  | Mesh | `ax.mesh(x_edges, y_edges, values)` |
118
+ | Contour | `ax.contour(x, y, z, style=ub.Contour.FILLED)`; `Contour.LINES` (default) or `Contour.BOTH` |
111
119
  | 2-D histogram, hexbin | `ax.hist2d(x, y, bins=40)`, `ax.hexbin(x, y, gridsize=30)` |
112
120
  | Color-mapped points | `ax.scatter(x, y, color=ub.ColorBy(values))` |
121
+ | Pie, donut | `ub.pie(categories, values, hole=0.5, annotate=True)` or `fig.add_pie_axes().pie(...)` |
122
+ | Text, annotations | `ax.text("Note", (x, y))`, `ax.annotate("Peak", (x, y), offset=(24, 12))` |
113
123
 
114
- Bar, box and violin charts need a category axis. On a category x axis, `fig.add_axes(x=ub.Scale.category())`, they are vertical; on a category y axis, `fig.add_axes(y=ub.Scale.category())`, they are horizontal, and a scatter of values against categories is a dot plot. A heatmap needs category axes on both sides. Automatic category labels start at 0 and use the smallest step in 1, 2, 5, 10, 20, 50, ... that keeps neighbouring labels apart by the same minimum gap as numeric ticks; shared axes show the same labels. Category 0 is always labelled, so a first label wider than the available room still causes a tick-label error. Log axes use `ub.Scale.log()` and time axes `ub.Scale.time()`. Limits, ticks and tick label formats are set with `xlim`, `ylim`, `xticks`, `xticks_labeled`, `ytick_format(ub.TickFormat.percent())` and their counterparts on the other axis.
124
+ Bar, box, violin, strip and swarm charts need a category axis. On a category x axis, `fig.add_axes(x=ub.Scale.category())`, they are vertical; on a category y axis, `fig.add_axes(y=ub.Scale.category())`, they are horizontal, and a scatter of values against categories is a dot plot. Events are drawn in rows on a category y axis. A heatmap needs category axes on both sides. Automatic category labels start at 0 and use the smallest step in 1, 2, 5, 10, 20, 50, ... that keeps neighbouring labels apart by the same minimum gap as numeric ticks; shared axes show the same labels. Category 0 is always labelled, so a first label wider than the available room still causes a tick-label error. Log axes use `ub.Scale.log()` and time axes `ub.Scale.time()`. Limits, ticks and tick label formats are set with `xlim`, `ylim`, `xticks`, `xticks_labeled`, `ytick_format(ub.TickFormat.percent())` and their counterparts on the other axis.
115
125
 
116
126
  Bars, histograms, areas and stems draw a baseline at zero (or at the lower edge when zero is out of range); other charts draw none. Override this for each axes with `ax.baseline(shown=True)` or `ax.baseline(shown=False)`; `ax.baseline(shown=ub.AUTO)` restores the default.
117
127
 
@@ -122,6 +132,27 @@ Automatic limits contain whole bubble markers, outlines included; explicit limit
122
132
  <img alt="A histogram with a gradient fill in the Pigment theme" src="https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/histogram-pigment.png" width="49%">
123
133
  </p>
124
134
 
135
+ ## Long-form data
136
+
137
+ Data in long form, one row per observation with a column naming its group, is drawn with `by=`. `line`, `step`, `scatter`, `area`, `ecdf`, `kde`, `hist` and `bar` take it: each group becomes one series, named after the group and colored in the order the groups first appear.
138
+
139
+ ```python
140
+ import pandas as pd
141
+ import umber as ub
142
+
143
+ df = pd.DataFrame(
144
+ {
145
+ "day": [1, 2, 3, 1, 2, 3],
146
+ "temp": [12.0, 14.5, 13.0, 9.0, 10.5, 11.0],
147
+ "station": ["North", "North", "North", "South", "South", "South"],
148
+ }
149
+ )
150
+ ax = ub.Figure().add_axes()
151
+ ax.line(df["day"], df["temp"], by=df["station"])
152
+ ```
153
+
154
+ Columns are passed as data, not as column names, and work the same from pandas, polars, NumPy or lists; umber does not read a column's name. With `by=`, every group takes its own label and color, so `label=` and `color=` are refused. Histograms need `style=ub.Hist.STEP` or `style=ub.Hist.STACKED`, and `bar(categories, heights, by=groups)` draws grouped bars.
155
+
125
156
  ## Grids and shared axes
126
157
 
127
158
  `Figure(rows=2, cols=2)` declares a grid. Its default `width=ub.AUTO` and `height=ub.AUTO` give each column 6 inches and each row 4 inches; an explicit size is for the whole figure. Add panels by their zero-based top-left cell:
@@ -149,7 +180,7 @@ Use `fig.axes_at(row=..., col=..., x=..., y=...)` to retrieve axes, including th
149
180
 
150
181
  ## Colors and colorbars
151
182
 
152
- Heatmaps, meshes, 2-D histograms and hexbins color each cell by its value, and `color=ub.ColorBy(values)` does the same for the points of a scatter or bubble chart. The color-mapped marks of one axes share a single color scale, and a colorbar beside the plot explains it. From 10,000 cells, heatmaps, meshes and 2-D histograms draw their cells as one image with one pixel per cell instead of one shape per cell, which keeps large grids small and fast; `render=ub.Render.VECTOR` or `render=ub.Render.RASTER` chooses the form explicitly.
183
+ Heatmaps, meshes, contours, 2-D histograms and hexbins color each cell, band or line by its value, and `color=ub.ColorBy(values)` does the same for the points of a scatter or bubble chart. The color-mapped marks of one axes share a single color scale, and a colorbar beside the plot explains it. From 10,000 cells, heatmaps, meshes and 2-D histograms draw their cells as one image with one pixel per cell instead of one shape per cell, which keeps large grids small and fast; `render=ub.Render.VECTOR` or `render=ub.Render.RASTER` chooses the form explicitly.
153
184
 
154
185
  ```python
155
186
  import numpy as np
@@ -173,6 +204,40 @@ ax.figure.save_png("density.png")
173
204
  <img alt="Hexagonal point counts on a log color scale in the Midnight theme" src="https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/hexbin-midnight.png" width="49%">
174
205
  </p>
175
206
 
207
+ ## Contours
208
+
209
+ `ax.contour(x, y, z)` draws level lines of a field sampled on a grid, with `z` shaped `(len(y), len(x))`. `style=ub.Contour.FILLED` fills the bands between levels and `Contour.BOTH` draws both; `levels=` takes a count or the levels themselves, and `annotate=True` writes each level on its lines. Contours share the axes' color scale like the other color-mapped marks, and the colorbar shows the levels.
210
+
211
+ ```python
212
+ import numpy as np
213
+ import umber as ub
214
+
215
+ x = np.linspace(-3, 3, 121)
216
+ y = np.linspace(-2, 2, 81)
217
+ z = np.exp(-((x[None, :] - 1) ** 2) - (y[:, None] - 0.4) ** 2)
218
+
219
+ ax = ub.Figure(theme=ub.Theme.GRAPHITE).add_axes()
220
+ ax.contour(x, y, z, style=ub.Contour.BOTH, annotate=True).colorbar("km")
221
+ ax.figure.save_png("elevation.png")
222
+ ```
223
+
224
+ ## Pie and donut charts
225
+
226
+ `ub.pie(categories, values)` draws a pie on its own panel; on a grid, `fig.add_pie_axes(row=..., col=...)` adds a pie panel. Slices start at twelve o'clock and run clockwise in input order. `hole=0.55` makes a donut, `annotate=True` writes each share under its name, and names that do not fit inside a slice move outside with a leader line. A pie labels its slices directly; `ax.legend(ub.LegendStyle.HEADER)` uses a legend instead.
227
+
228
+ ```python
229
+ import umber as ub
230
+
231
+ channels = ["Search", "Direct", "Social", "Email", "Other"]
232
+ ax = ub.pie(channels, [41, 24, 17, 11, 7], hole=0.55, annotate=True).title("Visits by channel")
233
+ ax.figure.save_png("channels.png")
234
+ ```
235
+
236
+ <p>
237
+ <img alt="A filled elevation map with labelled level lines in the Graphite theme" src="https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/contour-graphite.png" width="49%">
238
+ <img alt="An annotated donut chart of visits by channel in the Pigment theme" src="https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/pie-pigment.png" width="49%">
239
+ </p>
240
+
176
241
  ## Time axes
177
242
 
178
243
  `ub.Scale.time()` makes a time axis. It takes `datetime`, `date` and `numpy.datetime64` values, NumPy `datetime64` arrays of any unit, and naive pandas and polars datetime columns:
@@ -194,9 +259,48 @@ Ticks fall on calendar steps, such as months, days or hours, with concise labels
194
259
 
195
260
  ![A week of hourly demand with its range and a maintenance window, in the Pigment theme](https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/time-pigment.png)
196
261
 
262
+ ## A second y axis
263
+
264
+ `ax.twin_y()` adds a numeric y axis on the right that shares the panel's x axis, and returns the axes for it. The two y axes have their own scales, limits, ticks and labels; the marks of both share one palette and one legend. `fig.twin_axes_at(row=..., col=...)` retrieves the right axes later.
265
+
266
+ ```python
267
+ import umber as ub
268
+
269
+ months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun"]
270
+ left = ub.Figure().add_axes(x=ub.Scale.category())
271
+ left.bar(months, [52, 48, 55, 61, 72, 84], label="Rainfall").ylabel("mm")
272
+ left.twin_y().line(months, [4, 5, 9, 13, 18, 22], label="Temperature").ylabel("°C")
273
+ left.figure.save_png("weather.png")
274
+ ```
275
+
276
+ ## Text and annotations
277
+
278
+ `ax.text(text, (x, y))` writes text at a data position, and `ax.annotate(text, (x, y), offset=(dx, dy))` writes it a distance away in points, with an arrow to the position unless `arrow=False`. Positions use each axis' own values: numbers, times, or category names. Text and annotations never change the axis limits. `"\n"` breaks them into lines: the first line sits where a single line would, and the others follow below it.
279
+
280
+ `annotate=True` on `bar`, `grouped_bar` and `stacked_bar` writes each bar's value; automatic limits grow so that every value fits, and `format=` chooses how values are written. With explicit limits, a value that does not fit raises `StyleError` naming the bar.
281
+
282
+ ```python
283
+ import numpy as np
284
+ import umber as ub
285
+
286
+ days = np.datetime64("2026-03-01") + np.arange(8)
287
+ load = [21, 22, 24, 33, 25, 23, 15, 20]
288
+
289
+ ax = ub.Figure().add_axes(x=ub.Scale.time())
290
+ ax.line(days, load).hline(30.0, dash=ub.Dash.DASHED).ylim(10, 40)
291
+ ax.annotate("Release", (days[3], 33.0), offset=(28, 14))
292
+ ax.annotate("Outage", (days[6], 15.0), offset=(22, -20))
293
+ ax.text("Target", (days[0], 32.0), color=ub.Color.GRAY)
294
+ ```
295
+
296
+ <p>
297
+ <img alt="Monthly rainfall bars and a temperature line on a second y axis in the Midnight theme" src="https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/twin-midnight.png" width="49%">
298
+ <img alt="A time series with an annotated release peak, an outage dip and a dashed target line in the Pigment theme" src="https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/annotations-pigment.png" width="49%">
299
+ </p>
300
+
197
301
  ## Titles and legends
198
302
 
199
- `fig.title(text)` and `fig.subtitle(text)` set text above the whole grid; `ax.title(text)` and `ax.subtitle(text)` belong to one panel. Each returns the same object for chaining, and an empty string removes the text. The figure title is 1.5 times the panel title size.
303
+ `fig.title(text)` and `fig.subtitle(text)` set text above the whole grid; `ax.title(text)` and `ax.subtitle(text)` belong to one panel. Each returns the same object for chaining, and an empty string removes the text. The figure title is 1.5 times the panel title size. `"\n"` breaks a title or subtitle into lines, each aligned like the title; other labels are one line, and text with a line break or another control character where it is not supported raises an error at the call. A title, subtitle or axis label wider than its room raises `StyleError` when the figure is rendered, with the width it needs; make the figure wider or lower the font scale.
200
304
 
201
305
  `Theme.with_title_align(ub.Align.LEFT)` sets title alignment; `CENTER` and `RIGHT` are also available. Subtitles follow their title. On a multi-panel figure, the merged legend stays below the figure title and subtitle and follows their alignment, without a separate position setting. To place legends by panel, use `Legend.PER_PANEL`.
202
306
 
@@ -214,6 +318,15 @@ ax.legend(ub.LegendStyle.HEADER, position=ub.AUTO) # back to the theme's BOTTOM
214
318
 
215
319
  For single-panel figures and `Legend.PER_PANEL`, `LegendPosition.TOP_LEFT` (default) and `TOP_RIGHT` place a row below the panel title; `RIGHT` places a column beside the plot; `BOTTOM` places a row below the x axis title; `BEST` places the legend inside the plot where it covers the least data. Panel legend positions do not follow title alignment. Omitting `position`, or passing `ub.AUTO`, clears a previous override and uses the theme's position; it does not mean `BEST`. `LegendStyle.DIRECT` accepts only the default `position=ub.AUTO`, since its labels sit at line ends. `LegendStyle.NONE` hides the legend.
216
320
 
321
+ Titles, subtitles, axis labels, legends, colorbar labels, text, annotations, bar values and pie labels take `size=`. `ub.Size.AUTO` is the theme's size, `ub.Size.times(1.5)` scales it and follows the theme's font scale, and `ub.Size.pt(14)` is a fixed size in points. Tick labels are sized per axis with `ax.xtick_labels(size=...)` and `ax.ytick_labels(size=...)`.
322
+
323
+ ```python
324
+ import umber as ub
325
+
326
+ ax = ub.line([0, 1, 2], [1, 3, 2]).title("Headline", size=ub.Size.pt(18))
327
+ ax.xlabel("Day", size=ub.Size.times(1.2)).ytick_labels(size=ub.Size.pt(7))
328
+ ```
329
+
217
330
  ## Themes
218
331
 
219
332
  Three themes are built in: `Theme.PIGMENT` (warm paper, serif titles), `Theme.GRAPHITE` (neutral, sans-serif) and `Theme.MIDNIGHT` (dark, monospaced figures). A theme is an immutable value; derive a variant with its `with_*` methods:
@@ -229,6 +342,30 @@ fig = ub.Figure(theme=theme)
229
342
 
230
343
  ![Two sine waves in the Midnight theme](https://raw.githubusercontent.com/TJ-Junhao/umber/main/assets/readme/lines-midnight.png)
231
344
 
345
+ ## Fonts
346
+
347
+ Each theme has a title font and a body font. Five fonts are bundled: `Font.SOURCE_SERIF_4`, `Font.IBM_PLEX_SANS`, `Font.GEIST`, `Font.INTER` and `Font.JETBRAINS_MONO`. `Font.from_file(regular, bold=...)` reads TrueType or OpenType files, and `Font.system(family)` finds an installed family by name:
348
+
349
+ ```python
350
+ import umber as ub
351
+
352
+ serif = ub.Theme.PIGMENT.with_title_font(ub.Font.SOURCE_SERIF_4).with_body_font(ub.Font.INTER)
353
+ fig = ub.Figure(theme=serif)
354
+
355
+ # font = ub.Font.from_file("Brand-Regular.ttf", bold="Brand-Bold.ttf")
356
+ # font = ub.Font.system("Helvetica Neue")
357
+ ```
358
+
359
+ Titles and direct legend labels are set in bold. A font without a bold face raises `StyleError` when such text is drawn, unless it was created with `bold_fallback=True`, which sets that text in the regular face; umber never synthesizes bold. A font is read once and kept in memory, so the figure does not change if the file does. Characters a font lacks fall back to the bundled fonts, then to system fonts.
360
+
361
+ ## Output
362
+
363
+ `fig.save_png(path, dpi=...)`, `fig.save_svg(path)` and `fig.save_pdf(path)` write a file; `to_png()`, `to_svg()` and `to_pdf()` return the bytes or text instead. PNG output is antialiased at the chosen resolution. SVG text is drawn as outlines by default, so it looks the same everywhere; `text=ub.SvgText.EDITABLE` keeps it as text, which the viewer then draws with its own copy of the font. PDF output is vector, one page at the figure's size, with the fonts it uses embedded as subsets, so its text can be selected and searched; large cell grids stay images, as in SVG.
364
+
365
+ ### Jupyter and `show()`
366
+
367
+ A figure or axes at the end of a Jupyter cell displays the whole figure as a PNG. Use `fig.show()` or `ax.show()` to display it explicitly. Both render at 144 dpi and display at 72 CSS pixels per inch (a 6 × 4 in figure is 432 × 288 CSS pixels). Outside a Jupyter kernel, including terminal IPython, `show()` opens a PNG in the system's default viewer without waiting for it to close; the file is left in a fresh temporary directory. If no viewer can be started, `UsageError` names the saved file. Rendering errors propagate, and IPython is optional.
368
+
232
369
  ## Errors
233
370
 
234
371
  An error is raised by the call that caused it: `umber.DataError` for invalid data, `umber.StyleError` for an invalid option value, `umber.UsageError` for a call that is not allowed in the current state, and `TypeError` for a value of the wrong type. The three umber errors derive from `umber.UmberError`. The traceback points at the argument:
@@ -266,28 +403,42 @@ ax.bar(["a", "b"], [1, 2]) # pyright and mypy: bar() needs Axes[str, float]
266
403
 
267
404
  ## Performance
268
405
 
269
- End-to-end Python timings next to matplotlib 3.11.2 (Agg backend, default style), from the call that builds the figure to the encoded bytes. Figures are 6 × 4 in, PNG at 200 dpi, with the same input data for both. Each value is the median of 8 runs after a warm-up, with each library in its own process. Measured with umber 0.3.2 on GitHub Actions `ubuntu-latest` (AMD EPYC 9V74, 4 vCPUs, Python 3.12, NumPy 2.5) by the [Python bench workflow](https://github.com/TJ-Junhao/umber/actions/workflows/python-bench.yml) ([this run](https://github.com/TJ-Junhao/umber/actions/runs/39101279625)); the script is `scripts/bench/python_vs_matplotlib.py`. GitHub assigns different CPU models to the same runner label, so absolute times vary between runs; the speed-ups, measured side by side on one machine, are the figures to compare.
406
+ End-to-end Python timings next to matplotlib 3.11.2 (Agg, SVG and PDF backends, default style), from the call that builds the figure to the encoded bytes. Figures are 6 × 4 in, PNG at 200 dpi, with the same input data for both. Each value is the median of 8 runs after a warm-up, with each library in its own process. Measured with the umber 0.4.0 source on GitHub Actions `ubuntu-latest` (AMD EPYC 9V74, 4 vCPUs, Python 3.12, NumPy 2.5) by the [Python bench workflow](https://github.com/TJ-Junhao/umber/actions/workflows/python-bench.yml) ([this run](https://github.com/TJ-Junhao/umber/actions/runs/39202691191)); the script is `scripts/bench/python_vs_matplotlib.py`. GitHub assigns different CPU models to the same runner label, so absolute times vary between runs; the speed-ups, measured side by side on one machine, are the figures to compare.
270
407
 
271
408
  | Case | umber | matplotlib | Speed-up |
272
409
  | --- | ---: | ---: | ---: |
273
- | 1,000,000-point line → PNG | 74 ms | 205 ms | 2.8× |
274
- | 1,000,000-point line on a time axis → PNG | 91 ms | 220 ms | 2.4× |
275
- | 1,000,000-point line → SVG | 24 ms | 65 ms | 2.7× |
276
- | 100,000-point scatter → PNG | 83 ms | 291 ms | 3.5× |
277
- | Histogram of 1,000,000 values → PNG | 32 ms | 64 ms | 2.0× |
278
- | 2-D histogram of 1,000,000 points, 100 × 100 bins → PNG | 100 ms | 168 ms | 1.7× |
279
- | Hexbin of 1,000,000 points, grid size 50 → PNG | 127 ms | 141 ms | 1.1× |
280
- | Heatmap of 1,000 × 1,000 cells → PNG | 194 ms | 252 ms | 1.3× |
281
- | Heatmap of 1,000 × 1,000 cells → SVG | 175 ms | 443 ms | 2.5× |
282
- | 4 × 5 grid, one 10,000-point line per panel → PNG | 180 ms | 552 ms | 3.1× |
283
- | 1,000-point line with a second series, title, labels and legend → PNG | 22 ms | 81 ms | 3.7× |
284
- | 5-bar chart → PNG | 12 ms | 44 ms | 3.6× |
285
- | `import` in a fresh interpreter | 66 ms | 310 ms | 4.7× |
286
-
287
- Pinned to one CPU, only the scatter plot is notably slower: 125 ms (2.3×). The 4 × 5 grid uses a 12 × 8 in figure. The script's docstring lists where the two libraries do different work, for example the hexbin grids, which are built differently.
410
+ | 1,000,000-point line → PNG | 77 ms | 207 ms | 2.7× |
411
+ | 1,000,000-point line on a time axis → PNG | 94 ms | 221 ms | 2.4× |
412
+ | 1,000,000-point line → SVG | 29 ms | 65 ms | 2.2× |
413
+ | 1,000,000-point line → PDF | 36 ms | 164 ms | 4.5× |
414
+ | 100,000-point scatter → PNG | 83 ms | 290 ms | 3.5× |
415
+ | Histogram of 1,000,000 values → PNG | 32 ms | 63 ms | 2.0× |
416
+ | 2-D histogram of 1,000,000 points, 100 × 100 bins → PNG | 97 ms | 168 ms | 1.7× |
417
+ | Hexbin of 1,000,000 points, grid size 50 → PNG | 122 ms | 142 ms | 1.2× |
418
+ | Heatmap of 1,000 × 1,000 cells → PNG | 189 ms | 253 ms | 1.3× |
419
+ | Heatmap of 1,000 × 1,000 cells → SVG | 171 ms | 443 ms | 2.6× |
420
+ | Heatmap of 1,000 × 1,000 cells → PDF | 141 ms | 178 ms | 1.3× |
421
+ | 4 × 5 grid, one 10,000-point line per panel → PNG | 175 ms | 550 ms | 3.1× |
422
+ | 1,000-point line with a second series, title, labels and legend → PNG | 21 ms | 81 ms | 3.9× |
423
+ | The same 1,000-point line chart → PDF | 3.6 ms | 128 ms | 36× |
424
+ | 5-bar chart → PNG | 12 ms | 44 ms | 3.8× |
425
+ | `import` in a fresh interpreter | 70 ms | 309 ms | 4.4× |
426
+
427
+ Pinned to one CPU, only the scatter plot is notably slower: 124 ms (2.3×). The 4 × 5 grid uses a 12 × 8 in figure. The script's docstring lists where the two libraries do different work, for example the hexbin grids, which are built differently. The PDF heatmap is larger than matplotlib's, 1.45 MB against 0.91 MB: umber computes the exact color of every cell, while matplotlib picks each cell's color from a 256-entry colormap table, which compresses better.
288
428
 
289
429
  Lines with sorted numeric or time x values are downsampled when they have more than four points per pixel column of the plot (counted at a nominal 300 dpi), keeping the first, last, minimum and maximum point in each column, which is visually lossless. Large scatter plots are composited on up to 8 threads; the output is the same for any number of threads.
290
430
 
431
+ ## Agent Skill
432
+
433
+ The package includes an Agent Skill for coding agents: a guide to choosing charts and to umber's idioms, a translation table from matplotlib, the error classes and how to fix them, and an API reference generated from the installed version. Install it into a project for one or more agents:
434
+
435
+ ```sh
436
+ python -m umber skill install --agent claude-code
437
+ python -m umber skill install --agent codex --agent cursor --user
438
+ ```
439
+
440
+ `--agent` is one of `claude-code`, `codex`, `cursor` and `pi`; without `--user` the skill goes into the current project, with it into your home directory. `python -m umber skill uninstall` with the same options removes it. Install it again after upgrading umber, so that the reference matches the installed version.
441
+
291
442
  ## Rust
292
443
 
293
444
  The rendering core is published as the [`umber-core`](https://crates.io/crates/umber-core) crate and can be used directly from Rust:
@@ -305,7 +456,7 @@ std::fs::write("signal.png", figure.to_png(144)?)?;
305
456
 
306
457
  ## Status
307
458
 
308
- umber is at version 0.x. The API is not yet stable and may change or be removed without a deprecation period. More examples are in [`examples/`](https://github.com/TJ-Junhao/umber/tree/main/examples).
459
+ umber is at version 0.x. The API is not yet stable and may change or be removed without a deprecation period. More examples are in [`examples/`](https://github.com/TJ-Junhao/umber/tree/main/examples). Changes in each version are listed in the [release notes](https://github.com/TJ-Junhao/umber/releases).
309
460
 
310
461
  ## License
311
462