seraplot 2.3.81__tar.gz → 2.3.83__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.
- {seraplot-2.3.81 → seraplot-2.3.83}/Cargo.lock +1 -1
- {seraplot-2.3.81 → seraplot-2.3.83}/Cargo.toml +2 -10
- {seraplot-2.3.81 → seraplot-2.3.83}/PKG-INFO +1 -1
- {seraplot-2.3.81 → seraplot-2.3.83}/pyproject.toml +1 -1
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/commands/charts.rs +1 -1
- seraplot-2.3.83/src/bindings/commands/native.rs +8 -0
- seraplot-2.3.83/src/bindings/registry_macro.rs +529 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/hover.rs +5 -5
- seraplot-2.3.81/src/bindings/commands/native.rs +0 -322
- seraplot-2.3.81/src/bindings/registry_macro.rs +0 -250
- {seraplot-2.3.81 → seraplot-2.3.83}/.gitignore +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/05--Diabetes_SeraPlot.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/07--OpenFoodFacts_SeraPlot_Benchmark.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/README.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/TEST_1M_Battle.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_all.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_bigdata.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_full.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_issues.json +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_knn_sgd.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_perf.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_quick.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_quick2.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_scale.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_seraplot.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_sklearn.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_svc.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_svc2.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/bench_test.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/benchmark_gridsearch.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/benchmark_gridsearch2.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/benchmark_kmeans_heavy.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/benchmark_kmeans_openfoodfacts.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/benchmark_ml.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/benchmark_ml_openfoodfacts.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/benchmark_ml_out.ipynb +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/build.log +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/gen_bench_slides.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/1.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/2.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/3.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/4.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/5.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/6.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/7.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/2d/8.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/1.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/2.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/3.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/4.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/5.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/6.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/7.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/3d/8.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/README.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/benchmark/1.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/benchmark/2.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/benchmark/3.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/images/logo.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/kmeans_test.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/publish_2378.log +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/publish_log.txt +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/python/seraplot/__init__.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/python/seraplot/matplotlib.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/python/seraplot/seraplot.cp311-win_amd64.pyd.old +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/results_seraplot.json +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/results_sklearn.json +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/.github/workflows/mdbook.yml +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/README.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/asset/SVG World Map with labels.svg +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/asset/logo.png +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/asset/world.svg +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/builder_template.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/chart_types.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/commands/docs.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/commands/ml.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/commands/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/commands/registry.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/export_builder.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/fast_export_c.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/fast_render.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/memory_pool.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/unified_builder.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/unified_config.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/arena_alloc.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/bitset.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/compact_state.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/data_processor.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/image_processor.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/lazy_builders.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/memory_pool.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/simd_ops.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/bindings/utils/state_export.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/book.toml +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/core/builders.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/core/math.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/core/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/data/conversion.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/data/index.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/data/loader.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/data/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/data/processor.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/SUMMARY.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/api/index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/area.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/bar.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/boxplot.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/bubble.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/bullet.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/candlestick.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/donut.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/dumbbell.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/funnel.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/gauge.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/grid.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/grouped-bar.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/hbar.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/heatmap.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/histogram-overlay.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/histogram.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/kde.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/line.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/lollipop.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/multiline.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/parallel.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/pie.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/radar.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/ridgeline.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/scatter.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/slideshow.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/slope.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/stacked-bar.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/sunburst.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/treemap.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/violin.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/waterfall.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/2d/wordcloud.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/bar3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/bubble3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/candlestick3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/dumbbell3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/funnel3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/globe3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/heatmap3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/kde3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/line3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/lollipop3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/pie3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/radar3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/ridgeline3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/scatter3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/stacked-bar3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/sunburst3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/3d/violin3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/map/bubble-map.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/map/choropleth.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/charts/map/index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/config/auto-display.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/config/background.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/config/hover.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/config/palette.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/getting-started/chart-methods.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/getting-started/chart-object.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/getting-started/installation.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/getting-started/quickstart.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/introduction.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/adaboost.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/bayes-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/clustering-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/dbscan-class.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/dbscan.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/dbscan3d.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/decision-tree.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/decomposition-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/decomposition.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/elastic-net.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/evaluation-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/gradient-boosting.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/grid-search.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/kmeans-class.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/kmeans.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/knn.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/lasso.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/linear-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/linear-regression.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/logistic-regression.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/metrics.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/naive-bayes.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/neighbors-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/preprocessing-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/preprocessing.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/random-forest.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/ridge.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/selection-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/sgd.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/svm-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/svm.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/train-test-split.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/ml/tree-index.md +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/area.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bar.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bar3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bench-matplotlib.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bench-plotly.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bench-seraplot.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/boxplot.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bubble-map.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bubble.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bubble3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/bullet.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/candlestick.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/candlestick3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/choropleth.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/dbscan-class.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/dbscan.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/dbscan3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/donut.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/dumbbell.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/dumbbell3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/funnel.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/funnel3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/gauge.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/globe3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/grid.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/grouped-bar.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/hbar.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/heatmap.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/heatmap3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/histogram-overlay.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/histogram.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/kde.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/kde3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/line.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/line3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/lollipop.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/lollipop3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/multiline.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/parallel.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/pie.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/pie3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/radar.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/radar3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/ridgeline.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/ridgeline3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/scatter.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/scatter3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/slideshow.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/slope.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/stacked-bar.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/stacked-bar3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/sunburst.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/sunburst3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/treemap.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/violin.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/violin3d.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/waterfall.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/previews/wordcloud.html +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/theme/custom.css +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/docs/theme/lang-switcher.js +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/assets.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/fast_builders.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/fast_exporter.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/html_export.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/html_template.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/js_3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/html/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/lib.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/cache.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/decomposition/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/decomposition/pca.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linalg.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linear/elastic_net.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linear/lasso.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linear/logistic.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linear/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linear/ols.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linear/ridge.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/linear/sgd.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/metrics/classification.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/metrics/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/metrics/regression.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/model_selection/cross_val.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/model_selection/grid_search.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/model_selection/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/model_selection/split.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/naive_bayes/bernoulli.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/naive_bayes/gaussian.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/naive_bayes/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/naive_bayes/multinomial.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/neighbors/knn.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/neighbors/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/preprocessing/encoders.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/preprocessing/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/preprocessing/scalers.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/svm/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/svm/svm.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/tree/adaboost.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/tree/decision_tree.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/tree/decision_tree_backup.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/tree/gradient_boosting.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/tree/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/ml/tree/random_forest.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/camera.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/canvas.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/containers_3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/controller/chart_controller.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/controller/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/controller/plot_3d_controller.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/_3d/bar_3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/_3d/line_3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/_3d/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/_3d/plot_3d_types.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/_3d/scatter_3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/bar.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/chart.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/kmeans.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/line.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/scatter.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/default/svg.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/generic.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/_3d/globe.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/_3d/globe_html.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/_3d/globe_types.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/_3d/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/bubble_map.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/chart.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/choropleth.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/svg_parser.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/map/world_data.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/projection.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/renderers.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/scale_renderer.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/seaborn/_3d/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/seaborn/_3d/plot_3d_types.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/seaborn/chart.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/seaborn/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/candlestick3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/dumbbell3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/funnel3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/heatmap3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/kde3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/lollipop3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/pie3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/plot_3d_types.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/radar3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/ridgeline3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/stacked_bar3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/sunburst3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/_3d/violin3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/area.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/boxplot.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/bubble.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/bullet.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/candlestick.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/common.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/dumbbell.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/funnel.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/gauge.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/grouped_bar.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/heatmap.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/histogram.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/kde.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/lollipop.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/multiline.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/parallel.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/pie.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/radar.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/ridgeline.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/slope.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/sunburst.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/treemap.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/violin.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/waterfall.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/plot/statistical/wordcloud.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/cache.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/chart.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/gui.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/hybrid.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/manager/button_manager.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/manager/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/render/advanced_render.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/render/fast_render_gui.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/render/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/render/pipeline.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/render/viewer_3d.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/render/wiki_viewer.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/utils/image_loader.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/viewer/utils/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/wiki/api.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/wiki/extractor.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/wiki/language.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/wiki/macros.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/wiki/metadata.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/src/wiki/mod.rs +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/test_accuracy.py +0 -0
- {seraplot-2.3.81 → seraplot-2.3.83}/test_universal_ml.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "seraplot"
|
|
3
|
-
version = "2.3.
|
|
3
|
+
version = "2.3.83"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
authors = ["feur25"]
|
|
6
6
|
description = "Rust data visualization framework - The modern Plotly alternative"
|
|
@@ -37,21 +37,13 @@ numpy = { version = "0.21", optional = true }
|
|
|
37
37
|
criterion = "0.5"
|
|
38
38
|
|
|
39
39
|
[features]
|
|
40
|
-
default = []
|
|
40
|
+
default = ["python"]
|
|
41
41
|
python = ["dep:pyo3", "dep:numpy", "dep:egui", "dep:eframe", "dep:egui_plot", "dep:reqwest", "dep:tokio"]
|
|
42
42
|
js = ["dep:wasm-bindgen", "dep:js-sys", "dep:getrandom", "dep:egui"]
|
|
43
43
|
ffi = ["dep:egui"]
|
|
44
44
|
all = ["python"]
|
|
45
45
|
pyo3 = ["dep:pyo3"]
|
|
46
46
|
|
|
47
|
-
[[example]]
|
|
48
|
-
name = "csv_test"
|
|
49
|
-
path = "examples/csv_test.rs"
|
|
50
|
-
|
|
51
|
-
[[example]]
|
|
52
|
-
name = "csv_viewer"
|
|
53
|
-
path = "examples/csv_viewer.rs"
|
|
54
|
-
|
|
55
47
|
[profile.release]
|
|
56
48
|
lto = "thin"
|
|
57
49
|
codegen-units = 1
|
|
@@ -1305,7 +1305,7 @@ pub fn build_grid(input: &str) -> String {
|
|
|
1305
1305
|
let charts = a.charts.unwrap_or_default();
|
|
1306
1306
|
let cols = o.cols.unwrap_or(2).max(1);
|
|
1307
1307
|
let gap = o.gap.unwrap_or(16);
|
|
1308
|
-
let bg_color = o.background.clone().or_else(get_global_bg).unwrap_or_else(|| "
|
|
1308
|
+
let bg_color = o.background.clone().or_else(get_global_bg).unwrap_or_else(|| "transparent".to_string());
|
|
1309
1309
|
let bg_color = bg_color.as_str();
|
|
1310
1310
|
let cell_height = o.cell_height.unwrap_or(520);
|
|
1311
1311
|
let mut buf = format!(
|
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
#[macro_export]
|
|
2
|
+
macro_rules! for_each_json_chart_fn {
|
|
3
|
+
($mac:ident) => {
|
|
4
|
+
$mac!(build_html_chart, "buildHtmlChart");
|
|
5
|
+
$mac!(build_bar_chart, "buildBarChart");
|
|
6
|
+
$mac!(build_hbar, "buildHbar");
|
|
7
|
+
$mac!(build_line_chart, "buildLineChart");
|
|
8
|
+
$mac!(build_dbscan_chart, "buildDbscanChart");
|
|
9
|
+
$mac!(build_dbscan_chart_3d, "buildDbscanChart3d");
|
|
10
|
+
$mac!(build_kmeans_chart, "buildKmeansChart");
|
|
11
|
+
$mac!(build_scatter_chart, "buildScatterChart");
|
|
12
|
+
$mac!(build_histogram, "buildHistogram");
|
|
13
|
+
$mac!(build_histogram_overlay, "buildHistogramOverlay");
|
|
14
|
+
$mac!(build_grouped_bar, "buildGroupedBar");
|
|
15
|
+
$mac!(build_stacked_bar, "buildStackedBar");
|
|
16
|
+
$mac!(build_heatmap, "buildHeatmap");
|
|
17
|
+
$mac!(build_pie_chart, "buildPieChart");
|
|
18
|
+
$mac!(build_donut_chart, "buildDonutChart");
|
|
19
|
+
$mac!(build_boxplot, "buildBoxplot");
|
|
20
|
+
$mac!(build_violin, "buildViolin");
|
|
21
|
+
$mac!(build_slope, "buildSlope");
|
|
22
|
+
$mac!(build_sunburst, "buildSunburst");
|
|
23
|
+
$mac!(build_funnel, "buildFunnel");
|
|
24
|
+
$mac!(build_treemap, "buildTreemap");
|
|
25
|
+
$mac!(build_multiline_chart, "buildMultilineChart");
|
|
26
|
+
$mac!(build_area_chart, "buildAreaChart");
|
|
27
|
+
$mac!(build_waterfall, "buildWaterfall");
|
|
28
|
+
$mac!(build_bullet, "buildBullet");
|
|
29
|
+
$mac!(build_bubble_map, "buildBubbleMap");
|
|
30
|
+
$mac!(build_choropleth, "buildChoropleth");
|
|
31
|
+
$mac!(build_scatter3d_chart, "buildScatter3dChart");
|
|
32
|
+
$mac!(build_bar3d_chart, "buildBar3dChart");
|
|
33
|
+
$mac!(build_line3d_chart, "buildLine3dChart");
|
|
34
|
+
$mac!(build_radar_chart, "buildRadarChart");
|
|
35
|
+
$mac!(build_radar3d_chart, "buildRadar3dChart");
|
|
36
|
+
$mac!(build_lollipop_chart, "buildLollipopChart");
|
|
37
|
+
$mac!(build_lollipop3d_chart, "buildLollipop3dChart");
|
|
38
|
+
$mac!(build_kde_chart, "buildKdeChart");
|
|
39
|
+
$mac!(build_kde3d_chart, "buildKde3dChart");
|
|
40
|
+
$mac!(build_ridgeline_chart, "buildRidgelineChart");
|
|
41
|
+
$mac!(build_ridgeline3d_chart, "buildRidgeline3dChart");
|
|
42
|
+
$mac!(build_bubble3d_chart, "buildBubble3dChart");
|
|
43
|
+
$mac!(build_pie3d_chart, "buildPie3dChart");
|
|
44
|
+
$mac!(build_violin3d_chart, "buildViolin3dChart");
|
|
45
|
+
$mac!(build_heatmap3d_chart, "buildHeatmap3dChart");
|
|
46
|
+
$mac!(build_candlestick3d_chart, "buildCandlestick3dChart");
|
|
47
|
+
$mac!(build_dumbbell3d_chart, "buildDumbbell3dChart");
|
|
48
|
+
$mac!(build_funnel3d_chart, "buildFunnel3dChart");
|
|
49
|
+
$mac!(build_sunburst3d_chart, "buildSunburst3dChart");
|
|
50
|
+
$mac!(build_stacked_bar3d_chart, "buildStackedBar3dChart");
|
|
51
|
+
$mac!(build_globe3d_chart, "buildGlobe3dChart");
|
|
52
|
+
$mac!(build_wordcloud, "buildWordcloud");
|
|
53
|
+
$mac!(build_candlestick, "buildCandlestick");
|
|
54
|
+
$mac!(build_dumbbell, "buildDumbbell");
|
|
55
|
+
$mac!(build_bubble, "buildBubble");
|
|
56
|
+
$mac!(build_gauge, "buildGauge");
|
|
57
|
+
$mac!(build_parallel, "buildParallel");
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
#[macro_export]
|
|
62
|
+
macro_rules! for_each_chart_fn {
|
|
63
|
+
($mac:ident) => {
|
|
64
|
+
crate::for_each_json_chart_fn!($mac);
|
|
65
|
+
$mac!(build_grid, "buildGrid");
|
|
66
|
+
$mac!(build_slideshow, "buildSlideshow");
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
#[macro_export]
|
|
71
|
+
macro_rules! for_each_chart_class {
|
|
72
|
+
($mac:ident) => {
|
|
73
|
+
$mac!(DbscanModel);
|
|
74
|
+
$mac!(KMeansModel);
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
pub const CHART_ALIASES: &[(&str, &str)] = &[
|
|
79
|
+
("bar", "build_bar_chart"),
|
|
80
|
+
("bar_chart", "build_bar_chart"),
|
|
81
|
+
("bars", "build_bar_chart"),
|
|
82
|
+
("hbar", "build_hbar"),
|
|
83
|
+
("barh", "build_hbar"),
|
|
84
|
+
("horizontal_bar", "build_hbar"),
|
|
85
|
+
("line", "build_line_chart"),
|
|
86
|
+
("line_chart", "build_line_chart"),
|
|
87
|
+
("scatter", "build_scatter_chart"),
|
|
88
|
+
("scatter_chart", "build_scatter_chart"),
|
|
89
|
+
("hist", "build_histogram"),
|
|
90
|
+
("histogram", "build_histogram"),
|
|
91
|
+
("pie", "build_pie_chart"),
|
|
92
|
+
("pie_chart", "build_pie_chart"),
|
|
93
|
+
("donut", "build_donut_chart"),
|
|
94
|
+
("donut_chart", "build_donut_chart"),
|
|
95
|
+
("heatmap", "build_heatmap"),
|
|
96
|
+
("boxplot", "build_boxplot"),
|
|
97
|
+
("box_plot", "build_boxplot"),
|
|
98
|
+
("violin", "build_violin"),
|
|
99
|
+
("radar", "build_radar_chart"),
|
|
100
|
+
("radar_chart", "build_radar_chart"),
|
|
101
|
+
("lollipop", "build_lollipop_chart"),
|
|
102
|
+
("kde", "build_kde_chart"),
|
|
103
|
+
("ridgeline", "build_ridgeline_chart"),
|
|
104
|
+
("bubble", "build_bubble"),
|
|
105
|
+
("candlestick", "build_candlestick"),
|
|
106
|
+
("dumbbell", "build_dumbbell"),
|
|
107
|
+
("funnel", "build_funnel"),
|
|
108
|
+
("waterfall", "build_waterfall"),
|
|
109
|
+
("treemap", "build_treemap"),
|
|
110
|
+
("sunburst", "build_sunburst"),
|
|
111
|
+
("gauge", "build_gauge"),
|
|
112
|
+
("parallel", "build_parallel"),
|
|
113
|
+
("grouped_bar", "build_grouped_bar"),
|
|
114
|
+
("stacked_bar", "build_stacked_bar"),
|
|
115
|
+
("slope", "build_slope"),
|
|
116
|
+
("bullet", "build_bullet"),
|
|
117
|
+
("area", "build_area_chart"),
|
|
118
|
+
("area_chart", "build_area_chart"),
|
|
119
|
+
("multiline", "build_multiline_chart"),
|
|
120
|
+
("bubble_map", "build_bubble_map"),
|
|
121
|
+
("choropleth", "build_choropleth"),
|
|
122
|
+
("wordcloud", "build_wordcloud"),
|
|
123
|
+
("kmeans", "build_kmeans_chart"),
|
|
124
|
+
("kmeans_chart", "build_kmeans_chart"),
|
|
125
|
+
("dbscan", "build_dbscan_chart"),
|
|
126
|
+
("scatter3d", "build_scatter3d_chart"),
|
|
127
|
+
("bar3d", "build_bar3d_chart"),
|
|
128
|
+
("line3d", "build_line3d_chart"),
|
|
129
|
+
("radar3d", "build_radar3d_chart"),
|
|
130
|
+
("lollipop3d", "build_lollipop3d_chart"),
|
|
131
|
+
("kde3d", "build_kde3d_chart"),
|
|
132
|
+
("ridgeline3d", "build_ridgeline3d_chart"),
|
|
133
|
+
("bubble3d", "build_bubble3d_chart"),
|
|
134
|
+
("pie3d", "build_pie3d_chart"),
|
|
135
|
+
("violin3d", "build_violin3d_chart"),
|
|
136
|
+
("heatmap3d", "build_heatmap3d_chart"),
|
|
137
|
+
("candlestick3d", "build_candlestick3d_chart"),
|
|
138
|
+
("dumbbell3d", "build_dumbbell3d_chart"),
|
|
139
|
+
("funnel3d", "build_funnel3d_chart"),
|
|
140
|
+
("sunburst3d", "build_sunburst3d_chart"),
|
|
141
|
+
("stacked_bar3d", "build_stacked_bar3d_chart"),
|
|
142
|
+
("globe3d", "build_globe3d_chart"),
|
|
143
|
+
("dbscan3d", "build_dbscan_chart_3d"),
|
|
144
|
+
("plot", "plot_chart"),
|
|
145
|
+
("grid", "build_grid"),
|
|
146
|
+
("save", "savefig"),
|
|
147
|
+
("save_fig", "savefig"),
|
|
148
|
+
];
|
|
149
|
+
|
|
150
|
+
#[macro_export]
|
|
151
|
+
macro_rules! for_each_ml_oneshot_fn {
|
|
152
|
+
($mac:ident) => {
|
|
153
|
+
$mac!(ml_dbscan_fit_predict, "mlDbscanFitPredict");
|
|
154
|
+
$mac!(ml_kmeans_fit_predict, "mlKmeansFitPredict");
|
|
155
|
+
$mac!(ml_linear_regression, "mlLinearRegression");
|
|
156
|
+
$mac!(ml_ridge, "mlRidge");
|
|
157
|
+
$mac!(ml_lasso, "mlLasso");
|
|
158
|
+
$mac!(ml_elastic_net, "mlElasticNet");
|
|
159
|
+
$mac!(ml_logistic_regression, "mlLogisticRegression");
|
|
160
|
+
$mac!(ml_decision_tree_classifier, "mlDecisionTreeClassifier");
|
|
161
|
+
$mac!(ml_decision_tree_regressor, "mlDecisionTreeRegressor");
|
|
162
|
+
$mac!(ml_random_forest_classifier, "mlRandomForestClassifier");
|
|
163
|
+
$mac!(ml_random_forest_regressor, "mlRandomForestRegressor");
|
|
164
|
+
$mac!(ml_gradient_boosting_classifier, "mlGradientBoostingClassifier");
|
|
165
|
+
$mac!(ml_gradient_boosting_regressor, "mlGradientBoostingRegressor");
|
|
166
|
+
$mac!(ml_knn_classifier, "mlKnnClassifier");
|
|
167
|
+
$mac!(ml_knn_regressor, "mlKnnRegressor");
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
#[macro_export]
|
|
172
|
+
macro_rules! for_each_fn {
|
|
173
|
+
($mac:ident) => {
|
|
174
|
+
$crate::for_each_chart_fn!($mac);
|
|
175
|
+
$mac!(plot_chart, "plotChart");
|
|
176
|
+
$mac!(build_hover_json, "buildHoverJson");
|
|
177
|
+
$crate::for_each_ml_oneshot_fn!($mac);
|
|
178
|
+
$mac!(set_theme, "setTheme");
|
|
179
|
+
$mac!(reset_theme, "resetTheme");
|
|
180
|
+
$mac!(themes, "themes");
|
|
181
|
+
$mac!(set_global_background, "setGlobalBackground");
|
|
182
|
+
$mac!(reset_global_background, "resetGlobalBackground");
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
#[macro_export]
|
|
187
|
+
macro_rules! impl_python_build_grid {
|
|
188
|
+
() => {
|
|
189
|
+
#[pyfunction]
|
|
190
|
+
#[pyo3(signature = (charts, cols=2, gap=16, bg=None, cell_height=520))]
|
|
191
|
+
pub fn build_grid(
|
|
192
|
+
charts: Vec<pyo3::PyRef<crate::Chart>>,
|
|
193
|
+
cols: usize,
|
|
194
|
+
gap: i32,
|
|
195
|
+
bg: Option<&str>,
|
|
196
|
+
cell_height: i32,
|
|
197
|
+
) -> crate::Chart {
|
|
198
|
+
let html_strs: Vec<String> = charts.iter().map(|c| c.html.clone()).collect();
|
|
199
|
+
crate::Chart::new_doc(
|
|
200
|
+
crate::bindings::commands::charts::build_grid(
|
|
201
|
+
&serde_json::json!({"charts": html_strs, "cols": cols, "gap": gap, "background": bg, "cell_height": cell_height}).to_string()
|
|
202
|
+
),
|
|
203
|
+
crate::bindings::commands::docs::DOC_BUILD_GRID,
|
|
204
|
+
)
|
|
205
|
+
}
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
#[macro_export]
|
|
210
|
+
macro_rules! impl_python_build_slideshow {
|
|
211
|
+
() => {
|
|
212
|
+
#[pyfunction]
|
|
213
|
+
#[pyo3(signature = (charts, interval_ms=2500, title="", width=900, height=520))]
|
|
214
|
+
pub fn build_slideshow(
|
|
215
|
+
charts: Vec<pyo3::PyRef<crate::Chart>>,
|
|
216
|
+
interval_ms: u32,
|
|
217
|
+
title: &str,
|
|
218
|
+
width: i32,
|
|
219
|
+
height: i32,
|
|
220
|
+
) -> crate::Chart {
|
|
221
|
+
let html_strs: Vec<String> = charts.iter().map(|c| c.html.clone()).collect();
|
|
222
|
+
crate::Chart::new_doc(
|
|
223
|
+
crate::bindings::commands::charts::build_slideshow(
|
|
224
|
+
&serde_json::json!({"charts": html_strs, "interval_ms": interval_ms, "title": title, "width": width, "height": height}).to_string()
|
|
225
|
+
),
|
|
226
|
+
crate::bindings::commands::docs::DOC_BUILD_SLIDESHOW,
|
|
227
|
+
)
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
#[macro_export]
|
|
233
|
+
macro_rules! impl_python_build_hover_json {
|
|
234
|
+
() => {
|
|
235
|
+
#[pyfunction]
|
|
236
|
+
#[pyo3(signature = (labels, images=None, descriptions=None))]
|
|
237
|
+
pub fn build_hover_json(
|
|
238
|
+
labels: Vec<String>,
|
|
239
|
+
images: Option<Vec<Option<String>>>,
|
|
240
|
+
descriptions: Option<Vec<Vec<(String, String)>>>,
|
|
241
|
+
) -> String {
|
|
242
|
+
let desc_json: Option<Vec<Vec<Vec<String>>>> = descriptions.map(|outer|
|
|
243
|
+
outer.into_iter().map(|row| row.into_iter().map(|(k, v)| vec![k, v]).collect()).collect()
|
|
244
|
+
);
|
|
245
|
+
crate::bindings::commands::charts::build_hover_json(
|
|
246
|
+
&serde_json::json!({"labels": labels, "images": images, "descriptions": desc_json}).to_string()
|
|
247
|
+
)
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
#[macro_export]
|
|
253
|
+
macro_rules! impl_wasm_bindings {
|
|
254
|
+
() => {
|
|
255
|
+
use wasm_bindgen::prelude::*;
|
|
256
|
+
macro_rules! impl_wasm {
|
|
257
|
+
($fn:ident, $js:literal) => {
|
|
258
|
+
#[wasm_bindgen(js_name = $js)]
|
|
259
|
+
pub fn $fn(input: &str) -> String {
|
|
260
|
+
crate::bindings::commands::charts::$fn(input)
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
crate::for_each_fn!(impl_wasm);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
#[macro_export]
|
|
269
|
+
macro_rules! impl_cffi_bindings {
|
|
270
|
+
() => {
|
|
271
|
+
macro_rules! impl_cffi {
|
|
272
|
+
($fn:ident, $_js:literal) => {
|
|
273
|
+
#[no_mangle]
|
|
274
|
+
pub unsafe extern "C" fn $fn(input: *const std::os::raw::c_char) -> *mut std::os::raw::c_char {
|
|
275
|
+
let s = std::ffi::CStr::from_ptr(input).to_str().unwrap_or("");
|
|
276
|
+
std::ffi::CString::new(crate::bindings::commands::charts::$fn(s))
|
|
277
|
+
.unwrap_or_default()
|
|
278
|
+
.into_raw()
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
crate::for_each_fn!(impl_cffi);
|
|
283
|
+
#[no_mangle]
|
|
284
|
+
pub unsafe extern "C" fn seraplot_free(ptr: *mut std::os::raw::c_char) {
|
|
285
|
+
if !ptr.is_null() { drop(std::ffi::CString::from_raw(ptr)); }
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
#[macro_export]
|
|
291
|
+
macro_rules! impl_python_bindings {
|
|
292
|
+
() => {
|
|
293
|
+
use pyo3::prelude::*;
|
|
294
|
+
use pyo3::types::PyAny;
|
|
295
|
+
|
|
296
|
+
fn py_any_val(val: &PyAny) -> serde_json::Value {
|
|
297
|
+
if val.is_none() { return serde_json::Value::Null; }
|
|
298
|
+
if let Ok(b) = val.extract::<bool>() { return serde_json::Value::Bool(b); }
|
|
299
|
+
if let Ok(i) = val.extract::<i64>() { return serde_json::json!(i); }
|
|
300
|
+
if let Ok(f) = val.extract::<f64>() { return serde_json::json!(f); }
|
|
301
|
+
if let Ok(s) = val.extract::<String>() { return serde_json::Value::String(s); }
|
|
302
|
+
if let Ok(list) = val.extract::<Vec<Vec<f64>>>() { return serde_json::json!(list); }
|
|
303
|
+
if let Ok(list) = val.extract::<Vec<f64>>() { return serde_json::json!(list); }
|
|
304
|
+
if let Ok(list) = val.extract::<Vec<String>>() { return serde_json::json!(list); }
|
|
305
|
+
if let Ok(list) = val.extract::<Vec<i64>>() { return serde_json::json!(list); }
|
|
306
|
+
serde_json::Value::Null
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
fn py_args_to_json(
|
|
310
|
+
title: &str,
|
|
311
|
+
labels: Option<&pyo3::types::PyAny>,
|
|
312
|
+
values: Option<&pyo3::types::PyAny>,
|
|
313
|
+
kwargs: Option<&pyo3::types::PyDict>,
|
|
314
|
+
) -> String {
|
|
315
|
+
let mut m = serde_json::Map::new();
|
|
316
|
+
if !title.is_empty() { m.insert("title".into(), serde_json::json!(title)); }
|
|
317
|
+
if let Some(v) = labels {
|
|
318
|
+
let jv = py_any_val(v);
|
|
319
|
+
if jv != serde_json::Value::Null { m.insert("labels".into(), jv); }
|
|
320
|
+
}
|
|
321
|
+
if let Some(v) = values {
|
|
322
|
+
if let Ok(vv) = v.extract::<Vec<Vec<f64>>>() {
|
|
323
|
+
m.insert("series".into(), serde_json::json!(vv));
|
|
324
|
+
} else {
|
|
325
|
+
let jv = py_any_val(v);
|
|
326
|
+
if jv != serde_json::Value::Null { m.insert("values".into(), jv); }
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
if let Some(d) = kwargs {
|
|
330
|
+
for (key, val) in d.iter() {
|
|
331
|
+
if let Ok(ks) = key.str() {
|
|
332
|
+
let ks = ks.to_string_lossy().to_string();
|
|
333
|
+
let v = py_any_val(val);
|
|
334
|
+
if v != serde_json::Value::Null { m.insert(ks, v); }
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
serde_json::Value::Object(m).to_string()
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
macro_rules! impl_python {
|
|
342
|
+
($fn:ident, $_js:literal) => {
|
|
343
|
+
#[pyfunction]
|
|
344
|
+
#[pyo3(signature = (title="", labels=None, values=None, **kwargs))]
|
|
345
|
+
pub fn $fn(
|
|
346
|
+
title: &str,
|
|
347
|
+
labels: Option<&pyo3::types::PyAny>,
|
|
348
|
+
values: Option<&pyo3::types::PyAny>,
|
|
349
|
+
kwargs: Option<&pyo3::types::PyDict>,
|
|
350
|
+
) -> PyResult<crate::Chart> {
|
|
351
|
+
Ok(crate::Chart::new_doc(
|
|
352
|
+
crate::bindings::commands::charts::$fn(&py_args_to_json(title, labels, values, kwargs)),
|
|
353
|
+
"",
|
|
354
|
+
))
|
|
355
|
+
}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
crate::for_each_json_chart_fn!(impl_python);
|
|
359
|
+
|
|
360
|
+
macro_rules! impl_python_json {
|
|
361
|
+
($fn:ident, $_js:literal) => {
|
|
362
|
+
#[pyfunction]
|
|
363
|
+
pub fn $fn(input: &str) -> String {
|
|
364
|
+
crate::bindings::commands::charts::$fn(input)
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
crate::for_each_ml_oneshot_fn!(impl_python_json);
|
|
369
|
+
|
|
370
|
+
#[pyfunction]
|
|
371
|
+
#[pyo3(name = "set_bg", signature = (html, color=None))]
|
|
372
|
+
pub fn set_bg_fn(html: &PyAny, color: Option<&str>) -> PyResult<crate::Chart> {
|
|
373
|
+
let raw: String = if let Ok(chart) = html.extract::<PyRef<crate::Chart>>() {
|
|
374
|
+
chart.html.clone()
|
|
375
|
+
} else { html.extract::<String>()? };
|
|
376
|
+
Ok(crate::Chart::new(crate::html::hover::apply_bg(raw, color)))
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
#[pyfunction]
|
|
380
|
+
pub fn show_chart_value(chart_json: &str) -> bool { crate::bindings::commands::charts::show_chart_value(chart_json) }
|
|
381
|
+
|
|
382
|
+
#[pyfunction]
|
|
383
|
+
pub fn bench_chart_value(chart_json: &str) -> bool { crate::bindings::commands::charts::bench_chart_value(chart_json) }
|
|
384
|
+
|
|
385
|
+
#[pyfunction]
|
|
386
|
+
pub fn set_chart_kind(kind: u8) -> bool { crate::bindings::commands::charts::set_chart_kind(kind); true }
|
|
387
|
+
|
|
388
|
+
#[pyfunction]
|
|
389
|
+
pub fn set_chart_orientation(vertical: bool) -> bool { crate::bindings::commands::charts::set_chart_orientation(vertical); true }
|
|
390
|
+
|
|
391
|
+
#[pyfunction]
|
|
392
|
+
#[pyo3(signature = (n=2000))]
|
|
393
|
+
pub fn bench_pure_rust(n: usize) -> (f64, f64, f64, f64) { crate::bindings::commands::charts::bench_pure_rust(n) }
|
|
394
|
+
|
|
395
|
+
#[pyclass(module = "seraplot", name = "DBSCAN")]
|
|
396
|
+
pub struct DbscanModel(crate::bindings::commands::charts::DbscanState);
|
|
397
|
+
|
|
398
|
+
#[pymethods]
|
|
399
|
+
impl DbscanModel {
|
|
400
|
+
#[new]
|
|
401
|
+
#[pyo3(signature = (eps=0.5, min_samples=5))]
|
|
402
|
+
pub fn py_new(eps: f64, min_samples: usize) -> Self {
|
|
403
|
+
DbscanModel(crate::bindings::commands::charts::DbscanState::new(eps, min_samples))
|
|
404
|
+
}
|
|
405
|
+
#[pyo3(signature = (x))]
|
|
406
|
+
pub fn fit(&mut self, x: Vec<Vec<f64>>) -> PyResult<()> {
|
|
407
|
+
let n = x.len();
|
|
408
|
+
let d = x.first().map_or(0, |r| r.len());
|
|
409
|
+
let fp = crate::ml::cache::Fp::new("DBSCAN.fit").f64(self.0.eps).usize(self.0.min_samples).usize(n).usize(d).finish();
|
|
410
|
+
let _h = crate::ml::cache::TaskHandle::auto("DBSCAN.fit", fp);
|
|
411
|
+
self.0.fit(&x);
|
|
412
|
+
_h.complete(&crate::ml::cache::PartialState::default());
|
|
413
|
+
Ok(())
|
|
414
|
+
}
|
|
415
|
+
#[pyo3(signature = (x))]
|
|
416
|
+
pub fn fit_predict(&mut self, x: Vec<Vec<f64>>) -> PyResult<Vec<i32>> {
|
|
417
|
+
self.fit(x)?; Ok(self.0.labels.clone())
|
|
418
|
+
}
|
|
419
|
+
#[getter] pub fn labels_(&self) -> Vec<i32> { self.0.labels.clone() }
|
|
420
|
+
#[getter] pub fn n_clusters_(&self) -> usize { self.0.n_clusters }
|
|
421
|
+
#[getter] pub fn n_noise_(&self) -> usize { self.0.n_noise }
|
|
422
|
+
#[getter] pub fn eps(&self) -> f64 { self.0.eps }
|
|
423
|
+
#[getter] pub fn min_samples(&self) -> usize { self.0.min_samples }
|
|
424
|
+
fn doc(&self) -> &'static str { crate::bindings::commands::docs::DOC_DBSCAN_MODEL }
|
|
425
|
+
fn __repr__(&self) -> String {
|
|
426
|
+
format!("DBSCAN(eps={}, min_samples={}) -> {} clusters, {} noise",
|
|
427
|
+
self.0.eps, self.0.min_samples, self.0.n_clusters, self.0.n_noise)
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
#[pyclass(module = "seraplot", name = "KMeans")]
|
|
432
|
+
pub struct KMeansModel(crate::bindings::commands::charts::KMeansState);
|
|
433
|
+
|
|
434
|
+
#[pymethods]
|
|
435
|
+
impl KMeansModel {
|
|
436
|
+
#[new]
|
|
437
|
+
#[pyo3(signature = (k=3, max_iter=300, tol=1e-4, mini_batch=false, batch_size=1000, n_init=10))]
|
|
438
|
+
pub fn py_new(k: usize, max_iter: usize, tol: f64, mini_batch: bool, batch_size: usize, n_init: usize) -> Self {
|
|
439
|
+
KMeansModel(crate::bindings::commands::charts::KMeansState::new(k, max_iter, tol, mini_batch, batch_size, n_init))
|
|
440
|
+
}
|
|
441
|
+
#[pyo3(signature = (x))]
|
|
442
|
+
pub fn fit(&mut self, x: &PyAny) -> PyResult<()> {
|
|
443
|
+
let (flat, n, dims) = super::ml::extract_flat(x)?;
|
|
444
|
+
let fp = crate::ml::cache::Fp::new("KMeans.fit").usize(self.0.k).usize(self.0.max_iter).bval(self.0.mini_batch).data(&flat, n, dims).finish();
|
|
445
|
+
let _h = crate::ml::cache::TaskHandle::auto("KMeans.fit", fp);
|
|
446
|
+
self.0.fit_flat(&flat, n, dims);
|
|
447
|
+
_h.complete(&crate::ml::cache::PartialState::default());
|
|
448
|
+
Ok(())
|
|
449
|
+
}
|
|
450
|
+
#[pyo3(signature = (x))]
|
|
451
|
+
pub fn fit_predict(&mut self, x: &PyAny) -> PyResult<Vec<i32>> {
|
|
452
|
+
self.fit(x)?; Ok(self.0.labels.clone())
|
|
453
|
+
}
|
|
454
|
+
#[pyo3(signature = (x))]
|
|
455
|
+
pub fn transform(&self, x: &PyAny) -> PyResult<Vec<Vec<f64>>> {
|
|
456
|
+
let (flat, n, dims) = super::ml::extract_flat(x)?;
|
|
457
|
+
Ok(self.0.transform_flat(&flat, n, dims))
|
|
458
|
+
}
|
|
459
|
+
#[pyo3(signature = (x))]
|
|
460
|
+
pub fn predict(&self, x: &PyAny) -> PyResult<Vec<i32>> {
|
|
461
|
+
let (flat, n, dims) = super::ml::extract_flat(x)?;
|
|
462
|
+
Ok(self.0.predict_flat(&flat, n, dims))
|
|
463
|
+
}
|
|
464
|
+
#[getter] pub fn labels_(&self) -> Vec<i32> { self.0.labels.clone() }
|
|
465
|
+
#[getter] pub fn centroids_(&self) -> Vec<Vec<f64>> { self.0.centroids.clone() }
|
|
466
|
+
#[getter] pub fn inertia_(&self) -> f64 { self.0.inertia }
|
|
467
|
+
#[getter] pub fn n_iter_(&self) -> usize { self.0.n_iter }
|
|
468
|
+
#[getter] pub fn n_clusters(&self) -> usize { self.0.centroids.len() }
|
|
469
|
+
#[getter] pub fn k(&self) -> usize { self.0.k }
|
|
470
|
+
fn doc(&self) -> &'static str { crate::bindings::commands::docs::DOC_KMEANS_MODEL }
|
|
471
|
+
fn __repr__(&self) -> String {
|
|
472
|
+
format!("KMeans(k={}, max_iter={}, n_init={}, mini_batch={}) -> inertia={:.2}",
|
|
473
|
+
self.0.k, self.0.max_iter, self.0.n_init, self.0.mini_batch, self.0.inertia)
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
crate::impl_python_build_grid!();
|
|
478
|
+
crate::impl_python_build_slideshow!();
|
|
479
|
+
crate::impl_python_build_hover_json!();
|
|
480
|
+
|
|
481
|
+
#[pyfunction]
|
|
482
|
+
#[pyo3(name = "plot", signature = (x, y=None, *, title="", kind="line", color_hex=0x6366F1_u32, width=900_i32, height=480_i32, x_label="", y_label="", gridlines=false, palette=None, background=None, show_points=true))]
|
|
483
|
+
pub fn plot_chart(
|
|
484
|
+
py: Python<'_>,
|
|
485
|
+
x: &PyAny,
|
|
486
|
+
y: Option<&PyAny>,
|
|
487
|
+
title: &str,
|
|
488
|
+
kind: &str,
|
|
489
|
+
color_hex: u32,
|
|
490
|
+
width: i32,
|
|
491
|
+
height: i32,
|
|
492
|
+
x_label: &str,
|
|
493
|
+
y_label: &str,
|
|
494
|
+
gridlines: bool,
|
|
495
|
+
palette: Option<Vec<u32>>,
|
|
496
|
+
background: Option<&str>,
|
|
497
|
+
show_points: bool,
|
|
498
|
+
) -> PyResult<crate::Chart> {
|
|
499
|
+
let (bg, pal, grid) = crate::merge_global_opts(background, palette, gridlines);
|
|
500
|
+
let pal_opt: Option<Vec<u32>> = if pal.is_empty() { None } else { Some(pal) };
|
|
501
|
+
if let Ok(cols_obj) = x.getattr("columns") {
|
|
502
|
+
let cols: Vec<String> = cols_obj.extract()?;
|
|
503
|
+
if cols.len() >= 2 {
|
|
504
|
+
let xv = crate::py_to_f64_vec(py, x.get_item(&cols[0])?)?;
|
|
505
|
+
let yv = crate::py_to_f64_vec(py, x.get_item(&cols[1])?)?;
|
|
506
|
+
let auto_title = if title.is_empty() { format!("{} vs {}", cols[0], cols[1]) } else { title.to_string() };
|
|
507
|
+
return Ok(crate::Chart::new_doc(
|
|
508
|
+
crate::bindings::commands::charts::plot_chart(
|
|
509
|
+
&serde_json::json!({"x":xv,"y":yv,"kind":"scatter","title":auto_title,"color_hex":color_hex,"width":width,"height":height,"x_label":x_label,"y_label":y_label,"gridlines":grid,"palette":pal_opt,"background":bg}).to_string()
|
|
510
|
+
), "",
|
|
511
|
+
));
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
let xv = crate::py_to_f64_vec(py, x)?;
|
|
515
|
+
let yv: Option<Vec<f64>> = if let Some(yobj) = y { Some(crate::py_to_f64_vec(py, yobj)?) } else { None };
|
|
516
|
+
Ok(crate::Chart::new_doc(
|
|
517
|
+
crate::bindings::commands::charts::plot_chart(
|
|
518
|
+
&serde_json::json!({"x":xv,"y":yv,"kind":kind,"title":title,"color_hex":color_hex,"show_points":show_points,"width":width,"height":height,"x_label":x_label,"y_label":y_label,"gridlines":grid,"palette":pal_opt,"background":bg}).to_string()
|
|
519
|
+
), "",
|
|
520
|
+
))
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
#[pyfunction]
|
|
524
|
+
#[pyo3(signature = (chart, path))]
|
|
525
|
+
pub fn savefig(chart: &crate::Chart, path: &str) -> PyResult<()> {
|
|
526
|
+
std::fs::write(path, &chart.html).map_err(|e| pyo3::exceptions::PyIOError::new_err(e.to_string()))
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
}
|
|
@@ -112,7 +112,7 @@ pub fn parse_hover_json(json: &str) -> Vec<HoverSlot> {
|
|
|
112
112
|
pub const HOVER_CSS: &str = "";
|
|
113
113
|
pub const HOVER_JS: &str = "";
|
|
114
114
|
|
|
115
|
-
pub const DEFAULT_BG: &str = "
|
|
115
|
+
pub const DEFAULT_BG: &str = "transparent";
|
|
116
116
|
|
|
117
117
|
#[inline]
|
|
118
118
|
fn resolve_named_color(c: &str) -> &str {
|
|
@@ -139,7 +139,7 @@ pub fn apply_bg(html: String, bg: Option<&str>) -> String {
|
|
|
139
139
|
Some(c) => c,
|
|
140
140
|
};
|
|
141
141
|
let color = resolve_named_color(raw);
|
|
142
|
-
let h = html.replacen(".sp-bg{fill
|
|
142
|
+
let h = html.replacen(".sp-bg{fill:transparent}", &format!(".sp-bg{{fill:{color}}}"), 1);
|
|
143
143
|
h.replacen("</head>", &format!("<style>html,body{{background:{color}!important}}</style></head>"), 1)
|
|
144
144
|
}
|
|
145
145
|
|
|
@@ -428,7 +428,7 @@ pub fn build_chart_html(title: &str, svg: &str, hover_json: &str) -> String {
|
|
|
428
428
|
buf.extend_from_slice(html_attr_esc(title).as_bytes());
|
|
429
429
|
buf.extend_from_slice(b"</title>");
|
|
430
430
|
buf.extend_from_slice(CSS.as_bytes());
|
|
431
|
-
buf.extend_from_slice(b"<style>body{margin:0;background
|
|
431
|
+
buf.extend_from_slice(b"<style>body{margin:0;background:transparent;display:flex;justify-content:center;padding:0}@keyframes sp-i{from{opacity:0;transform:translateY(8px) scale(.94)}}@keyframes sp-bar{from{opacity:0;transform:scaleY(0)}}@keyframes sp-pop{0%{opacity:0;transform:scale(0)}70%{transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}@keyframes sp-arc{from{opacity:0;transform:scale(.82) rotate(-6deg)}}@keyframes sp-fn{from{opacity:0;transform:scaleX(.7) translateY(8px)}}svg rect[data-idx]{transform-box:fill-box;transform-origin:bottom center;animation:sp-bar .5s cubic-bezier(.22,.61,.36,1) both}svg circle[data-idx]{transform-box:fill-box;transform-origin:center;animation:sp-pop .42s cubic-bezier(.34,1.56,.64,1) both}svg path[data-idx]{transform-box:fill-box;transform-origin:center;animation:sp-arc .48s cubic-bezier(.22,.61,.36,1) both}svg polygon[data-idx]{transform-box:fill-box;transform-origin:center;animation:sp-fn .48s cubic-bezier(.22,.61,.36,1) both}svg line[data-idx]{animation:sp-i .45s cubic-bezier(.22,.61,.36,1) both}svg rect[data-idx]:hover{transform:scaleY(1.03);filter:brightness(1.12) saturate(1.1)}svg circle[data-idx]:hover{transform:scale(1.3);filter:brightness(1.15)}svg path[data-idx]:hover{filter:brightness(1.1) drop-shadow(0 2px 8px rgba(0,0,0,.2))}.sp-bg{fill:transparent}</style></head><body>");
|
|
432
432
|
buf.extend_from_slice(b"<div id=\"");
|
|
433
433
|
push_pid(&mut buf, id);
|
|
434
434
|
buf.extend_from_slice(b"\" style=\"position:relative;display:inline-block;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.07),0 0 0 1px rgba(0,0,0,.04)\">");
|
|
@@ -519,7 +519,7 @@ pub fn html_prefix(buf: &mut Vec<u8>, title: &str, id: u64) {
|
|
|
519
519
|
".sp-cls-x{cursor:pointer;color:#94a3b8;margin-left:6px;font-size:13px}",
|
|
520
520
|
".sp-cls-x:hover{color:#f87171}",
|
|
521
521
|
"</style>",
|
|
522
|
-
"<style>body{margin:0;background
|
|
522
|
+
"<style>body{margin:0;background:transparent;display:flex;justify-content:center;padding:0}",
|
|
523
523
|
"@keyframes sp-i{from{opacity:0;transform:translateY(8px) scale(.94)}}",
|
|
524
524
|
"@keyframes sp-bar{from{opacity:0;transform:scaleY(0)}}",
|
|
525
525
|
"@keyframes sp-pop{0%{opacity:0;transform:scale(0)}70%{transform:scale(1.08)}100%{opacity:1;transform:scale(1)}}",
|
|
@@ -533,7 +533,7 @@ pub fn html_prefix(buf: &mut Vec<u8>, title: &str, id: u64) {
|
|
|
533
533
|
"svg rect[data-idx]:hover{transform:scaleY(1.03);filter:brightness(1.12) saturate(1.1)}",
|
|
534
534
|
"svg circle[data-idx]:hover{transform:scale(1.3);filter:brightness(1.15)}",
|
|
535
535
|
"svg path[data-idx]:hover{filter:brightness(1.1) drop-shadow(0 2px 8px rgba(0,0,0,.2))}",
|
|
536
|
-
".sp-bg{fill
|
|
536
|
+
".sp-bg{fill:transparent}",
|
|
537
537
|
"</style></head><body><div id=\"",
|
|
538
538
|
).as_bytes();
|
|
539
539
|
const TPL3: &[u8] = b"\" style=\"position:relative;display:inline-block;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.07),0 0 0 1px rgba(0,0,0,.04)\">";
|