Issues and missing features encountered while translating fpp3 examples.
:=color "MonthNum" where MonthNum is longmapv str):=color-type :nominalgg_season() equivalentadd-time-columns in tablecloth.time. A layer-seasonal in tableplot would complete it.gg_subseries() equivalentxaxis, xaxis2, ... with domain arrays){:xaxis "x3" :yaxis "y3"})(-> ds
(plotly/layer-line {:=x "Year" :=y "Cost"})
(plotly/facet-wrap {:=facet "MonthNum" :=ncol 12})
(plotly/add-hline {:=y :mean :=per-facet true})) ; or similar
{:type "scatter" :mode "lines" :y [mean mean]} tracesplotly/add-hline, plotly/add-vline helpers that work with facetsGGally::ggpairs() equivalentgg_lag() equivalentlag-column) rather than a tableplot feature:=mark-color applies to ALL traces)plotly/plot to force evaluation, then post-process the :data traces manually;; Option A: per-trace transform function
{:=trace-fn (fn [trace] (assoc trace :showlegend false))}
;; Option B: full spec post-process hook
{:=post-process (fn [spec] (update spec :data ...))}
;; Option C: more granular built-in options
{:=showlegend false ; per-trace
:=line-width 0.3 ; already have :=mark-size, but not for lines
:=color-fn #(case ...)} ; function instead of just column + palette
plotly/plot is the official API for forcing evaluation, which is good. But the pattern of "tableplot gets 90% there, need to tweak output" seems common enough to warrant a hook.Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |