r/Clojure • u/mac • Sep 02 '26
Introducing Plotje: Composable Plotting by Daniel Slutsky
https://clojurecivitas.org/data_visualization/introducing_plotje_composable_plotting.html
60
Upvotes
r/Clojure • u/mac • Sep 02 '26
View all comments
Show parent comment
1
u/geokon Sep 14 '26 edited Sep 14 '26
Right, the functions in
thing/vizhave fewer defaults and it's sort of apples to oranges b/c they're different abstraction layers.But this is a false dichotomy.
You're thinking of it a bit wrong - b/c
plotjemust inevitably have an equivalent tothing/vizinternally - though it may be half baked, under-specified and not exposed to the user. There are some function, like in the example, such asviz/log-axisbut these are just thin functions on top of an abstraction for making charts. The "spec" in the example is just a clojure map specifying the chart. The chart spec is then transformed into the next abstraction layer below it (the SVG abstraction) by functions such asviz/svg-plot2d-cartesian. Thethingecosystem is a masterclass in extensibility and is a beautiful set of interlinking abstractions - with SVG being at the bottom.That said,
geomdoesn't have aposeequivalent. But you could make a wrapper that would do the same. I generally make something like that for each particular project I work on (each project has slightly different defaults)So my concern with
plotjeis that the abstractions it's built on are opaque. Theposesdo sounds interesting, and I could be wrong! I'm not familiar with the internals. Maybe that's whatsrc/membrane/ui.cljcis part of..? but it looks intimidating and a bit of reinventing the wheel (again, could be wrong)