From a1ee82e240b27eda568cbc57a6d0794ae6f02cea Mon Sep 17 00:00:00 2001 From: daslu Date: Sun, 5 May 2024 23:33:33 +0300 Subject: [PATCH] - avoding the unnecessary use of Reagent for Python plots --- CHANGELOG.md | 3 +++ src/scicloj/noj/v1/vis/python.clj | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1e74d4..2725de2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. This change log follows the conventions of [keepachangelog.com](http://keepachangelog.com/). +## [1-alpha35] - unreleased +- avoding the unnecessary use of Reagent for Python plots + ## [1-alpha34] - 2024-04-15 - removed the currently-unnecessary `calc-correlations-matrix` and `round` functions (#22) - thanks, @behrica - dropped the histogram computation function and used the one in Fastmath instead (#21) - thanks, @behrica diff --git a/src/scicloj/noj/v1/vis/python.clj b/src/scicloj/noj/v1/vis/python.clj index 553973d..750b3aa 100644 --- a/src/scicloj/noj/v1/vis/python.clj +++ b/src/scicloj/noj/v1/vis/python.clj @@ -10,12 +10,6 @@ 'matplotlib.backends.backend_agg 'numpy) -(defn html-in-reagent [html] - (-> [:div - {:dangerouslySetInnerHTML - {:__html html}}] - kind/reagent)) - (defmacro with-pyplot "Takes forms with mathplotlib.pyplot and returns a showable (SVG) plot." [& body] @@ -28,7 +22,7 @@ (matplotlib.pyplot/savefig path#) (-> path# slurp - html-in-reagent))) + kind/html))) (defn pyplot @@ -43,4 +37,4 @@ (matplotlib.pyplot/savefig path) (-> path slurp - html-in-reagent))) + kind/html)))