plotlet 0.5.0__tar.gz → 0.6.4__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 (302) hide show
  1. plotlet-0.6.4/PKG-INFO +72 -0
  2. plotlet-0.6.4/README.md +35 -0
  3. {plotlet-0.5.0 → plotlet-0.6.4}/pyproject.toml +18 -4
  4. plotlet-0.6.4/src/plotlet/__init__.py +76 -0
  5. plotlet-0.6.4/src/plotlet/_coord_registry.py +55 -0
  6. plotlet-0.6.4/src/plotlet/_datasets/anscombe.csv +45 -0
  7. plotlet-0.6.4/src/plotlet/_datasets/earth.npz +0 -0
  8. plotlet-0.6.4/src/plotlet/_datasets/flights.csv +145 -0
  9. plotlet-0.6.4/src/plotlet/_datasets/tips.csv +245 -0
  10. plotlet-0.6.4/src/plotlet/_json_layer.py +179 -0
  11. plotlet-0.6.4/src/plotlet/_regions.py +147 -0
  12. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/_spec.py +42 -0
  13. plotlet-0.6.4/src/plotlet/_splits.py +105 -0
  14. plotlet-0.6.4/src/plotlet/_tree.py +113 -0
  15. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/__init__.py +11 -4
  16. plotlet-0.6.4/src/plotlet/artists/_marching.py +140 -0
  17. plotlet-0.6.4/src/plotlet/artists/_shared.py +354 -0
  18. plotlet-0.6.4/src/plotlet/artists/annotation_strip.py +742 -0
  19. plotlet-0.6.4/src/plotlet/artists/bar.py +496 -0
  20. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/boxplot.py +126 -94
  21. plotlet-0.6.4/src/plotlet/artists/chord_links.py +182 -0
  22. plotlet-0.6.4/src/plotlet/artists/chord_ribbon.py +282 -0
  23. plotlet-0.6.4/src/plotlet/artists/contour.py +165 -0
  24. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/dendrogram.py +91 -41
  25. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/density_1d.py +35 -47
  26. plotlet-0.6.4/src/plotlet/artists/ecdf.py +135 -0
  27. plotlet-0.6.4/src/plotlet/artists/errorbar.py +266 -0
  28. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/fills.py +39 -55
  29. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/freqpoly.py +28 -38
  30. plotlet-0.6.4/src/plotlet/artists/heatmap.py +779 -0
  31. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/hexbin.py +55 -21
  32. plotlet-0.6.4/src/plotlet/artists/hist.py +368 -0
  33. plotlet-0.6.4/src/plotlet/artists/hist2d.py +180 -0
  34. plotlet-0.6.4/src/plotlet/artists/image_cmap.py +323 -0
  35. plotlet-0.6.4/src/plotlet/artists/image_rgba.py +236 -0
  36. plotlet-0.6.4/src/plotlet/artists/kde_2d.py +230 -0
  37. plotlet-0.6.4/src/plotlet/artists/line.py +311 -0
  38. plotlet-0.6.4/src/plotlet/artists/numeric_bar.py +85 -0
  39. plotlet-0.6.4/src/plotlet/artists/pointplot.py +142 -0
  40. plotlet-0.6.4/src/plotlet/artists/qq.py +163 -0
  41. plotlet-0.6.4/src/plotlet/artists/references.py +371 -0
  42. plotlet-0.6.4/src/plotlet/artists/regression.py +448 -0
  43. plotlet-0.6.4/src/plotlet/artists/ridge.py +143 -0
  44. plotlet-0.6.4/src/plotlet/artists/rug.py +134 -0
  45. plotlet-0.6.4/src/plotlet/artists/scatter.py +498 -0
  46. plotlet-0.6.4/src/plotlet/artists/shapes.py +188 -0
  47. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/strip.py +59 -36
  48. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/swarm.py +61 -36
  49. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/text.py +97 -63
  50. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/artists/violin.py +65 -47
  51. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/cluster.py +60 -66
  52. plotlet-0.6.4/src/plotlet/datasets.py +119 -0
  53. plotlet-0.6.4/src/plotlet/docs/AI_ATTRS.md +170 -0
  54. plotlet-0.6.4/src/plotlet/docs/API.md +455 -0
  55. plotlet-0.6.4/src/plotlet/docs/ARCHITECTURE.md +201 -0
  56. plotlet-0.6.4/src/plotlet/docs/COORDINATES.md +203 -0
  57. plotlet-0.6.4/src/plotlet/docs/EXTENDING.md +271 -0
  58. plotlet-0.6.4/src/plotlet/docs/PHILOSOPHY.md +125 -0
  59. plotlet-0.6.4/src/plotlet/docs/SUBPLOTS.md +136 -0
  60. plotlet-0.6.4/src/plotlet/docs/THEMES.md +124 -0
  61. plotlet-0.6.4/src/plotlet/draw/__init__.py +47 -0
  62. plotlet-0.6.4/src/plotlet/draw/_css_colors.py +159 -0
  63. plotlet-0.6.4/src/plotlet/draw/_png.py +121 -0
  64. plotlet-0.6.4/src/plotlet/draw/_raster.py +193 -0
  65. plotlet-0.6.4/src/plotlet/draw/_simplify.py +100 -0
  66. plotlet-0.6.4/src/plotlet/draw/colormaps.py +245 -0
  67. plotlet-0.6.4/src/plotlet/draw/colors.py +172 -0
  68. plotlet-0.6.4/src/plotlet/draw/font.py +352 -0
  69. plotlet-0.6.4/src/plotlet/draw/fonts/Arimo-Bold.ttf +0 -0
  70. plotlet-0.6.4/src/plotlet/draw/fonts/Arimo-BoldItalic.ttf +0 -0
  71. plotlet-0.6.4/src/plotlet/draw/fonts/Arimo-Italic.ttf +0 -0
  72. plotlet-0.6.4/src/plotlet/draw/fonts/Arimo-Regular.ttf +0 -0
  73. plotlet-0.6.4/src/plotlet/draw/fonts/DejaVuSans-Bold.ttf +0 -0
  74. plotlet-0.6.4/src/plotlet/draw/fonts/DejaVuSans-BoldOblique.ttf +0 -0
  75. plotlet-0.6.4/src/plotlet/draw/fonts/DejaVuSans-Oblique.ttf +0 -0
  76. plotlet-0.6.4/src/plotlet/draw/fonts/LICENSE-Arimo.txt +93 -0
  77. plotlet-0.6.4/src/plotlet/draw/fonts/LICENSE-DejaVuSans.txt +99 -0
  78. plotlet-0.6.4/src/plotlet/draw/format.py +34 -0
  79. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/draw/primitives.py +251 -73
  80. plotlet-0.6.4/src/plotlet/examples/01_scatter.py +24 -0
  81. plotlet-0.6.4/src/plotlet/examples/02_line.py +16 -0
  82. plotlet-0.6.4/src/plotlet/examples/03_bar.py +20 -0
  83. plotlet-0.6.4/src/plotlet/examples/04_violin.py +21 -0
  84. plotlet-0.6.4/src/plotlet/examples/05_anscombe.py +24 -0
  85. plotlet-0.6.4/src/plotlet/examples/06_heatmap.py +22 -0
  86. plotlet-0.6.4/src/plotlet/examples/07_annotated_heatmap.py +39 -0
  87. plotlet-0.6.4/src/plotlet/examples/08_tracks.py +41 -0
  88. plotlet-0.6.4/src/plotlet/examples/09_circular.py +17 -0
  89. plotlet-0.6.4/src/plotlet/examples/10_chord.py +30 -0
  90. plotlet-0.6.4/src/plotlet/examples/12_hist.py +19 -0
  91. plotlet-0.6.4/src/plotlet/examples/13_ecdf.py +14 -0
  92. plotlet-0.6.4/src/plotlet/examples/14_box_strip.py +17 -0
  93. plotlet-0.6.4/src/plotlet/examples/15_swarm.py +15 -0
  94. plotlet-0.6.4/src/plotlet/examples/16_pointplot.py +26 -0
  95. plotlet-0.6.4/src/plotlet/examples/17_ridge.py +23 -0
  96. plotlet-0.6.4/src/plotlet/examples/18_qq.py +20 -0
  97. plotlet-0.6.4/src/plotlet/examples/19_hexbin.py +20 -0
  98. plotlet-0.6.4/src/plotlet/examples/20_kde_2d.py +23 -0
  99. plotlet-0.6.4/src/plotlet/examples/21_image_cmap.py +19 -0
  100. plotlet-0.6.4/src/plotlet/examples/22_facets.py +21 -0
  101. plotlet-0.6.4/src/plotlet/examples/23_ring_tree.py +43 -0
  102. plotlet-0.6.4/src/plotlet/examples/24_image_rgba.py +19 -0
  103. plotlet-0.6.4/src/plotlet/formatters.py +164 -0
  104. plotlet-0.6.4/src/plotlet/layout_diagram.py +316 -0
  105. plotlet-0.6.4/src/plotlet/lint.py +130 -0
  106. plotlet-0.6.4/src/plotlet/record/__init__.py +12 -0
  107. plotlet-0.6.4/src/plotlet/record/chart.py +1289 -0
  108. plotlet-0.6.4/src/plotlet/record/facet.py +245 -0
  109. plotlet-0.6.4/src/plotlet/record/figure_ir.py +458 -0
  110. plotlet-0.6.4/src/plotlet/record/journal.py +450 -0
  111. plotlet-0.6.4/src/plotlet/record/legend.py +120 -0
  112. plotlet-0.6.4/src/plotlet/registry.py +342 -0
  113. plotlet-0.6.4/src/plotlet/render/__init__.py +83 -0
  114. {plotlet-0.5.0/src/plotlet → plotlet-0.6.4/src/plotlet/render}/_attachments.py +93 -34
  115. plotlet-0.6.4/src/plotlet/render/_chrome_bands.py +392 -0
  116. plotlet-0.6.4/src/plotlet/render/_chrome_circular.py +435 -0
  117. plotlet-0.6.4/src/plotlet/render/_chrome_emit.py +764 -0
  118. plotlet-0.6.4/src/plotlet/render/_chrome_visibility.py +97 -0
  119. plotlet-0.6.4/src/plotlet/render/_coord_circular.py +371 -0
  120. plotlet-0.6.4/src/plotlet/render/_layout_circular.py +324 -0
  121. plotlet-0.6.4/src/plotlet/render/_layout_engine.py +1427 -0
  122. plotlet-0.6.4/src/plotlet/render/_legend.py +648 -0
  123. plotlet-0.6.4/src/plotlet/render/_nodes.py +501 -0
  124. plotlet-0.6.4/src/plotlet/render/_resolution.py +1645 -0
  125. plotlet-0.6.4/src/plotlet/render/_validate.py +317 -0
  126. plotlet-0.6.4/src/plotlet/render/emit.py +713 -0
  127. plotlet-0.6.4/src/plotlet/render/resolved_ir.py +725 -0
  128. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/scales.py +159 -5
  129. plotlet-0.6.4/src/plotlet/sectors.py +330 -0
  130. plotlet-0.6.4/src/plotlet/skill.py +36 -0
  131. plotlet-0.6.4/src/plotlet/skills/developers.md +141 -0
  132. plotlet-0.6.4/src/plotlet/skills/users.md +182 -0
  133. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/spec.json +41 -10
  134. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/themes/minimal.json +2 -1
  135. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/themes/void.json +2 -1
  136. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/themes.py +3 -3
  137. plotlet-0.6.4/src/plotlet/utils.py +761 -0
  138. plotlet-0.6.4/src/plotlet.egg-info/PKG-INFO +72 -0
  139. plotlet-0.6.4/src/plotlet.egg-info/SOURCES.txt +208 -0
  140. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet.egg-info/requires.txt +5 -0
  141. plotlet-0.6.4/tests/test_aes.py +136 -0
  142. plotlet-0.6.4/tests/test_chart_annotation_strip.py +199 -0
  143. plotlet-0.6.4/tests/test_chart_axis.py +473 -0
  144. plotlet-0.6.4/tests/test_chart_bar.py +353 -0
  145. plotlet-0.6.4/tests/test_chart_boxplot.py +105 -0
  146. plotlet-0.6.4/tests/test_chart_chord_links.py +68 -0
  147. plotlet-0.6.4/tests/test_chart_chord_ribbon.py +56 -0
  148. plotlet-0.6.4/tests/test_chart_contour.py +84 -0
  149. plotlet-0.6.4/tests/test_chart_dendrogram.py +186 -0
  150. plotlet-0.6.4/tests/test_chart_density_1d.py +59 -0
  151. plotlet-0.6.4/tests/test_chart_ecdf.py +40 -0
  152. plotlet-0.6.4/tests/test_chart_errorbar.py +57 -0
  153. plotlet-0.6.4/tests/test_chart_facets.py +238 -0
  154. plotlet-0.6.4/tests/test_chart_fills.py +119 -0
  155. plotlet-0.6.4/tests/test_chart_freqpoly.py +40 -0
  156. plotlet-0.6.4/tests/test_chart_heatmap.py +378 -0
  157. plotlet-0.6.4/tests/test_chart_hexbin.py +50 -0
  158. plotlet-0.6.4/tests/test_chart_hist.py +136 -0
  159. plotlet-0.6.4/tests/test_chart_hist2d.py +108 -0
  160. plotlet-0.6.4/tests/test_chart_image_cmap.py +284 -0
  161. plotlet-0.6.4/tests/test_chart_image_rgba.py +214 -0
  162. plotlet-0.6.4/tests/test_chart_kde_2d.py +77 -0
  163. plotlet-0.6.4/tests/test_chart_labels.py +136 -0
  164. plotlet-0.6.4/tests/test_chart_line.py +240 -0
  165. plotlet-0.6.4/tests/test_chart_numeric_bar.py +50 -0
  166. plotlet-0.6.4/tests/test_chart_pointplot.py +90 -0
  167. plotlet-0.6.4/tests/test_chart_qq.py +74 -0
  168. plotlet-0.6.4/tests/test_chart_references.py +68 -0
  169. plotlet-0.6.4/tests/test_chart_regression.py +159 -0
  170. plotlet-0.6.4/tests/test_chart_ridge.py +72 -0
  171. plotlet-0.6.4/tests/test_chart_rug.py +36 -0
  172. plotlet-0.6.4/tests/test_chart_scatter.py +146 -0
  173. plotlet-0.6.4/tests/test_chart_shapes.py +189 -0
  174. plotlet-0.6.4/tests/test_chart_spines.py +52 -0
  175. plotlet-0.6.4/tests/test_chart_strip.py +46 -0
  176. plotlet-0.6.4/tests/test_chart_swarm.py +58 -0
  177. plotlet-0.6.4/tests/test_chart_text.py +89 -0
  178. plotlet-0.6.4/tests/test_chart_violin.py +46 -0
  179. plotlet-0.6.4/tests/test_cluster.py +67 -0
  180. plotlet-0.6.4/tests/test_colors.py +249 -0
  181. plotlet-0.6.4/tests/test_coord_circular.py +767 -0
  182. plotlet-0.6.4/tests/test_coord_sectors.py +399 -0
  183. plotlet-0.6.4/tests/test_datasets.py +59 -0
  184. plotlet-0.6.4/tests/test_fonts.py +319 -0
  185. plotlet-0.6.4/tests/test_formatters.py +67 -0
  186. plotlet-0.6.4/tests/test_help.py +19 -0
  187. plotlet-0.6.4/tests/test_import_boundary.py +256 -0
  188. plotlet-0.6.4/tests/test_io.py +187 -0
  189. plotlet-0.6.4/tests/test_ir.py +271 -0
  190. plotlet-0.6.4/tests/test_ir_resolved.py +341 -0
  191. plotlet-0.6.4/tests/test_ir_validate.py +358 -0
  192. plotlet-0.6.4/tests/test_journal_roundtrip.py +236 -0
  193. plotlet-0.6.4/tests/test_layout_attachments.py +357 -0
  194. {plotlet-0.5.0 → plotlet-0.6.4}/tests/test_layout_diagram.py +38 -19
  195. plotlet-0.6.4/tests/test_layout_legend.py +352 -0
  196. plotlet-0.6.4/tests/test_layout_subplots.py +673 -0
  197. plotlet-0.6.4/tests/test_lint.py +26 -0
  198. plotlet-0.6.4/tests/test_record_signatures.py +225 -0
  199. plotlet-0.6.4/tests/test_skill.py +35 -0
  200. {plotlet-0.5.0 → plotlet-0.6.4}/tests/test_themes.py +23 -12
  201. {plotlet-0.5.0 → plotlet-0.6.4}/tests/test_units.py +23 -18
  202. plotlet-0.5.0/PKG-INFO +0 -82
  203. plotlet-0.5.0/README.md +0 -50
  204. plotlet-0.5.0/src/plotlet/__init__.py +0 -42
  205. plotlet-0.5.0/src/plotlet/_layout_engine.py +0 -909
  206. plotlet-0.5.0/src/plotlet/_splits.py +0 -190
  207. plotlet-0.5.0/src/plotlet/artists/_shared.py +0 -191
  208. plotlet-0.5.0/src/plotlet/artists/bar.py +0 -243
  209. plotlet-0.5.0/src/plotlet/artists/contour.py +0 -129
  210. plotlet-0.5.0/src/plotlet/artists/ecdf.py +0 -118
  211. plotlet-0.5.0/src/plotlet/artists/errorbar.py +0 -183
  212. plotlet-0.5.0/src/plotlet/artists/heatmap.py +0 -436
  213. plotlet-0.5.0/src/plotlet/artists/hist.py +0 -193
  214. plotlet-0.5.0/src/plotlet/artists/imshow.py +0 -239
  215. plotlet-0.5.0/src/plotlet/artists/kde_2d.py +0 -145
  216. plotlet-0.5.0/src/plotlet/artists/line.py +0 -152
  217. plotlet-0.5.0/src/plotlet/artists/pointplot.py +0 -150
  218. plotlet-0.5.0/src/plotlet/artists/qq.py +0 -83
  219. plotlet-0.5.0/src/plotlet/artists/references.py +0 -224
  220. plotlet-0.5.0/src/plotlet/artists/regression.py +0 -179
  221. plotlet-0.5.0/src/plotlet/artists/ridge.py +0 -98
  222. plotlet-0.5.0/src/plotlet/artists/rug.py +0 -108
  223. plotlet-0.5.0/src/plotlet/artists/scatter.py +0 -279
  224. plotlet-0.5.0/src/plotlet/artists/shapes.py +0 -126
  225. plotlet-0.5.0/src/plotlet/chart.py +0 -1060
  226. plotlet-0.5.0/src/plotlet/core.py +0 -1973
  227. plotlet-0.5.0/src/plotlet/data.py +0 -83
  228. plotlet-0.5.0/src/plotlet/draw/__init__.py +0 -33
  229. plotlet-0.5.0/src/plotlet/draw/_png.py +0 -38
  230. plotlet-0.5.0/src/plotlet/draw/colormaps.py +0 -113
  231. plotlet-0.5.0/src/plotlet/draw/colors.py +0 -41
  232. plotlet-0.5.0/src/plotlet/draw/font.py +0 -117
  233. plotlet-0.5.0/src/plotlet/extensions/__init__.py +0 -22
  234. plotlet-0.5.0/src/plotlet/extensions/_gallery.py +0 -205
  235. plotlet-0.5.0/src/plotlet/extensions/alluvial.py +0 -202
  236. plotlet-0.5.0/src/plotlet/extensions/annotation_strip.py +0 -305
  237. plotlet-0.5.0/src/plotlet/extensions/bland_altman.py +0 -93
  238. plotlet-0.5.0/src/plotlet/extensions/boxenplot.py +0 -251
  239. plotlet-0.5.0/src/plotlet/extensions/bubble_grid.py +0 -106
  240. plotlet-0.5.0/src/plotlet/extensions/bump.py +0 -116
  241. plotlet-0.5.0/src/plotlet/extensions/calendar_heatmap.py +0 -130
  242. plotlet-0.5.0/src/plotlet/extensions/calibration_plot.py +0 -135
  243. plotlet-0.5.0/src/plotlet/extensions/cleveland_dot.py +0 -96
  244. plotlet-0.5.0/src/plotlet/extensions/confusion_matrix.py +0 -149
  245. plotlet-0.5.0/src/plotlet/extensions/crossbar.py +0 -98
  246. plotlet-0.5.0/src/plotlet/extensions/curved_tree.py +0 -227
  247. plotlet-0.5.0/src/plotlet/extensions/diverging_bar.py +0 -99
  248. plotlet-0.5.0/src/plotlet/extensions/dumbbell.py +0 -90
  249. plotlet-0.5.0/src/plotlet/extensions/eventplot.py +0 -114
  250. plotlet-0.5.0/src/plotlet/extensions/forest_plot.py +0 -127
  251. plotlet-0.5.0/src/plotlet/extensions/funnel_plot.py +0 -126
  252. plotlet-0.5.0/src/plotlet/extensions/gene_arrow.py +0 -109
  253. plotlet-0.5.0/src/plotlet/extensions/horizon.py +0 -132
  254. plotlet-0.5.0/src/plotlet/extensions/horizontal_bar.py +0 -80
  255. plotlet-0.5.0/src/plotlet/extensions/jointplot.py +0 -90
  256. plotlet-0.5.0/src/plotlet/extensions/km_curve.py +0 -206
  257. plotlet-0.5.0/src/plotlet/extensions/labels_strip.py +0 -246
  258. plotlet-0.5.0/src/plotlet/extensions/loess.py +0 -95
  259. plotlet-0.5.0/src/plotlet/extensions/lollipop.py +0 -95
  260. plotlet-0.5.0/src/plotlet/extensions/ma_plot.py +0 -113
  261. plotlet-0.5.0/src/plotlet/extensions/manhattan.py +0 -133
  262. plotlet-0.5.0/src/plotlet/extensions/mosaic.py +0 -143
  263. plotlet-0.5.0/src/plotlet/extensions/numeric_bar.py +0 -98
  264. plotlet-0.5.0/src/plotlet/extensions/pair_plot.py +0 -90
  265. plotlet-0.5.0/src/plotlet/extensions/parallel_coordinates.py +0 -126
  266. plotlet-0.5.0/src/plotlet/extensions/pca_biplot.py +0 -113
  267. plotlet-0.5.0/src/plotlet/extensions/percentile_band.py +0 -108
  268. plotlet-0.5.0/src/plotlet/extensions/pr_curve.py +0 -126
  269. plotlet-0.5.0/src/plotlet/extensions/pyramid_plot.py +0 -97
  270. plotlet-0.5.0/src/plotlet/extensions/raincloud.py +0 -309
  271. plotlet-0.5.0/src/plotlet/extensions/residual_diagnostics.py +0 -112
  272. plotlet-0.5.0/src/plotlet/extensions/roc_curve.py +0 -123
  273. plotlet-0.5.0/src/plotlet/extensions/sales_funnel.py +0 -86
  274. plotlet-0.5.0/src/plotlet/extensions/sankey.py +0 -257
  275. plotlet-0.5.0/src/plotlet/extensions/significance_brackets.py +0 -132
  276. plotlet-0.5.0/src/plotlet/extensions/slope_chart.py +0 -88
  277. plotlet-0.5.0/src/plotlet/extensions/split_violin.py +0 -177
  278. plotlet-0.5.0/src/plotlet/extensions/text_label.py +0 -78
  279. plotlet-0.5.0/src/plotlet/extensions/upset_plot.py +0 -152
  280. plotlet-0.5.0/src/plotlet/extensions/volcano.py +0 -133
  281. plotlet-0.5.0/src/plotlet/extensions/waterfall.py +0 -131
  282. plotlet-0.5.0/src/plotlet/facet.py +0 -163
  283. plotlet-0.5.0/src/plotlet/layout_diagram.py +0 -237
  284. plotlet-0.5.0/src/plotlet/legend.py +0 -414
  285. plotlet-0.5.0/src/plotlet/registry.py +0 -114
  286. plotlet-0.5.0/src/plotlet/utils.py +0 -319
  287. plotlet-0.5.0/src/plotlet.egg-info/PKG-INFO +0 -82
  288. plotlet-0.5.0/src/plotlet.egg-info/SOURCES.txt +0 -124
  289. plotlet-0.5.0/tests/test_attachments.py +0 -193
  290. plotlet-0.5.0/tests/test_chart.py +0 -1844
  291. plotlet-0.5.0/tests/test_extensions.py +0 -74
  292. plotlet-0.5.0/tests/test_legend.py +0 -148
  293. plotlet-0.5.0/tests/test_subplots.py +0 -427
  294. {plotlet-0.5.0 → plotlet-0.6.4}/LICENSE +0 -0
  295. {plotlet-0.5.0 → plotlet-0.6.4}/setup.cfg +0 -0
  296. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/_datasets/penguins.csv +0 -0
  297. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/draw/_cm_data.py +0 -0
  298. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/draw/fonts/DejaVuSans.ttf +0 -0
  299. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/draw/linestyles.py +0 -0
  300. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet/themes/dark.json +0 -0
  301. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet.egg-info/dependency_links.txt +0 -0
  302. {plotlet-0.5.0 → plotlet-0.6.4}/src/plotlet.egg-info/top_level.txt +0 -0
plotlet-0.6.4/PKG-INFO ADDED
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.4
2
+ Name: plotlet
3
+ Version: 0.6.4
4
+ Summary: Python library for reproducible, multi-panel scientific figures, with byte-identical output across machines and an extension API for custom plot types.
5
+ Author: gitbamboo42
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/gitbamboo42/plotlet
8
+ Project-URL: Repository, https://github.com/gitbamboo42/plotlet
9
+ Project-URL: Issues, https://github.com/gitbamboo42/plotlet/issues
10
+ Keywords: plot,svg,scientific,visualization,jupyter,reproducible
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Visualization
21
+ Classifier: Topic :: Multimedia :: Graphics
22
+ Requires-Python: >=3.10
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: fonttools>=4.0
26
+ Requires-Dist: scipy>=1.10
27
+ Requires-Dist: resvg_py>=0.3
28
+ Provides-Extra: dev
29
+ Requires-Dist: jupyter; extra == "dev"
30
+ Requires-Dist: nbconvert; extra == "dev"
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest>=7; extra == "test"
33
+ Requires-Dist: pandas; extra == "test"
34
+ Provides-Extra: pdf
35
+ Requires-Dist: cairosvg; extra == "pdf"
36
+ Dynamic: license-file
37
+
38
+ # plotlet
39
+
40
+ plotlet is a Python library for reproducible, multi-panel scientific figures, built for AI authorship: figures are written, inspected, and verified as data, not pixels. Byte-identical output across machines, a standard plotting vocabulary, built-in Cartesian and circular coordinate systems, and an easy way to add your own plot types.
41
+
42
+ ## Documentation
43
+
44
+ Online documentation is available at [gitbamboo42.github.io/plotlet](https://gitbamboo42.github.io/plotlet/).
45
+
46
+ The docs include a [tutorial](https://gitbamboo42.github.io/plotlet/tutorial.html), a [plot-type reference](https://gitbamboo42.github.io/plotlet/reference.html), a [cookbook](https://gitbamboo42.github.io/plotlet/cookbook.html), an [extensions gallery](https://gitbamboo42.github.io/plotlet/extensions.html), [deep-dive guides](https://gitbamboo42.github.io/plotlet/docs-api.html), and a [page for AI agents](https://gitbamboo42.github.io/plotlet/agents.html).
47
+
48
+ ## Dependencies
49
+
50
+ plotlet supports Python 3.10+.
51
+
52
+ Required: `fonttools`, `scipy`, `resvg_py`. numpy / pandas / polars inputs work transparently.
53
+
54
+ Optional: `cairosvg` for PDF export (`pip install plotlet[pdf]`).
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ pip install plotlet
60
+ ```
61
+
62
+ ## For AI assistants
63
+
64
+ Tell your assistant to run plotlet's `skill()` and follow it. The guides, docs, and worked examples ship inside the installed package; the [page for AI agents](https://gitbamboo42.github.io/plotlet/agents.html) shows the full workflow.
65
+
66
+ ## Development
67
+
68
+ Development takes place on GitHub. Please submit bugs to the issue tracker with a reproducible example.
69
+
70
+ ## License
71
+
72
+ MIT
@@ -0,0 +1,35 @@
1
+ # plotlet
2
+
3
+ plotlet is a Python library for reproducible, multi-panel scientific figures, built for AI authorship: figures are written, inspected, and verified as data, not pixels. Byte-identical output across machines, a standard plotting vocabulary, built-in Cartesian and circular coordinate systems, and an easy way to add your own plot types.
4
+
5
+ ## Documentation
6
+
7
+ Online documentation is available at [gitbamboo42.github.io/plotlet](https://gitbamboo42.github.io/plotlet/).
8
+
9
+ The docs include a [tutorial](https://gitbamboo42.github.io/plotlet/tutorial.html), a [plot-type reference](https://gitbamboo42.github.io/plotlet/reference.html), a [cookbook](https://gitbamboo42.github.io/plotlet/cookbook.html), an [extensions gallery](https://gitbamboo42.github.io/plotlet/extensions.html), [deep-dive guides](https://gitbamboo42.github.io/plotlet/docs-api.html), and a [page for AI agents](https://gitbamboo42.github.io/plotlet/agents.html).
10
+
11
+ ## Dependencies
12
+
13
+ plotlet supports Python 3.10+.
14
+
15
+ Required: `fonttools`, `scipy`, `resvg_py`. numpy / pandas / polars inputs work transparently.
16
+
17
+ Optional: `cairosvg` for PDF export (`pip install plotlet[pdf]`).
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ pip install plotlet
23
+ ```
24
+
25
+ ## For AI assistants
26
+
27
+ Tell your assistant to run plotlet's `skill()` and follow it. The guides, docs, and worked examples ship inside the installed package; the [page for AI agents](https://gitbamboo42.github.io/plotlet/agents.html) shows the full workflow.
28
+
29
+ ## Development
30
+
31
+ Development takes place on GitHub. Please submit bugs to the issue tracker with a reproducible example.
32
+
33
+ ## License
34
+
35
+ MIT
@@ -1,11 +1,11 @@
1
1
  [build-system]
2
- requires = ["setuptools>=64", "wheel"]
2
+ requires = ["setuptools>=77", "wheel"]
3
3
  build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "plotlet"
7
- version = "0.5.0"
8
- description = "Python library for SVG plots, with multi-panel composition and an extension API for custom plot types."
7
+ version = "0.6.4"
8
+ description = "Python library for reproducible, multi-panel scientific figures, with byte-identical output across machines and an extension API for custom plot types."
9
9
  readme = "README.md"
10
10
  license = "MIT"
11
11
  license-files = ["LICENSE"]
@@ -30,12 +30,14 @@ classifiers = [
30
30
  "Programming Language :: Python :: 3.10",
31
31
  "Programming Language :: Python :: 3.11",
32
32
  "Programming Language :: Python :: 3.12",
33
+ "Programming Language :: Python :: 3.13",
33
34
  "Topic :: Scientific/Engineering :: Visualization",
34
35
  "Topic :: Multimedia :: Graphics",
35
36
  ]
36
37
  dependencies = [
37
38
  "fonttools>=4.0",
38
39
  "scipy>=1.10",
40
+ "resvg_py>=0.3",
39
41
  ]
40
42
 
41
43
  [project.optional-dependencies]
@@ -45,6 +47,10 @@ dev = [
45
47
  ]
46
48
  test = [
47
49
  "pytest>=7",
50
+ "pandas",
51
+ ]
52
+ pdf = [
53
+ "cairosvg",
48
54
  ]
49
55
 
50
56
  [tool.pytest.ini_options]
@@ -58,6 +64,14 @@ Issues = "https://github.com/gitbamboo42/plotlet/issues"
58
64
 
59
65
  [tool.setuptools.packages.find]
60
66
  where = ["src"]
67
+ namespaces = true
61
68
 
62
69
  [tool.setuptools.package-data]
63
- plotlet = ["spec.json", "themes/*.json", "draw/fonts/*.ttf", "_datasets/*.csv"]
70
+ # draw/fonts/*.txt are the font licenses — DejaVu (Bitstream Vera–derived)
71
+ # and Arimo (SIL OFL 1.1) both require the license text to accompany
72
+ # redistribution, so they must ship in the wheel next to the TTFs.
73
+ plotlet = ["spec.json", "themes/*.json", "draw/fonts/*.ttf", "draw/fonts/*.txt", "_datasets/*.csv", "_datasets/*.npz",
74
+ # AI onboarding: pt.skill() reads skills/, and the guides point
75
+ # at the shipped docs/ and examples/ so an installed package is
76
+ # self-sufficient — no repo clone, no web access needed.
77
+ "skills/*.md", "docs/*.md", "examples/*.py"]
@@ -0,0 +1,76 @@
1
+ """plotlet — pure-Python deferred-rendering SVG plot library.
2
+
3
+ import plotlet as pt
4
+ from plotlet import aes
5
+
6
+ c = pt.chart(df, title="...", xlabel="x", ylabel="y", legend=True, gridlines=True)
7
+ c.add_line(aes(x="time", y="value", color="series"))
8
+ c # auto-renders in Jupyter
9
+
10
+ Chart methods chain for incremental composition:
11
+
12
+ df = {"x": [1, 2, 3], "y": [1, 4, 9]}
13
+ c = pt.chart()
14
+ c.add_line(df, aes(x="x", y="y"), label="squares")
15
+ c.title("Hello").legend().gridlines(True)
16
+ c
17
+ """
18
+ from ._spec import SPEC
19
+ from .draw import TAB10, palette, list_palettes
20
+ from .draw import colormap, list_colormaps, register_colormap
21
+ from . import artists # noqa: F401 — registers built-in artists on import
22
+ from .record.chart import Chart, Layout, chart, grid
23
+ from .utils import aes
24
+ from .record.legend import legend
25
+ from .registry import ArtistSpec, add_artist, artist_table, declare_coord_support
26
+ from .sectors import Sectors
27
+ from .layout_diagram import layout_diagram
28
+ from .themes import load_theme, list_themes, register_theme
29
+ from .record.facet import facet, FacetGrid
30
+ from .datasets import load_dataset, list_datasets
31
+ from .cluster import linkage, linkage_split, SplitTree
32
+ from .formatters import (register_formatter, list_formatters,
33
+ superscript, subscript)
34
+ from ._coord_registry import register_coord_codec
35
+ from .record.journal import (to_journal, from_journal, to_json, from_json,
36
+ JournalNode, Journal)
37
+ from .record.figure_ir import to_ir, from_ir, FigureIR, IRNode
38
+ from .skill import skill
39
+ from . import draw, utils
40
+
41
+
42
+ def __getattr__(name):
43
+ # The one render-half class in the top-level namespace stays a lazy
44
+ # import so that `import plotlet` loads only the recording half —
45
+ # the render half loads on first render (or first touch of this
46
+ # name). Enforced by tests/test_import_boundary.py.
47
+ if name == "CircularCoordinate":
48
+ from .render._coord_circular import CircularCoordinate
49
+ return CircularCoordinate
50
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
51
+
52
+ __all__ = ["chart", "Chart", "Layout", "SPEC", "TAB10",
53
+ "palette", "list_palettes",
54
+ "colormap", "list_colormaps", "register_colormap",
55
+ "grid", "legend",
56
+ "ArtistSpec", "add_artist", "artist_table", "declare_coord_support",
57
+ "CircularCoordinate", "Sectors",
58
+ "layout_diagram",
59
+ "load_theme", "list_themes", "register_theme",
60
+ "facet", "FacetGrid",
61
+ "load_dataset", "list_datasets",
62
+ "linkage", "linkage_split", "SplitTree",
63
+ "register_formatter", "list_formatters",
64
+ "superscript", "subscript",
65
+ "to_json", "from_json", "register_coord_codec",
66
+ "to_journal", "from_journal", "JournalNode", "Journal",
67
+ "to_ir", "from_ir", "FigureIR", "IRNode",
68
+ "skill",
69
+ "draw", "utils"]
70
+
71
+ # Single source of truth: pyproject.toml. importlib.metadata reads it at
72
+ # runtime from the installed package metadata (works for `pip install` and
73
+ # `pip install -e .` alike). Migrating to setuptools_scm later doesn't
74
+ # touch this code — it just changes how pyproject.toml's version is set.
75
+ from importlib.metadata import version as _pkg_version
76
+ __version__ = _pkg_version("plotlet")
@@ -0,0 +1,55 @@
1
+ """Coord codec registry — the `class_name → class` map behind
2
+ `{"$coord": ...}` envelopes, for coord objects like
3
+ `CircularCoordinate`.
4
+
5
+ `record/journal.py` encodes a coord object to its class name;
6
+ `_json_layer._decode` turns the name back into the class via
7
+ `resolve_coord`, which imports the built-in coord module on the first
8
+ miss so cold processes decode without a prior render. The render half
9
+ reads the map too (`render/_validate.py` cross-checks the `container`
10
+ flag, `render/resolved_ir.py` rehydrates coords), so the registry sits
11
+ at the package root, where `record/` and `render/` may both import it.
12
+ The public API `plotlet.register_coord_codec` re-exports from this
13
+ module directly.
14
+ """
15
+ from __future__ import annotations
16
+
17
+
18
+ # Populated by `register_coord_codec`; coord classes register themselves
19
+ # at their definition site (or serialize.py registers built-ins on module
20
+ # import, for the ones that ship with plotlet).
21
+ _COORD_REGISTRY: dict[str, type] = {}
22
+
23
+
24
+ def register_coord_codec(cls: type) -> type:
25
+ """Register `cls` as a serializable coord. The class must define
26
+ `_to_dict(self) -> dict` and `_from_dict(cls, dict) -> cls`. Returns
27
+ `cls` so this can be used as a decorator."""
28
+ if not hasattr(cls, "_to_dict") or not hasattr(cls, "_from_dict"):
29
+ raise TypeError(
30
+ f"register_coord_codec: {cls.__name__} must define "
31
+ f"`_to_dict` and `_from_dict`."
32
+ )
33
+ _COORD_REGISTRY[cls.__name__] = cls
34
+ return cls
35
+
36
+
37
+ def resolve_coord(name: str) -> type:
38
+ """Look up a coord class by registered name, importing the built-in
39
+ coord module on first miss — built-ins register at their definition
40
+ site, and nothing else guarantees that module has been imported when
41
+ a `{"$coord": ...}` envelope arrives from JSON in a fresh process."""
42
+ try:
43
+ return _COORD_REGISTRY[name]
44
+ except KeyError:
45
+ pass
46
+ from .render import _coord_circular # noqa: F401 — registers built-ins
47
+ try:
48
+ return _COORD_REGISTRY[name]
49
+ except KeyError:
50
+ raise KeyError(
51
+ f"unknown coordinate {name!r}. Registered coords: "
52
+ f"{sorted(_COORD_REGISTRY)}. Custom coord classes must be "
53
+ f"imported (and registered via `register_coord_codec`) before "
54
+ f"a figure referencing them is decoded."
55
+ ) from None
@@ -0,0 +1,45 @@
1
+ dataset,x,y
2
+ I,10.0,8.04
3
+ I,8.0,6.95
4
+ I,13.0,7.58
5
+ I,9.0,8.81
6
+ I,11.0,8.33
7
+ I,14.0,9.96
8
+ I,6.0,7.24
9
+ I,4.0,4.26
10
+ I,12.0,10.84
11
+ I,7.0,4.82
12
+ I,5.0,5.68
13
+ II,10.0,9.14
14
+ II,8.0,8.14
15
+ II,13.0,8.74
16
+ II,9.0,8.77
17
+ II,11.0,9.26
18
+ II,14.0,8.1
19
+ II,6.0,6.13
20
+ II,4.0,3.1
21
+ II,12.0,9.13
22
+ II,7.0,7.26
23
+ II,5.0,4.74
24
+ III,10.0,7.46
25
+ III,8.0,6.77
26
+ III,13.0,12.74
27
+ III,9.0,7.11
28
+ III,11.0,7.81
29
+ III,14.0,8.84
30
+ III,6.0,6.08
31
+ III,4.0,5.39
32
+ III,12.0,8.15
33
+ III,7.0,6.42
34
+ III,5.0,5.73
35
+ IV,8.0,6.58
36
+ IV,8.0,5.76
37
+ IV,8.0,7.71
38
+ IV,8.0,8.84
39
+ IV,8.0,8.47
40
+ IV,8.0,7.04
41
+ IV,8.0,5.25
42
+ IV,19.0,12.5
43
+ IV,8.0,5.56
44
+ IV,8.0,7.91
45
+ IV,8.0,6.89
@@ -0,0 +1,145 @@
1
+ year,month,passengers
2
+ 1949,January,112
3
+ 1949,February,118
4
+ 1949,March,132
5
+ 1949,April,129
6
+ 1949,May,121
7
+ 1949,June,135
8
+ 1949,July,148
9
+ 1949,August,148
10
+ 1949,September,136
11
+ 1949,October,119
12
+ 1949,November,104
13
+ 1949,December,118
14
+ 1950,January,115
15
+ 1950,February,126
16
+ 1950,March,141
17
+ 1950,April,135
18
+ 1950,May,125
19
+ 1950,June,149
20
+ 1950,July,170
21
+ 1950,August,170
22
+ 1950,September,158
23
+ 1950,October,133
24
+ 1950,November,114
25
+ 1950,December,140
26
+ 1951,January,145
27
+ 1951,February,150
28
+ 1951,March,178
29
+ 1951,April,163
30
+ 1951,May,172
31
+ 1951,June,178
32
+ 1951,July,199
33
+ 1951,August,199
34
+ 1951,September,184
35
+ 1951,October,162
36
+ 1951,November,146
37
+ 1951,December,166
38
+ 1952,January,171
39
+ 1952,February,180
40
+ 1952,March,193
41
+ 1952,April,181
42
+ 1952,May,183
43
+ 1952,June,218
44
+ 1952,July,230
45
+ 1952,August,242
46
+ 1952,September,209
47
+ 1952,October,191
48
+ 1952,November,172
49
+ 1952,December,194
50
+ 1953,January,196
51
+ 1953,February,196
52
+ 1953,March,236
53
+ 1953,April,235
54
+ 1953,May,229
55
+ 1953,June,243
56
+ 1953,July,264
57
+ 1953,August,272
58
+ 1953,September,237
59
+ 1953,October,211
60
+ 1953,November,180
61
+ 1953,December,201
62
+ 1954,January,204
63
+ 1954,February,188
64
+ 1954,March,235
65
+ 1954,April,227
66
+ 1954,May,234
67
+ 1954,June,264
68
+ 1954,July,302
69
+ 1954,August,293
70
+ 1954,September,259
71
+ 1954,October,229
72
+ 1954,November,203
73
+ 1954,December,229
74
+ 1955,January,242
75
+ 1955,February,233
76
+ 1955,March,267
77
+ 1955,April,269
78
+ 1955,May,270
79
+ 1955,June,315
80
+ 1955,July,364
81
+ 1955,August,347
82
+ 1955,September,312
83
+ 1955,October,274
84
+ 1955,November,237
85
+ 1955,December,278
86
+ 1956,January,284
87
+ 1956,February,277
88
+ 1956,March,317
89
+ 1956,April,313
90
+ 1956,May,318
91
+ 1956,June,374
92
+ 1956,July,413
93
+ 1956,August,405
94
+ 1956,September,355
95
+ 1956,October,306
96
+ 1956,November,271
97
+ 1956,December,306
98
+ 1957,January,315
99
+ 1957,February,301
100
+ 1957,March,356
101
+ 1957,April,348
102
+ 1957,May,355
103
+ 1957,June,422
104
+ 1957,July,465
105
+ 1957,August,467
106
+ 1957,September,404
107
+ 1957,October,347
108
+ 1957,November,305
109
+ 1957,December,336
110
+ 1958,January,340
111
+ 1958,February,318
112
+ 1958,March,362
113
+ 1958,April,348
114
+ 1958,May,363
115
+ 1958,June,435
116
+ 1958,July,491
117
+ 1958,August,505
118
+ 1958,September,404
119
+ 1958,October,359
120
+ 1958,November,310
121
+ 1958,December,337
122
+ 1959,January,360
123
+ 1959,February,342
124
+ 1959,March,406
125
+ 1959,April,396
126
+ 1959,May,420
127
+ 1959,June,472
128
+ 1959,July,548
129
+ 1959,August,559
130
+ 1959,September,463
131
+ 1959,October,407
132
+ 1959,November,362
133
+ 1959,December,405
134
+ 1960,January,417
135
+ 1960,February,391
136
+ 1960,March,419
137
+ 1960,April,461
138
+ 1960,May,472
139
+ 1960,June,535
140
+ 1960,July,622
141
+ 1960,August,606
142
+ 1960,September,508
143
+ 1960,October,461
144
+ 1960,November,390
145
+ 1960,December,432