scitex 2.7.0__py3-none-any.whl → 2.8.1__py3-none-any.whl

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 (355) hide show
  1. scitex/__init__.py +6 -2
  2. scitex/__version__.py +1 -1
  3. scitex/audio/README.md +52 -0
  4. scitex/audio/__init__.py +384 -0
  5. scitex/audio/__main__.py +129 -0
  6. scitex/audio/_tts.py +334 -0
  7. scitex/audio/engines/__init__.py +44 -0
  8. scitex/audio/engines/base.py +275 -0
  9. scitex/audio/engines/elevenlabs_engine.py +143 -0
  10. scitex/audio/engines/gtts_engine.py +162 -0
  11. scitex/audio/engines/pyttsx3_engine.py +131 -0
  12. scitex/audio/mcp_server.py +757 -0
  13. scitex/bridge/_helpers.py +1 -1
  14. scitex/bridge/_plt_vis.py +1 -1
  15. scitex/bridge/_stats_vis.py +1 -1
  16. scitex/dev/plt/__init__.py +272 -0
  17. scitex/dev/plt/plot_mpl_axhline.py +28 -0
  18. scitex/dev/plt/plot_mpl_axhspan.py +28 -0
  19. scitex/dev/plt/plot_mpl_axvline.py +28 -0
  20. scitex/dev/plt/plot_mpl_axvspan.py +28 -0
  21. scitex/dev/plt/plot_mpl_bar.py +29 -0
  22. scitex/dev/plt/plot_mpl_barh.py +29 -0
  23. scitex/dev/plt/plot_mpl_boxplot.py +28 -0
  24. scitex/dev/plt/plot_mpl_contour.py +31 -0
  25. scitex/dev/plt/plot_mpl_contourf.py +31 -0
  26. scitex/dev/plt/plot_mpl_errorbar.py +30 -0
  27. scitex/dev/plt/plot_mpl_eventplot.py +28 -0
  28. scitex/dev/plt/plot_mpl_fill.py +30 -0
  29. scitex/dev/plt/plot_mpl_fill_between.py +31 -0
  30. scitex/dev/plt/plot_mpl_hexbin.py +28 -0
  31. scitex/dev/plt/plot_mpl_hist.py +28 -0
  32. scitex/dev/plt/plot_mpl_hist2d.py +28 -0
  33. scitex/dev/plt/plot_mpl_imshow.py +29 -0
  34. scitex/dev/plt/plot_mpl_pcolormesh.py +31 -0
  35. scitex/dev/plt/plot_mpl_pie.py +29 -0
  36. scitex/dev/plt/plot_mpl_plot.py +29 -0
  37. scitex/dev/plt/plot_mpl_quiver.py +31 -0
  38. scitex/dev/plt/plot_mpl_scatter.py +28 -0
  39. scitex/dev/plt/plot_mpl_stackplot.py +31 -0
  40. scitex/dev/plt/plot_mpl_stem.py +29 -0
  41. scitex/dev/plt/plot_mpl_step.py +29 -0
  42. scitex/dev/plt/plot_mpl_violinplot.py +28 -0
  43. scitex/dev/plt/plot_sns_barplot.py +29 -0
  44. scitex/dev/plt/plot_sns_boxplot.py +29 -0
  45. scitex/dev/plt/plot_sns_heatmap.py +28 -0
  46. scitex/dev/plt/plot_sns_histplot.py +29 -0
  47. scitex/dev/plt/plot_sns_kdeplot.py +29 -0
  48. scitex/dev/plt/plot_sns_lineplot.py +31 -0
  49. scitex/dev/plt/plot_sns_scatterplot.py +29 -0
  50. scitex/dev/plt/plot_sns_stripplot.py +29 -0
  51. scitex/dev/plt/plot_sns_swarmplot.py +29 -0
  52. scitex/dev/plt/plot_sns_violinplot.py +29 -0
  53. scitex/dev/plt/plot_stx_bar.py +29 -0
  54. scitex/dev/plt/plot_stx_barh.py +29 -0
  55. scitex/dev/plt/plot_stx_box.py +28 -0
  56. scitex/dev/plt/plot_stx_boxplot.py +28 -0
  57. scitex/dev/plt/plot_stx_conf_mat.py +28 -0
  58. scitex/dev/plt/plot_stx_contour.py +31 -0
  59. scitex/dev/plt/plot_stx_ecdf.py +28 -0
  60. scitex/dev/plt/plot_stx_errorbar.py +30 -0
  61. scitex/dev/plt/plot_stx_fill_between.py +31 -0
  62. scitex/dev/plt/plot_stx_fillv.py +28 -0
  63. scitex/dev/plt/plot_stx_heatmap.py +28 -0
  64. scitex/dev/plt/plot_stx_image.py +28 -0
  65. scitex/dev/plt/plot_stx_imshow.py +28 -0
  66. scitex/dev/plt/plot_stx_joyplot.py +28 -0
  67. scitex/dev/plt/plot_stx_kde.py +28 -0
  68. scitex/dev/plt/plot_stx_line.py +28 -0
  69. scitex/dev/plt/plot_stx_mean_ci.py +28 -0
  70. scitex/dev/plt/plot_stx_mean_std.py +28 -0
  71. scitex/dev/plt/plot_stx_median_iqr.py +28 -0
  72. scitex/dev/plt/plot_stx_raster.py +28 -0
  73. scitex/dev/plt/plot_stx_rectangle.py +28 -0
  74. scitex/dev/plt/plot_stx_scatter.py +29 -0
  75. scitex/dev/plt/plot_stx_shaded_line.py +29 -0
  76. scitex/dev/plt/plot_stx_violin.py +28 -0
  77. scitex/dev/plt/plot_stx_violinplot.py +28 -0
  78. scitex/diagram/README.md +197 -0
  79. scitex/diagram/__init__.py +48 -0
  80. scitex/diagram/_compile.py +312 -0
  81. scitex/diagram/_diagram.py +355 -0
  82. scitex/diagram/_presets.py +173 -0
  83. scitex/diagram/_schema.py +182 -0
  84. scitex/diagram/_split.py +278 -0
  85. scitex/fig/__init__.py +352 -0
  86. scitex/{vis → fig}/backend/_parser.py +1 -1
  87. scitex/{vis → fig}/canvas.py +1 -1
  88. scitex/{vis → fig}/editor/__init__.py +5 -2
  89. scitex/{vis → fig}/editor/_dearpygui_editor.py +1 -1
  90. scitex/{vis → fig}/editor/_defaults.py +70 -5
  91. scitex/{vis → fig}/editor/_mpl_editor.py +1 -1
  92. scitex/{vis → fig}/editor/_qt_editor.py +182 -2
  93. scitex/{vis → fig}/editor/_tkinter_editor.py +1 -1
  94. scitex/fig/editor/edit/__init__.py +50 -0
  95. scitex/fig/editor/edit/backend_detector.py +109 -0
  96. scitex/fig/editor/edit/bundle_resolver.py +240 -0
  97. scitex/fig/editor/edit/editor_launcher.py +239 -0
  98. scitex/fig/editor/edit/manual_handler.py +53 -0
  99. scitex/fig/editor/edit/panel_loader.py +232 -0
  100. scitex/fig/editor/edit/path_resolver.py +67 -0
  101. scitex/fig/editor/flask_editor/_bbox.py +1299 -0
  102. scitex/fig/editor/flask_editor/_core.py +1429 -0
  103. scitex/{vis → fig}/editor/flask_editor/_plotter.py +38 -4
  104. scitex/fig/editor/flask_editor/_renderer.py +813 -0
  105. scitex/fig/editor/flask_editor/static/css/base/reset.css +41 -0
  106. scitex/fig/editor/flask_editor/static/css/base/typography.css +16 -0
  107. scitex/fig/editor/flask_editor/static/css/base/variables.css +85 -0
  108. scitex/fig/editor/flask_editor/static/css/components/buttons.css +217 -0
  109. scitex/fig/editor/flask_editor/static/css/components/context-menu.css +93 -0
  110. scitex/fig/editor/flask_editor/static/css/components/dropdown.css +57 -0
  111. scitex/fig/editor/flask_editor/static/css/components/forms.css +112 -0
  112. scitex/fig/editor/flask_editor/static/css/components/modal.css +59 -0
  113. scitex/fig/editor/flask_editor/static/css/components/sections.css +212 -0
  114. scitex/fig/editor/flask_editor/static/css/features/canvas.css +176 -0
  115. scitex/fig/editor/flask_editor/static/css/features/element-inspector.css +190 -0
  116. scitex/fig/editor/flask_editor/static/css/features/loading.css +59 -0
  117. scitex/fig/editor/flask_editor/static/css/features/overlay.css +45 -0
  118. scitex/fig/editor/flask_editor/static/css/features/panel-grid.css +95 -0
  119. scitex/fig/editor/flask_editor/static/css/features/selection.css +101 -0
  120. scitex/fig/editor/flask_editor/static/css/features/statistics.css +138 -0
  121. scitex/fig/editor/flask_editor/static/css/index.css +31 -0
  122. scitex/fig/editor/flask_editor/static/css/layout/container.css +7 -0
  123. scitex/fig/editor/flask_editor/static/css/layout/controls.css +56 -0
  124. scitex/fig/editor/flask_editor/static/css/layout/preview.css +78 -0
  125. scitex/fig/editor/flask_editor/static/js/alignment/axis.js +314 -0
  126. scitex/fig/editor/flask_editor/static/js/alignment/basic.js +107 -0
  127. scitex/fig/editor/flask_editor/static/js/alignment/distribute.js +54 -0
  128. scitex/fig/editor/flask_editor/static/js/canvas/canvas.js +172 -0
  129. scitex/fig/editor/flask_editor/static/js/canvas/dragging.js +258 -0
  130. scitex/fig/editor/flask_editor/static/js/canvas/resize.js +48 -0
  131. scitex/fig/editor/flask_editor/static/js/canvas/selection.js +71 -0
  132. scitex/fig/editor/flask_editor/static/js/core/api.js +288 -0
  133. scitex/fig/editor/flask_editor/static/js/core/state.js +143 -0
  134. scitex/fig/editor/flask_editor/static/js/core/utils.js +245 -0
  135. scitex/fig/editor/flask_editor/static/js/dev/element-inspector.js +992 -0
  136. scitex/fig/editor/flask_editor/static/js/editor/bbox.js +339 -0
  137. scitex/fig/editor/flask_editor/static/js/editor/element-drag.js +286 -0
  138. scitex/fig/editor/flask_editor/static/js/editor/overlay.js +371 -0
  139. scitex/fig/editor/flask_editor/static/js/editor/preview.js +293 -0
  140. scitex/fig/editor/flask_editor/static/js/main.js +426 -0
  141. scitex/fig/editor/flask_editor/static/js/shortcuts/context-menu.js +152 -0
  142. scitex/fig/editor/flask_editor/static/js/shortcuts/keyboard.js +265 -0
  143. scitex/fig/editor/flask_editor/static/js/ui/controls.js +184 -0
  144. scitex/fig/editor/flask_editor/static/js/ui/download.js +57 -0
  145. scitex/fig/editor/flask_editor/static/js/ui/help.js +100 -0
  146. scitex/fig/editor/flask_editor/static/js/ui/theme.js +34 -0
  147. scitex/fig/editor/flask_editor/templates/__init__.py +123 -0
  148. scitex/fig/editor/flask_editor/templates/_html.py +852 -0
  149. scitex/fig/editor/flask_editor/templates/_scripts.py +4933 -0
  150. scitex/fig/editor/flask_editor/templates/_styles.py +1658 -0
  151. scitex/{vis → fig}/io/__init__.py +13 -1
  152. scitex/fig/io/_bundle.py +1058 -0
  153. scitex/{vis → fig}/io/_canvas.py +1 -1
  154. scitex/{vis → fig}/io/_data.py +1 -1
  155. scitex/{vis → fig}/io/_export.py +1 -1
  156. scitex/{vis → fig}/io/_load.py +1 -1
  157. scitex/{vis → fig}/io/_panel.py +1 -1
  158. scitex/{vis → fig}/io/_save.py +1 -1
  159. scitex/{vis → fig}/model/__init__.py +1 -1
  160. scitex/{vis → fig}/model/_annotations.py +1 -1
  161. scitex/{vis → fig}/model/_axes.py +1 -1
  162. scitex/{vis → fig}/model/_figure.py +1 -1
  163. scitex/{vis → fig}/model/_guides.py +1 -1
  164. scitex/{vis → fig}/model/_plot.py +1 -1
  165. scitex/{vis → fig}/model/_styles.py +1 -1
  166. scitex/{vis → fig}/utils/__init__.py +1 -1
  167. scitex/io/__init__.py +22 -26
  168. scitex/io/_bundle.py +493 -0
  169. scitex/io/_flush.py +5 -2
  170. scitex/io/_load.py +98 -0
  171. scitex/io/_load_modules/_H5Explorer.py +5 -2
  172. scitex/io/_load_modules/_canvas.py +2 -2
  173. scitex/io/_load_modules/_image.py +3 -4
  174. scitex/io/_load_modules/_txt.py +4 -2
  175. scitex/io/_metadata.py +34 -324
  176. scitex/io/_metadata_modules/__init__.py +46 -0
  177. scitex/io/_metadata_modules/_embed.py +70 -0
  178. scitex/io/_metadata_modules/_read.py +64 -0
  179. scitex/io/_metadata_modules/_utils.py +79 -0
  180. scitex/io/_metadata_modules/embed_metadata_jpeg.py +74 -0
  181. scitex/io/_metadata_modules/embed_metadata_pdf.py +53 -0
  182. scitex/io/_metadata_modules/embed_metadata_png.py +26 -0
  183. scitex/io/_metadata_modules/embed_metadata_svg.py +62 -0
  184. scitex/io/_metadata_modules/read_metadata_jpeg.py +57 -0
  185. scitex/io/_metadata_modules/read_metadata_pdf.py +51 -0
  186. scitex/io/_metadata_modules/read_metadata_png.py +39 -0
  187. scitex/io/_metadata_modules/read_metadata_svg.py +44 -0
  188. scitex/io/_qr_utils.py +5 -3
  189. scitex/io/_save.py +548 -30
  190. scitex/io/_save_modules/_canvas.py +3 -3
  191. scitex/io/_save_modules/_image.py +5 -9
  192. scitex/io/_save_modules/_tex.py +7 -4
  193. scitex/io/_zip_bundle.py +439 -0
  194. scitex/io/utils/h5_to_zarr.py +11 -9
  195. scitex/msword/__init__.py +255 -0
  196. scitex/msword/profiles.py +357 -0
  197. scitex/msword/reader.py +753 -0
  198. scitex/msword/utils.py +289 -0
  199. scitex/msword/writer.py +362 -0
  200. scitex/plt/__init__.py +5 -2
  201. scitex/plt/_subplots/_AxesWrapper.py +6 -6
  202. scitex/plt/_subplots/_AxisWrapper.py +15 -9
  203. scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/__init__.py +36 -0
  204. scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/_labels.py +264 -0
  205. scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/_metadata.py +213 -0
  206. scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin/_visual.py +128 -0
  207. scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/__init__.py +59 -0
  208. scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_base.py +34 -0
  209. scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_scientific.py +593 -0
  210. scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_statistical.py +654 -0
  211. scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin/_stx_aliases.py +527 -0
  212. scitex/plt/_subplots/_AxisWrapperMixins/_RawMatplotlibMixin.py +321 -0
  213. scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/__init__.py +33 -0
  214. scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/_base.py +152 -0
  215. scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin/_wrappers.py +600 -0
  216. scitex/plt/_subplots/_AxisWrapperMixins/__init__.py +79 -5
  217. scitex/plt/_subplots/_FigWrapper.py +6 -6
  218. scitex/plt/_subplots/_SubplotsWrapper.py +28 -18
  219. scitex/plt/_subplots/_export_as_csv.py +35 -5
  220. scitex/plt/_subplots/_export_as_csv_formatters/__init__.py +8 -0
  221. scitex/plt/_subplots/_export_as_csv_formatters/_format_annotate.py +10 -21
  222. scitex/plt/_subplots/_export_as_csv_formatters/_format_eventplot.py +18 -7
  223. scitex/plt/_subplots/_export_as_csv_formatters/_format_imshow2d.py +28 -12
  224. scitex/plt/_subplots/_export_as_csv_formatters/_format_matshow.py +10 -4
  225. scitex/plt/_subplots/_export_as_csv_formatters/_format_plot_imshow.py +13 -1
  226. scitex/plt/_subplots/_export_as_csv_formatters/_format_plot_kde.py +12 -2
  227. scitex/plt/_subplots/_export_as_csv_formatters/_format_plot_scatter.py +10 -3
  228. scitex/plt/_subplots/_export_as_csv_formatters/_format_quiver.py +10 -4
  229. scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_jointplot.py +18 -3
  230. scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_lineplot.py +44 -36
  231. scitex/plt/_subplots/_export_as_csv_formatters/_format_sns_pairplot.py +14 -2
  232. scitex/plt/_subplots/_export_as_csv_formatters/_format_streamplot.py +11 -5
  233. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_bar.py +84 -0
  234. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_barh.py +85 -0
  235. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_conf_mat.py +14 -3
  236. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_contour.py +54 -0
  237. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_ecdf.py +14 -2
  238. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_errorbar.py +120 -0
  239. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_heatmap.py +16 -6
  240. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_image.py +29 -19
  241. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_imshow.py +63 -0
  242. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_joyplot.py +22 -5
  243. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_mean_ci.py +18 -14
  244. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_mean_std.py +18 -14
  245. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_median_iqr.py +18 -14
  246. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_raster.py +10 -2
  247. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_scatter.py +51 -0
  248. scitex/plt/_subplots/_export_as_csv_formatters/_format_stx_scatter_hist.py +18 -9
  249. scitex/plt/ax/_plot/_stx_ecdf.py +4 -2
  250. scitex/plt/gallery/_generate.py +421 -14
  251. scitex/plt/io/__init__.py +53 -0
  252. scitex/plt/io/_bundle.py +490 -0
  253. scitex/plt/io/_layered_bundle.py +1343 -0
  254. scitex/plt/styles/SCITEX_STYLE.yaml +26 -0
  255. scitex/plt/styles/__init__.py +14 -0
  256. scitex/plt/styles/presets.py +78 -0
  257. scitex/plt/utils/__init__.py +13 -1
  258. scitex/plt/utils/_collect_figure_metadata.py +10 -14
  259. scitex/plt/utils/_configure_mpl.py +6 -18
  260. scitex/plt/utils/_crop.py +32 -14
  261. scitex/plt/utils/_csv_column_naming.py +54 -0
  262. scitex/plt/utils/_figure_mm.py +116 -1
  263. scitex/plt/utils/_hitmap.py +1643 -0
  264. scitex/plt/utils/metadata/__init__.py +25 -0
  265. scitex/plt/utils/metadata/_core.py +9 -10
  266. scitex/plt/utils/metadata/_dimensions.py +6 -3
  267. scitex/plt/utils/metadata/_editable_export.py +405 -0
  268. scitex/plt/utils/metadata/_geometry_extraction.py +570 -0
  269. scitex/schema/__init__.py +109 -16
  270. scitex/schema/_canvas.py +1 -1
  271. scitex/schema/_plot.py +1015 -0
  272. scitex/schema/_stats.py +2 -2
  273. scitex/stats/__init__.py +117 -0
  274. scitex/stats/io/__init__.py +29 -0
  275. scitex/stats/io/_bundle.py +156 -0
  276. scitex/tex/__init__.py +4 -0
  277. scitex/tex/_export.py +890 -0
  278. {scitex-2.7.0.dist-info → scitex-2.8.1.dist-info}/METADATA +11 -1
  279. {scitex-2.7.0.dist-info → scitex-2.8.1.dist-info}/RECORD +294 -170
  280. scitex/io/memo.md +0 -2827
  281. scitex/plt/REQUESTS.md +0 -191
  282. scitex/plt/_subplots/TODO.md +0 -53
  283. scitex/plt/_subplots/_AxisWrapperMixins/_AdjustmentMixin.py +0 -559
  284. scitex/plt/_subplots/_AxisWrapperMixins/_MatplotlibPlotMixin.py +0 -1609
  285. scitex/plt/_subplots/_AxisWrapperMixins/_SeabornMixin.py +0 -447
  286. scitex/plt/templates/research-master/scitex/vis/gallery/area/fill_between.json +0 -110
  287. scitex/plt/templates/research-master/scitex/vis/gallery/area/fill_betweenx.json +0 -88
  288. scitex/plt/templates/research-master/scitex/vis/gallery/area/stx_fill_between.json +0 -103
  289. scitex/plt/templates/research-master/scitex/vis/gallery/area/stx_fillv.json +0 -106
  290. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/bar.json +0 -92
  291. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/barh.json +0 -92
  292. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/boxplot.json +0 -92
  293. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/stx_bar.json +0 -84
  294. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/stx_barh.json +0 -84
  295. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/stx_box.json +0 -83
  296. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/stx_boxplot.json +0 -93
  297. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/stx_violin.json +0 -91
  298. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/stx_violinplot.json +0 -91
  299. scitex/plt/templates/research-master/scitex/vis/gallery/categorical/violinplot.json +0 -91
  300. scitex/plt/templates/research-master/scitex/vis/gallery/contour/contour.json +0 -97
  301. scitex/plt/templates/research-master/scitex/vis/gallery/contour/contourf.json +0 -98
  302. scitex/plt/templates/research-master/scitex/vis/gallery/contour/stx_contour.json +0 -84
  303. scitex/plt/templates/research-master/scitex/vis/gallery/distribution/hist.json +0 -101
  304. scitex/plt/templates/research-master/scitex/vis/gallery/distribution/hist2d.json +0 -96
  305. scitex/plt/templates/research-master/scitex/vis/gallery/distribution/stx_ecdf.json +0 -95
  306. scitex/plt/templates/research-master/scitex/vis/gallery/distribution/stx_joyplot.json +0 -95
  307. scitex/plt/templates/research-master/scitex/vis/gallery/distribution/stx_kde.json +0 -93
  308. scitex/plt/templates/research-master/scitex/vis/gallery/grid/imshow.json +0 -95
  309. scitex/plt/templates/research-master/scitex/vis/gallery/grid/matshow.json +0 -95
  310. scitex/plt/templates/research-master/scitex/vis/gallery/grid/stx_conf_mat.json +0 -83
  311. scitex/plt/templates/research-master/scitex/vis/gallery/grid/stx_heatmap.json +0 -92
  312. scitex/plt/templates/research-master/scitex/vis/gallery/grid/stx_image.json +0 -121
  313. scitex/plt/templates/research-master/scitex/vis/gallery/grid/stx_imshow.json +0 -84
  314. scitex/plt/templates/research-master/scitex/vis/gallery/line/plot.json +0 -110
  315. scitex/plt/templates/research-master/scitex/vis/gallery/line/step.json +0 -92
  316. scitex/plt/templates/research-master/scitex/vis/gallery/line/stx_line.json +0 -95
  317. scitex/plt/templates/research-master/scitex/vis/gallery/line/stx_shaded_line.json +0 -96
  318. scitex/plt/templates/research-master/scitex/vis/gallery/scatter/hexbin.json +0 -95
  319. scitex/plt/templates/research-master/scitex/vis/gallery/scatter/scatter.json +0 -95
  320. scitex/plt/templates/research-master/scitex/vis/gallery/scatter/stem.json +0 -92
  321. scitex/plt/templates/research-master/scitex/vis/gallery/scatter/stx_scatter.json +0 -84
  322. scitex/plt/templates/research-master/scitex/vis/gallery/special/pie.json +0 -94
  323. scitex/plt/templates/research-master/scitex/vis/gallery/special/stx_raster.json +0 -109
  324. scitex/plt/templates/research-master/scitex/vis/gallery/special/stx_rectangle.json +0 -108
  325. scitex/plt/templates/research-master/scitex/vis/gallery/statistical/errorbar.json +0 -93
  326. scitex/plt/templates/research-master/scitex/vis/gallery/statistical/stx_errorbar.json +0 -84
  327. scitex/plt/templates/research-master/scitex/vis/gallery/statistical/stx_mean_ci.json +0 -96
  328. scitex/plt/templates/research-master/scitex/vis/gallery/statistical/stx_mean_std.json +0 -96
  329. scitex/plt/templates/research-master/scitex/vis/gallery/statistical/stx_median_iqr.json +0 -96
  330. scitex/plt/templates/research-master/scitex/vis/gallery/vector/quiver.json +0 -99
  331. scitex/plt/templates/research-master/scitex/vis/gallery/vector/streamplot.json +0 -100
  332. scitex/vis/__init__.py +0 -177
  333. scitex/vis/editor/_edit.py +0 -390
  334. scitex/vis/editor/flask_editor/_bbox.py +0 -529
  335. scitex/vis/editor/flask_editor/_core.py +0 -168
  336. scitex/vis/editor/flask_editor/_renderer.py +0 -393
  337. scitex/vis/editor/flask_editor/templates/__init__.py +0 -33
  338. scitex/vis/editor/flask_editor/templates/_html.py +0 -513
  339. scitex/vis/editor/flask_editor/templates/_scripts.py +0 -1261
  340. scitex/vis/editor/flask_editor/templates/_styles.py +0 -739
  341. /scitex/{vis → fig}/README.md +0 -0
  342. /scitex/{vis → fig}/backend/__init__.py +0 -0
  343. /scitex/{vis → fig}/backend/_export.py +0 -0
  344. /scitex/{vis → fig}/backend/_render.py +0 -0
  345. /scitex/{vis → fig}/docs/CANVAS_ARCHITECTURE.md +0 -0
  346. /scitex/{vis → fig}/editor/_flask_editor.py +0 -0
  347. /scitex/{vis → fig}/editor/flask_editor/__init__.py +0 -0
  348. /scitex/{vis → fig}/editor/flask_editor/_utils.py +0 -0
  349. /scitex/{vis → fig}/io/_directory.py +0 -0
  350. /scitex/{vis → fig}/model/_plot_types.py +0 -0
  351. /scitex/{vis → fig}/utils/_defaults.py +0 -0
  352. /scitex/{vis → fig}/utils/_validate.py +0 -0
  353. {scitex-2.7.0.dist-info → scitex-2.8.1.dist-info}/WHEEL +0 -0
  354. {scitex-2.7.0.dist-info → scitex-2.8.1.dist-info}/entry_points.txt +0 -0
  355. {scitex-2.7.0.dist-info → scitex-2.8.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,852 @@
1
+ #!/usr/bin/env python3
2
+ # -*- coding: utf-8 -*-
3
+ # File: ./src/scitex/vis/editor/flask_editor/templates/html.py
4
+ """HTML structure for the Flask editor UI."""
5
+
6
+ HTML_BODY = """
7
+ <div class="container">
8
+ <!-- Global Loading Overlay (visible for both single and multi-panel views) -->
9
+ <div id="global-loading-overlay" class="global-loading-overlay" style="display: none;">
10
+ <div class="spinner"></div>
11
+ <span class="loading-text">Updating...</span>
12
+ </div>
13
+ <div class="preview">
14
+ <!-- Panel Grid View (for multi-panel figz bundles) -->
15
+ <div class="panel-grid-section" id="panel-grid-section" style="display: none;">
16
+ <div class="panel-grid-header">
17
+ <div class="canvas-controls">
18
+ <button class="btn btn-secondary btn-sm" id="panel-debug-btn" onclick="togglePanelDebugMode()">Show Hit Regions</button>
19
+ <div class="toolbar-separator"></div>
20
+ <div class="download-dropdown">
21
+ <button class="btn btn-primary btn-sm" onclick="toggleDownloadMenu()" id="download-btn">
22
+ ⬇ Download
23
+ </button>
24
+ <div id="download-menu" class="download-menu">
25
+ <a href="/download/png" class="download-item">PNG (300 DPI)</a>
26
+ <a href="/download/svg" class="download-item">SVG (Vector)</a>
27
+ <a href="/download/pdf" class="download-item">PDF</a>
28
+ <div class="download-divider"></div>
29
+ <a href="/download/jpeg" class="download-item">JPEG</a>
30
+ <a href="/download_figz" class="download-item">FIGZ Bundle</a>
31
+ </div>
32
+ </div>
33
+ <div class="toolbar-separator"></div>
34
+ <button class="btn btn-secondary btn-sm" onclick="showShortcutHelp()" title="Keyboard Shortcuts (? or F1)">
35
+ ⌨ Shortcuts
36
+ </button>
37
+ </div>
38
+ </div>
39
+ <div class="panel-canvas" id="panel-canvas">
40
+ <!-- Panels will be rendered here -->
41
+ </div>
42
+ </div>
43
+
44
+ <!-- Single-panel preview (hidden for multi-panel figz bundles) -->
45
+ <div class="preview-wrapper" id="preview-wrapper">
46
+ <div class="preview-header" id="preview-header" style="display: none;">
47
+ <span id="current-panel-name">Panel A</span>
48
+ <span id="panel-indicator"></span>
49
+ </div>
50
+ <div class="preview-container" id="preview-container">
51
+ <img id="preview" src="" alt="Figure Preview">
52
+ <svg id="hover-overlay" class="hover-overlay"></svg>
53
+ <div id="loading-overlay" class="loading-overlay" style="display: none;">
54
+ <div class="spinner"></div>
55
+ </div>
56
+ </div>
57
+ <button id="debug-toggle-btn" class="debug-toggle" onclick="toggleDebugMode()">Show Hit Areas</button>
58
+ </div>
59
+ </div>
60
+ <div class="controls">
61
+ <div class="controls-header">
62
+ <div>
63
+ <h1>SciTeX Figure Editor</h1>
64
+ <div class="filename">{{ filename }}</div>
65
+ {% if panel_path %}<div class="panel-path" id="panel-path-display">Panel: {{ panel_path }}</div>{% endif %}
66
+ </div>
67
+ <button class="theme-toggle" onclick="toggleTheme()" title="Toggle light/dark mode">
68
+ <span id="theme-icon">&#9790;</span>
69
+ </button>
70
+ </div>
71
+
72
+ <div class="controls-body">
73
+ <!-- Selected Element Section (Dynamic) -->
74
+ <div class="section" id="section-selected" style="display: none;">
75
+ <div class="section-header section-toggle" onclick="toggleSection(this)">
76
+ <span id="selected-element-title">Selected: None</span>
77
+ </div>
78
+ <div class="section-content">
79
+ <div id="selected-element-info" class="selected-info">
80
+ <div class="element-type-badge" id="element-type-badge"></div>
81
+ <div class="element-axis-info" id="element-axis-info"></div>
82
+ </div>
83
+
84
+ <!-- Trace/Line Properties -->
85
+ <div id="selected-trace-props" class="element-props" style="display: none;">
86
+ <div class="field">
87
+ <label>Label</label>
88
+ <input type="text" id="sel-trace-label" placeholder="Trace label">
89
+ </div>
90
+ <div class="field">
91
+ <label>Color</label>
92
+ <div class="color-field">
93
+ <input type="color" id="sel-trace-color" value="#1f77b4">
94
+ <input type="text" id="sel-trace-color-text" value="#1f77b4">
95
+ </div>
96
+ </div>
97
+ <div class="field-row">
98
+ <div class="field">
99
+ <label>Line Width (pt)</label>
100
+ <input type="number" id="sel-trace-linewidth" value="1.0" min="0.1" max="5" step="0.1">
101
+ </div>
102
+ <div class="field">
103
+ <label>Line Style</label>
104
+ <select id="sel-trace-linestyle">
105
+ <option value="-">Solid</option>
106
+ <option value="--">Dashed</option>
107
+ <option value="-.">Dash-dot</option>
108
+ <option value=":">Dotted</option>
109
+ </select>
110
+ </div>
111
+ </div>
112
+ <div class="field-row">
113
+ <div class="field">
114
+ <label>Marker</label>
115
+ <select id="sel-trace-marker">
116
+ <option value="">None</option>
117
+ <option value="o">Circle</option>
118
+ <option value="s">Square</option>
119
+ <option value="^">Triangle</option>
120
+ <option value="D">Diamond</option>
121
+ <option value="x">X</option>
122
+ <option value="+">Plus</option>
123
+ </select>
124
+ </div>
125
+ <div class="field">
126
+ <label>Marker Size</label>
127
+ <input type="number" id="sel-trace-markersize" value="4" min="1" max="20" step="0.5">
128
+ </div>
129
+ </div>
130
+ <div class="field">
131
+ <label>Alpha (0-1)</label>
132
+ <input type="range" id="sel-trace-alpha" min="0" max="1" step="0.1" value="1">
133
+ </div>
134
+ </div>
135
+
136
+ <!-- Scatter Properties -->
137
+ <div id="selected-scatter-props" class="element-props" style="display: none;">
138
+ <div class="field">
139
+ <label>Color</label>
140
+ <div class="color-field">
141
+ <input type="color" id="sel-scatter-color" value="#1f77b4">
142
+ <input type="text" id="sel-scatter-color-text" value="#1f77b4">
143
+ </div>
144
+ </div>
145
+ <div class="field-row">
146
+ <div class="field">
147
+ <label>Marker Size</label>
148
+ <input type="number" id="sel-scatter-size" value="20" min="1" max="200" step="1">
149
+ </div>
150
+ <div class="field">
151
+ <label>Marker</label>
152
+ <select id="sel-scatter-marker">
153
+ <option value="o">Circle</option>
154
+ <option value="s">Square</option>
155
+ <option value="^">Triangle</option>
156
+ <option value="D">Diamond</option>
157
+ <option value="x">X</option>
158
+ </select>
159
+ </div>
160
+ </div>
161
+ <div class="field">
162
+ <label>Alpha (0-1)</label>
163
+ <input type="range" id="sel-scatter-alpha" min="0" max="1" step="0.1" value="0.7">
164
+ </div>
165
+ <div class="field">
166
+ <label>Edge Color</label>
167
+ <div class="color-field">
168
+ <input type="color" id="sel-scatter-edgecolor" value="#000000">
169
+ <input type="text" id="sel-scatter-edgecolor-text" value="#000000">
170
+ </div>
171
+ </div>
172
+ </div>
173
+
174
+ <!-- Fill Properties -->
175
+ <div id="selected-fill-props" class="element-props" style="display: none;">
176
+ <div class="field">
177
+ <label>Fill Color</label>
178
+ <div class="color-field">
179
+ <input type="color" id="sel-fill-color" value="#1f77b4">
180
+ <input type="text" id="sel-fill-color-text" value="#1f77b4">
181
+ </div>
182
+ </div>
183
+ <div class="field">
184
+ <label>Alpha (0-1)</label>
185
+ <input type="range" id="sel-fill-alpha" min="0" max="1" step="0.05" value="0.3">
186
+ </div>
187
+ </div>
188
+
189
+ <!-- Bar Properties -->
190
+ <div id="selected-bar-props" class="element-props" style="display: none;">
191
+ <div class="field">
192
+ <label>Face Color</label>
193
+ <div class="color-field">
194
+ <input type="color" id="sel-bar-facecolor" value="#1f77b4">
195
+ <input type="text" id="sel-bar-facecolor-text" value="#1f77b4">
196
+ </div>
197
+ </div>
198
+ <div class="field">
199
+ <label>Edge Color</label>
200
+ <div class="color-field">
201
+ <input type="color" id="sel-bar-edgecolor" value="#000000">
202
+ <input type="text" id="sel-bar-edgecolor-text" value="#000000">
203
+ </div>
204
+ </div>
205
+ <div class="field">
206
+ <label>Alpha (0-1)</label>
207
+ <input type="range" id="sel-bar-alpha" min="0" max="1" step="0.1" value="1">
208
+ </div>
209
+ </div>
210
+
211
+ <!-- Label/Text Properties -->
212
+ <div id="selected-label-props" class="element-props" style="display: none;">
213
+ <div class="field">
214
+ <label>Text</label>
215
+ <input type="text" id="sel-label-text" placeholder="Label text">
216
+ </div>
217
+ <div class="field-row">
218
+ <div class="field">
219
+ <label>Font Size (pt)</label>
220
+ <input type="number" id="sel-label-fontsize" value="7" min="4" max="24" step="1">
221
+ </div>
222
+ <div class="field">
223
+ <label>Font Weight</label>
224
+ <select id="sel-label-fontweight">
225
+ <option value="normal">Normal</option>
226
+ <option value="bold">Bold</option>
227
+ </select>
228
+ </div>
229
+ </div>
230
+ <div class="field">
231
+ <label>Color</label>
232
+ <div class="color-field">
233
+ <input type="color" id="sel-label-color" value="#000000">
234
+ <input type="text" id="sel-label-color-text" value="#000000">
235
+ </div>
236
+ </div>
237
+ </div>
238
+
239
+ <!-- Panel Properties -->
240
+ <div id="selected-panel-props" class="element-props" style="display: none;">
241
+ <div class="field">
242
+ <label>Panel Title</label>
243
+ <input type="text" id="sel-panel-title" placeholder="Panel title">
244
+ </div>
245
+ <div class="field-row">
246
+ <div class="field">
247
+ <label>X Label</label>
248
+ <input type="text" id="sel-panel-xlabel" placeholder="X axis">
249
+ </div>
250
+ <div class="field">
251
+ <label>Y Label</label>
252
+ <input type="text" id="sel-panel-ylabel" placeholder="Y axis">
253
+ </div>
254
+ </div>
255
+ <div class="field">
256
+ <label>Background Color</label>
257
+ <div class="color-field">
258
+ <input type="color" id="sel-panel-facecolor" value="#ffffff">
259
+ <input type="text" id="sel-panel-facecolor-text" value="#ffffff">
260
+ </div>
261
+ </div>
262
+ <label class="checkbox-field">
263
+ <input type="checkbox" id="sel-panel-transparent" checked>
264
+ <span>Transparent</span>
265
+ </label>
266
+ <label class="checkbox-field">
267
+ <input type="checkbox" id="sel-panel-grid">
268
+ <span>Show Grid</span>
269
+ </label>
270
+ </div>
271
+
272
+ <!-- X-Axis Properties -->
273
+ <div id="selected-xaxis-props" class="element-props" style="display: none;">
274
+ <div class="field-row">
275
+ <div class="field">
276
+ <label>Tick Font Size (pt)</label>
277
+ <input type="number" id="sel-xaxis-fontsize" value="7" min="4" max="16" step="1">
278
+ </div>
279
+ <div class="field">
280
+ <label>Label Font Size (pt)</label>
281
+ <input type="number" id="sel-xaxis-label-fontsize" value="7" min="4" max="16" step="1">
282
+ </div>
283
+ </div>
284
+ <div class="field-row">
285
+ <div class="field">
286
+ <label>Tick Direction</label>
287
+ <select id="sel-xaxis-direction">
288
+ <option value="out">Out</option>
289
+ <option value="in">In</option>
290
+ <option value="inout">Both</option>
291
+ </select>
292
+ </div>
293
+ <div class="field">
294
+ <label>N Ticks</label>
295
+ <input type="number" id="sel-xaxis-nticks" value="5" min="2" max="15" step="1">
296
+ </div>
297
+ </div>
298
+ <label class="checkbox-field">
299
+ <input type="checkbox" id="sel-xaxis-hide-ticks">
300
+ <span>Hide Ticks</span>
301
+ </label>
302
+ <label class="checkbox-field">
303
+ <input type="checkbox" id="sel-xaxis-hide-label">
304
+ <span>Hide Label</span>
305
+ </label>
306
+ <label class="checkbox-field">
307
+ <input type="checkbox" id="sel-xaxis-hide-spine">
308
+ <span>Hide Spine</span>
309
+ </label>
310
+ </div>
311
+
312
+ <!-- Y-Axis Properties -->
313
+ <div id="selected-yaxis-props" class="element-props" style="display: none;">
314
+ <div class="field-row">
315
+ <div class="field">
316
+ <label>Tick Font Size (pt)</label>
317
+ <input type="number" id="sel-yaxis-fontsize" value="7" min="4" max="16" step="1">
318
+ </div>
319
+ <div class="field">
320
+ <label>Label Font Size (pt)</label>
321
+ <input type="number" id="sel-yaxis-label-fontsize" value="7" min="4" max="16" step="1">
322
+ </div>
323
+ </div>
324
+ <div class="field-row">
325
+ <div class="field">
326
+ <label>Tick Direction</label>
327
+ <select id="sel-yaxis-direction">
328
+ <option value="out">Out</option>
329
+ <option value="in">In</option>
330
+ <option value="inout">Both</option>
331
+ </select>
332
+ </div>
333
+ <div class="field">
334
+ <label>N Ticks</label>
335
+ <input type="number" id="sel-yaxis-nticks" value="5" min="2" max="15" step="1">
336
+ </div>
337
+ </div>
338
+ <label class="checkbox-field">
339
+ <input type="checkbox" id="sel-yaxis-hide-ticks">
340
+ <span>Hide Ticks</span>
341
+ </label>
342
+ <label class="checkbox-field">
343
+ <input type="checkbox" id="sel-yaxis-hide-label">
344
+ <span>Hide Label</span>
345
+ </label>
346
+ <label class="checkbox-field">
347
+ <input type="checkbox" id="sel-yaxis-hide-spine">
348
+ <span>Hide Spine</span>
349
+ </label>
350
+ </div>
351
+
352
+ <!-- Statistics (for data elements) -->
353
+ <div id="selected-stats" class="element-stats" style="display: none;">
354
+ <div class="stats-header">Statistics</div>
355
+ <div class="stats-grid">
356
+ <div class="stat-item">
357
+ <span class="stat-label">N points</span>
358
+ <span class="stat-value" id="stat-n">-</span>
359
+ </div>
360
+ <div class="stat-item">
361
+ <span class="stat-label">Mean</span>
362
+ <span class="stat-value" id="stat-mean">-</span>
363
+ </div>
364
+ <div class="stat-item">
365
+ <span class="stat-label">Std</span>
366
+ <span class="stat-value" id="stat-std">-</span>
367
+ </div>
368
+ <div class="stat-item">
369
+ <span class="stat-label">Min</span>
370
+ <span class="stat-value" id="stat-min">-</span>
371
+ </div>
372
+ <div class="stat-item">
373
+ <span class="stat-label">Max</span>
374
+ <span class="stat-value" id="stat-max">-</span>
375
+ </div>
376
+ <div class="stat-item">
377
+ <span class="stat-label">Range</span>
378
+ <span class="stat-value" id="stat-range">-</span>
379
+ </div>
380
+ </div>
381
+ </div>
382
+
383
+ <button class="btn btn-primary" onclick="applySelectedElementChanges()" style="margin-top: 10px;">Apply Changes</button>
384
+ </div>
385
+ </div>
386
+
387
+ <!-- Dimensions Section (General - moved higher) -->
388
+ <div class="section" id="section-dimensions">
389
+ <div class="section-header section-toggle collapsed" onclick="toggleSection(this)">Dimensions</div>
390
+ <div class="section-content collapsed">
391
+ <div class="field" style="margin-bottom: 8px;">
392
+ <label>Unit</label>
393
+ <div class="unit-toggle">
394
+ <button class="unit-btn active" id="unit-mm" onclick="setDimensionUnit('mm')">mm</button>
395
+ <button class="unit-btn" id="unit-inch" onclick="setDimensionUnit('inch')">inch</button>
396
+ </div>
397
+ </div>
398
+ <div class="field-row">
399
+ <div class="field">
400
+ <label id="fig_width_label">Width (mm)</label>
401
+ <input type="number" id="fig_width" value="80" min="10" max="300" step="1">
402
+ </div>
403
+ <div class="field">
404
+ <label id="fig_height_label">Height (mm)</label>
405
+ <input type="number" id="fig_height" value="68" min="10" max="300" step="1">
406
+ </div>
407
+ </div>
408
+ <div class="field">
409
+ <label>DPI</label>
410
+ <input type="number" id="dpi" value="300" min="72" max="600" step="1">
411
+ </div>
412
+ </div>
413
+ </div>
414
+
415
+ <!-- Style Section (General - moved higher) -->
416
+ <div class="section" id="section-style">
417
+ <div class="section-header section-toggle collapsed" onclick="toggleSection(this)">Style</div>
418
+ <div class="section-content collapsed">
419
+ <label class="checkbox-field">
420
+ <input type="checkbox" id="grid">
421
+ <span>Show Grid</span>
422
+ </label>
423
+ <div class="field">
424
+ <label>Label Size (pt)</label>
425
+ <input type="number" id="axis_fontsize" value="7" min="4" max="16" step="1">
426
+ </div>
427
+ <div class="field">
428
+ <label>Background</label>
429
+ <div class="bg-toggle">
430
+ <button class="bg-btn" id="bg-white" onclick="setBackgroundType('white')" title="White background">
431
+ <span class="bg-preview white"></span>
432
+ <span>White</span>
433
+ </button>
434
+ <button class="bg-btn active" id="bg-transparent" onclick="setBackgroundType('transparent')" title="Transparent background">
435
+ <span class="bg-preview transparent"></span>
436
+ <span>Transparent</span>
437
+ </button>
438
+ <button class="bg-btn" id="bg-black" onclick="setBackgroundType('black')" title="Black background">
439
+ <span class="bg-preview black"></span>
440
+ <span>Black</span>
441
+ </button>
442
+ </div>
443
+ </div>
444
+ <input type="hidden" id="facecolor" value="#ffffff">
445
+ <input type="hidden" id="transparent" value="true">
446
+ </div>
447
+ </div>
448
+
449
+ <!-- Title, Labels & Caption Section -->
450
+ <div class="section" id="section-labels">
451
+ <div class="section-header section-toggle collapsed" onclick="toggleSection(this)">Title, Labels & Caption</div>
452
+ <div class="section-content collapsed">
453
+ <p class="section-hint">For multi-panel figures, select a panel to edit its labels.</p>
454
+
455
+ <!-- Title row in table style -->
456
+ <table class="props-table" style="width: 100%; border-collapse: collapse; margin-bottom: 8px;">
457
+ <tr>
458
+ <td style="width: 70px; padding: 4px 0;"><label>Title</label></td>
459
+ <td style="padding: 4px 0;">
460
+ <input type="text" id="title" placeholder="Figure title" style="width: 100%;">
461
+ </td>
462
+ <td style="width: 50px; padding: 4px 0; text-align: right;">
463
+ <input type="number" id="title_fontsize" value="8" min="4" max="24" step="1" style="width: 45px;" title="Font size (pt)">
464
+ </td>
465
+ <td style="width: 24px; padding: 4px 0;">
466
+ <label class="checkbox-field" style="margin: 0;" title="Show title">
467
+ <input type="checkbox" id="show_title" checked>
468
+ </label>
469
+ </td>
470
+ </tr>
471
+ <tr>
472
+ <td style="padding: 4px 0;"><label>X Label</label></td>
473
+ <td style="padding: 4px 0;">
474
+ <input type="text" id="xlabel" placeholder="X axis label" style="width: 100%;">
475
+ </td>
476
+ <td colspan="2"></td>
477
+ </tr>
478
+ <tr>
479
+ <td style="padding: 4px 0;"><label>Y Label</label></td>
480
+ <td style="padding: 4px 0;">
481
+ <input type="text" id="ylabel" placeholder="Y axis label" style="width: 100%;">
482
+ </td>
483
+ <td colspan="2"></td>
484
+ </tr>
485
+ <tr>
486
+ <td style="padding: 4px 0; vertical-align: top;"><label>Caption</label></td>
487
+ <td style="padding: 4px 0;">
488
+ <textarea id="caption" rows="2" placeholder="Figure caption..." style="width: 100%; padding: 6px; border: 1px solid var(--border-muted); border-radius: 4px; background: var(--bg-surface); color: var(--text-primary); font-size: 0.85em; resize: vertical;"></textarea>
489
+ </td>
490
+ <td style="padding: 4px 0; text-align: right; vertical-align: top;">
491
+ <input type="number" id="caption_fontsize" value="7" min="4" max="16" step="1" style="width: 45px;" title="Font size (pt)">
492
+ </td>
493
+ <td style="padding: 4px 0; vertical-align: top;">
494
+ <label class="checkbox-field" style="margin: 0;" title="Show caption">
495
+ <input type="checkbox" id="show_caption">
496
+ </label>
497
+ </td>
498
+ </tr>
499
+ </table>
500
+ </div>
501
+ </div>
502
+
503
+ <!-- Axis & Ticks Section (merged with Axis Limits) -->
504
+ <div class="section" id="section-ticks">
505
+ <div class="section-header section-toggle collapsed" onclick="toggleSection(this)">Axis & Ticks</div>
506
+ <div class="section-content collapsed">
507
+ <!-- Axis Limits (merged from separate section) -->
508
+ <div class="subsection-header">Limits</div>
509
+ <div class="field-row">
510
+ <div class="field">
511
+ <label>X Range</label>
512
+ <div class="field-row" style="gap: 4px; margin-top: 4px;">
513
+ <input type="number" id="xmin" step="any" placeholder="Min">
514
+ <input type="number" id="xmax" step="any" placeholder="Max">
515
+ </div>
516
+ </div>
517
+ <div class="field">
518
+ <label>Y Range</label>
519
+ <div class="field-row" style="gap: 4px; margin-top: 4px;">
520
+ <input type="number" id="ymin" step="any" placeholder="Min">
521
+ <input type="number" id="ymax" step="any" placeholder="Max">
522
+ </div>
523
+ </div>
524
+ </div>
525
+
526
+ <!-- Axis Tabs -->
527
+ <div class="subsection-header" style="margin-top: 12px;">Tick Settings</div>
528
+ <div class="axis-tabs">
529
+ <button class="axis-tab active" onclick="switchAxisTab('x')" id="axis-tab-x">X</button>
530
+ <button class="axis-tab" onclick="switchAxisTab('y')" id="axis-tab-y">Y</button>
531
+ <button class="axis-tab" onclick="switchAxisTab('z')" id="axis-tab-z">Z</button>
532
+ </div>
533
+
534
+ <!-- X Axis Panel -->
535
+ <div class="axis-panel" id="axis-panel-x">
536
+ <div class="subsection-header">Bottom (Primary)</div>
537
+ <div class="field-row">
538
+ <div class="field">
539
+ <label class="checkbox-field">
540
+ <input type="checkbox" id="hide_x_ticks">
541
+ <span>Hide</span>
542
+ </label>
543
+ </div>
544
+ <div class="field">
545
+ <label>N Ticks</label>
546
+ <input type="number" id="x_n_ticks" value="4" min="2" max="10" step="1">
547
+ </div>
548
+ </div>
549
+ <div class="field-row">
550
+ <div class="field">
551
+ <label>Font Size (pt)</label>
552
+ <input type="number" id="x_tick_fontsize" value="7" min="4" max="16" step="1">
553
+ </div>
554
+ <div class="field">
555
+ <label>Direction</label>
556
+ <select id="x_tick_direction">
557
+ <option value="out">Out</option>
558
+ <option value="in">In</option>
559
+ <option value="inout">Both</option>
560
+ </select>
561
+ </div>
562
+ </div>
563
+ <div class="field-row">
564
+ <div class="field">
565
+ <label>Length (mm)</label>
566
+ <input type="number" id="x_tick_length" value="0.8" min="0.1" max="3" step="0.1">
567
+ </div>
568
+ <div class="field">
569
+ <label>Width (mm)</label>
570
+ <input type="number" id="x_tick_width" value="0.2" min="0.05" max="1" step="0.05">
571
+ </div>
572
+ </div>
573
+ <div class="field-row">
574
+ <div class="field">
575
+ <label class="checkbox-field">
576
+ <input type="checkbox" id="hide_bottom_spine" unchecked>
577
+ <span>Hide Spine</span>
578
+ </label>
579
+ </div>
580
+ </div>
581
+
582
+ <div class="subsection-header" style="margin-top: 12px;">Top (Secondary)</div>
583
+ <div class="field-row">
584
+ <div class="field">
585
+ <label class="checkbox-field">
586
+ <input type="checkbox" id="show_x_top" unchecked>
587
+ <span>Show</span>
588
+ </label>
589
+ </div>
590
+ <div class="field">
591
+ <label class="checkbox-field">
592
+ <input type="checkbox" id="x_top_mirror">
593
+ <span>Mirror</span>
594
+ </label>
595
+ </div>
596
+ </div>
597
+ <div class="field-row">
598
+ <div class="field">
599
+ <label class="checkbox-field">
600
+ <input type="checkbox" id="hide_top_spine" checked>
601
+ <span>Hide Spine</span>
602
+ </label>
603
+ </div>
604
+ </div>
605
+ </div>
606
+
607
+ <!-- Y Axis Panel -->
608
+ <div class="axis-panel" id="axis-panel-y" style="display: none;">
609
+ <div class="subsection-header">Left (Primary)</div>
610
+ <div class="field-row">
611
+ <div class="field">
612
+ <label class="checkbox-field">
613
+ <input type="checkbox" id="hide_y_ticks">
614
+ <span>Hide</span>
615
+ </label>
616
+ </div>
617
+ <div class="field">
618
+ <label>N Ticks</label>
619
+ <input type="number" id="y_n_ticks" value="4" min="2" max="10" step="1">
620
+ </div>
621
+ </div>
622
+ <div class="field-row">
623
+ <div class="field">
624
+ <label>Font Size (pt)</label>
625
+ <input type="number" id="y_tick_fontsize" value="7" min="4" max="16" step="1">
626
+ </div>
627
+ <div class="field">
628
+ <label>Direction</label>
629
+ <select id="y_tick_direction">
630
+ <option value="out">Out</option>
631
+ <option value="in">In</option>
632
+ <option value="inout">Both</option>
633
+ </select>
634
+ </div>
635
+ </div>
636
+ <div class="field-row">
637
+ <div class="field">
638
+ <label>Length (mm)</label>
639
+ <input type="number" id="y_tick_length" value="0.8" min="0.1" max="3" step="0.1">
640
+ </div>
641
+ <div class="field">
642
+ <label>Width (mm)</label>
643
+ <input type="number" id="y_tick_width" value="0.2" min="0.05" max="1" step="0.05">
644
+ </div>
645
+ </div>
646
+ <div class="field-row">
647
+ <div class="field">
648
+ <label class="checkbox-field">
649
+ <input type="checkbox" id="hide_left_spine" unchecked>
650
+ <span>Hide Spine</span>
651
+ </label>
652
+ </div>
653
+ </div>
654
+
655
+ <div class="subsection-header" style="margin-top: 12px;">Right (Secondary)</div>
656
+ <div class="field-row">
657
+ <div class="field">
658
+ <label class="checkbox-field">
659
+ <input type="checkbox" id="show_y_right" unchecked>
660
+ <span>Show</span>
661
+ </label>
662
+ </div>
663
+ <div class="field">
664
+ <label class="checkbox-field">
665
+ <input type="checkbox" id="y_right_mirror">
666
+ <span>Mirror</span>
667
+ </label>
668
+ </div>
669
+ </div>
670
+ <div class="field-row">
671
+ <div class="field">
672
+ <label class="checkbox-field">
673
+ <input type="checkbox" id="hide_right_spine" checked>
674
+ <span>Hide Spine</span>
675
+ </label>
676
+ </div>
677
+ </div>
678
+ </div>
679
+
680
+ <!-- Z Axis Panel (for 3D plots) -->
681
+ <div class="axis-panel" id="axis-panel-z" style="display: none;">
682
+ <div class="subsection-header">Z Axis (3D)</div>
683
+ <div class="field-row">
684
+ <div class="field">
685
+ <label class="checkbox-field">
686
+ <input type="checkbox" id="hide_z_ticks">
687
+ <span>Hide</span>
688
+ </label>
689
+ </div>
690
+ <div class="field">
691
+ <label>N Ticks</label>
692
+ <input type="number" id="z_n_ticks" value="4" min="2" max="10" step="1">
693
+ </div>
694
+ </div>
695
+ <div class="field-row">
696
+ <div class="field">
697
+ <label>Font Size (pt)</label>
698
+ <input type="number" id="z_tick_fontsize" value="7" min="4" max="16" step="1">
699
+ </div>
700
+ <div class="field">
701
+ <label>Direction</label>
702
+ <select id="z_tick_direction">
703
+ <option value="out">Out</option>
704
+ <option value="in">In</option>
705
+ <option value="inout">Both</option>
706
+ </select>
707
+ </div>
708
+ </div>
709
+ <p class="section-hint">Z axis settings apply to 3D plots only.</p>
710
+ </div>
711
+
712
+ <!-- Common Settings -->
713
+ <div class="subsection-header" style="margin-top: 12px;">Common</div>
714
+ <div class="field">
715
+ <label>Spine Width (mm)</label>
716
+ <input type="number" id="axis_width" value="0.2" min="0.05" max="1" step="0.05">
717
+ </div>
718
+ </div>
719
+ </div>
720
+
721
+ <!-- Traces Section (Simplified for beta) -->
722
+ <div class="section" id="section-traces">
723
+ <div class="section-header section-toggle collapsed" onclick="toggleSection(this)">Traces</div>
724
+ <div class="section-content collapsed">
725
+ <p class="section-hint">Click on a trace in the preview to edit its properties.</p>
726
+ <div class="traces-list" id="traces-list">
727
+ <!-- Dynamically populated -->
728
+ </div>
729
+ </div>
730
+ </div>
731
+
732
+ <!-- Legend Section (Enhanced) -->
733
+ <div class="section" id="section-legend">
734
+ <div class="section-header section-toggle collapsed" onclick="toggleSection(this)">Legend</div>
735
+ <div class="section-content collapsed">
736
+ <label class="checkbox-field">
737
+ <input type="checkbox" id="legend_visible" checked>
738
+ <span>Show Legend</span>
739
+ </label>
740
+ <div class="field-row">
741
+ <div class="field">
742
+ <label>Position</label>
743
+ <select id="legend_loc" onchange="toggleCustomLegendPosition()">
744
+ <option value="best">Best (auto)</option>
745
+ <option value="upper right">Upper Right</option>
746
+ <option value="upper left">Upper Left</option>
747
+ <option value="lower right">Lower Right</option>
748
+ <option value="lower left">Lower Left</option>
749
+ <option value="center right">Center Right</option>
750
+ <option value="center left">Center Left</option>
751
+ <option value="upper center">Upper Center</option>
752
+ <option value="lower center">Lower Center</option>
753
+ <option value="center">Center</option>
754
+ <option value="custom">Custom...</option>
755
+ </select>
756
+ </div>
757
+ <div class="field">
758
+ <label>Columns</label>
759
+ <input type="number" id="legend_ncols" value="1" min="1" max="5" step="1" title="Number of columns">
760
+ </div>
761
+ </div>
762
+ <div id="custom-legend-coords" class="field-row" style="display: none; margin-top: 8px;">
763
+ <div class="field">
764
+ <label>X (0-1)</label>
765
+ <input type="number" id="legend_x" value="0.95" min="0" max="1.5" step="0.01" title="X coordinate in axes fraction">
766
+ </div>
767
+ <div class="field">
768
+ <label>Y (0-1)</label>
769
+ <input type="number" id="legend_y" value="0.95" min="-0.5" max="1.5" step="0.01" title="Y coordinate in axes fraction">
770
+ </div>
771
+ </div>
772
+ <div class="field-row" style="margin-top: 8px;">
773
+ <div class="field">
774
+ <label class="checkbox-field">
775
+ <input type="checkbox" id="legend_frameon">
776
+ <span>Show Frame</span>
777
+ </label>
778
+ </div>
779
+ <div class="field">
780
+ <label>Font Size (pt)</label>
781
+ <input type="number" id="legend_fontsize" value="6" min="4" max="16" step="1">
782
+ </div>
783
+ </div>
784
+ </div>
785
+ </div>
786
+
787
+ <!-- Statistics Section -->
788
+ <div class="section" id="section-statistics">
789
+ <div class="section-header section-toggle" onclick="toggleSection(this)">Statistics</div>
790
+ <div class="section-content">
791
+ <div id="stats-container">
792
+ <div class="stats-loading">Loading statistics...</div>
793
+ </div>
794
+ <button class="btn btn-secondary" onclick="refreshStats()" style="margin-top: 8px;">Refresh Stats</button>
795
+ </div>
796
+ </div>
797
+
798
+ <!-- Annotations Section -->
799
+ <div class="section" id="section-annotations">
800
+ <div class="section-header section-toggle collapsed" onclick="toggleSection(this)">Annotations</div>
801
+ <div class="section-content collapsed">
802
+ <div class="field">
803
+ <label>Text</label>
804
+ <input type="text" id="annot-text" placeholder="Annotation text">
805
+ </div>
806
+ <div class="field-row">
807
+ <div class="field">
808
+ <label>X (0-1)</label>
809
+ <input type="number" id="annot-x" value="0.5" min="0" max="1" step="0.05">
810
+ </div>
811
+ <div class="field">
812
+ <label>Y (0-1)</label>
813
+ <input type="number" id="annot-y" value="0.5" min="0" max="1" step="0.05">
814
+ </div>
815
+ <div class="field">
816
+ <label>Size</label>
817
+ <input type="number" id="annot-size" value="8" min="4" max="24" step="1">
818
+ </div>
819
+ </div>
820
+ <button class="btn btn-secondary" onclick="addAnnotation()">Add Annotation</button>
821
+ <div class="annotations-list" id="annotations-list"></div>
822
+ </div>
823
+ </div>
824
+
825
+ <!-- Actions Section -->
826
+ <div class="section">
827
+ <div class="section-header">Actions</div>
828
+ <div class="field-row" style="align-items: center; margin-bottom: 8px;">
829
+ <div class="field" style="flex: 1;">
830
+ <label>Auto-Update</label>
831
+ <select id="auto_update_interval" onchange="setAutoUpdateInterval()">
832
+ <option value="0">Off</option>
833
+ <option value="500">Hot (0.5s)</option>
834
+ <option value="1000">Fast (1s)</option>
835
+ <option value="2000" selected>Normal (2s)</option>
836
+ <option value="5000">Slow (5s)</option>
837
+ </select>
838
+ </div>
839
+ <button class="btn btn-cta" onclick="updatePreview(true)" style="flex: 0; margin-left: 8px;">Update Now</button>
840
+ </div>
841
+ <button class="btn btn-primary" onclick="saveManual()" title="Ctrl+S">Save</button>
842
+ <button class="btn btn-secondary" onclick="resetOverrides()" title="Reset to original values">Reset</button>
843
+ </div>
844
+
845
+ <div class="status-bar" id="status">Ready</div>
846
+ </div>
847
+ </div>
848
+ </div>
849
+ """
850
+
851
+
852
+ # EOF