(add-data p data)
Add data
to the top-level of plot p
. If data
is a string, it is assumed to be a URL. If data
is a seq of maps, then it is used as is. Otherwise data
is expected to be a seq of pairs. The first element of the pair is the x value and the second is the y value.
Add `data` to the top-level of plot `p`. If `data` is a string, it is assumed to be a URL. If `data` is a seq of maps, then it is used as is. Otherwise `data` is expected to be a seq of pairs. The first element of the pair is the x value and the second is the y value.
(add-layer p l)
Add another layer l
at the end the list of layers of the existing plotp
.
Add another layer `l` at the end the list of layers of the existing plot`p`.
(aggregate-transform p op field-name as-field)
(aggregate-transform p op field-name as-field {:keys [groupby-field]})
Add an aggregate transform to the plot p
.
Add an aggregate transform to the plot `p`.
(area-plot)
(area-plot opts)
Returns a bar plot. opts
are specified in the docs for base-plot
.
Returns a bar plot. `opts` are specified in the docs for `base-plot`.
(bar-plot)
(bar-plot opts)
Returns a bar plot. opts
are specified in the docs for base-plot
.
Returns a bar plot. `opts` are specified in the docs for `base-plot`.
(calculate-transform p expression as-field-name)
Add a calculate transform to the plot p
.
Add a calculate transform to the plot `p`.
(config p conf)
Add a config conf
to the plot p
.
Add a config `conf` to the plot `p`.
(density-plot)
(density-plot {:keys [density-field density-opts groupby-field
groupby-field-type],
:or {density-field "x", groupby-field-type "nominal"},
:as opts})
Returns a density plot. opts
are specified in the docs for base-plot
.
Returns a density plot. `opts` are specified in the docs for `base-plot`.
(density-transform p density-field-name d-opts)
Add a density transform to the plot p
.
Add a density transform to the plot `p`.
(drule p x1 y1 x2 y2 mark-opts)
Add a diagonal rule from [x
, y1
] to [x2
, y2
] to the plot p
.
Add a diagonal rule from [`x`, `y1`] to [`x2`, `y2`] to the plot `p`.
(facet p
{:keys [row-field row-type row-opts column-field column-type
column-opts facet-field facet-type facet-opts columns],
:or {row-type "nominal",
column-type "nominal",
facet-type "nominal"}})
Wrap a facet around the plot p
.
Wrap a facet around the plot `p`.
(faceted-density-plot
{:keys [density-field faceted-field faceted-field-type groupby-field
groupby-field-type fold-fields fold-as-fields],
:or {density-field "x",
faceted-field-type "nominal",
groupby-field-type "nominal"},
:as opts})
Returns a set of vertically-stacked density plots. opts
are specified in the docs for base-plot
. Requires faceted-field
(the field name to facet by). groupby-field
, fold-fields
(a vector) and fold-as-fields
(a vector) are optional. fold-as-fields
defaults to ["key" "value"] if not specified. faceted-field-type
and groupby-field-type
default to "nominal" if not specified.
Returns a set of vertically-stacked density plots. `opts` are specified in the docs for `base-plot`. Requires `faceted-field` (the field name to facet by). `groupby-field`, `fold-fields` (a vector) and `fold-as-fields` (a vector) are optional. `fold-as-fields` defaults to ["key" "value"] if not specified. `faceted-field-type` and `groupby-field-type` default to "nominal" if not specified.
(filter-transform p pred)
Add a filter transform to the plot p
.
Add a filter transform to the plot `p`.
(height p height)
Set the height
of the plot p
. In pixels.
Set the `height` of the plot `p`. In pixels.
(histogram-plot)
(histogram-plot {:keys [x-field max-bins x-opts y-opts],
:or {x-field "x", max-bins 100},
:as opts})
Returns a histogram plot. opts
are specified in the docs for base-plot
.
Returns a histogram plot. `opts` are specified in the docs for `base-plot`.
(hrule p y-val mark-opts)
Add a horizontal rule at a y value of y-val
to the plot p
.
Add a horizontal rule at a y value of `y-val` to the plot `p`.
(independent-axis p channels)
Set the specified channels (as keywords) to have an independent axis.
Set the specified channels (as keywords) to have an independent axis.
(independent-legend p channels)
Set the specified channels (as keywords) to have an independent legend.
Set the specified channels (as keywords) to have an independent legend.
(independent-scale p channels)
Set the specified channels (as keywords) to have an independent scale.
Set the specified channels (as keywords) to have an independent scale.
(joinaggregate-transform p op field-name as-field)
(joinaggregate-transform p
op
field-name
as-field
{:keys [groupby-field]})
Add a joinaggregate transform to the plot p
.
Add a joinaggregate transform to the plot `p`.
(line-plot)
(line-plot opts)
Returns a line plot. opts
are specified in the docs for base-plot
.
Returns a line plot. `opts` are specified in the docs for `base-plot`.
(qq-line)
(qq-line
{:keys [quantile-field groupby-field theoretical-distribution],
:or {quantile-field "x", theoretical-distribution "Normal"},
:as opts})
Returns a QQ Line plot. The theoretical-distribution
must be one of: "Normal" (default), "Uniform", or "LogNormal".
Returns a QQ Line plot. The `theoretical-distribution` must be one of: "Normal" (default), "Uniform", or "LogNormal".
(qq-plot)
(qq-plot {:keys [quantile-field quantile-step groupby-field
theoretical-distribution],
:or {quantile-field "x",
quantile-step 0.01,
theoretical-distribution "Normal"},
:as opts})
Returns a QQ plot. opts
are specified in the docs for base-plot
. The theoretical-distribution
must be one of: "Normal" (default), "Uniform", or "LogNormal".
Returns a QQ plot. `opts` are specified in the docs for `base-plot`. The `theoretical-distribution` must be one of: "Normal" (default), "Uniform", or "LogNormal".
(quantile-transform p quantile-field-name q-opts)
Add a quantile transform to the plot p
.
Add a quantile transform to the plot `p`.
(regression-transform p dep-field indep-field reg-opts)
Add a regression transform to the plot p
.
Add a regression transform to the plot `p`.
(scatter-plot)
(scatter-plot opts)
Returns a scatter plot. opts
are specified in the docs for base-plot
.
Returns a scatter plot. `opts` are specified in the docs for `base-plot`.
(subtitle p subtitle)
Add a subtitle
to the plot p
.
Add a `subtitle` to the plot `p`.
(title p title-text)
(title p title-text title-opts)
Add title-text
as a title to the plot p
. title-opts
, if specified, is a map of title-specific options.
Add `title-text` as a title to the plot `p`. `title-opts`, if specified, is a map of title-specific options.
(vrule p x-val mark-opts)
Add a vertical rule at a x value of x-val
to the plot p
.
Add a vertical rule at a x value of `x-val` to the plot `p`.
(width p width)
Set the width
of the plot p
. In pixels.
Set the `width` of the plot `p`. In pixels.
(wrap-layer p)
Wrap a layer around the plot p
.
Wrap a layer around the plot `p`.
(x-axis-format p x-format)
Specify the x-axis format.
Specify the x-axis format.
(x-axis-title p title)
Add a title
to the x-axis of the plot p
. To the first layer, if any. Otherwise to the top-level.
Add a `title` to the x-axis of the plot `p`. To the first layer, if any. Otherwise to the top-level.
(x-domain p x-dom)
Specify the x-axis domain range.
Specify the x-axis domain range.
(x-scale-log10 p)
Set the x scale to be a log scale.
Set the x scale to be a log scale.
(y-axis-format p y-format)
Specify the y-axis format.
Specify the y-axis format.
(y-axis-title p title)
Add a title
to the y-axis of the plot p
. To the first layer, if any. Otherwise to the top-level.
Add a `title` to the y-axis of the plot `p`. To the first layer, if any. Otherwise to the top-level.
(y-domain p y-dom)
Specify the y-axis domain range.
Specify the y-axis domain range.
(y-scale-log10 p)
Set the y scale to be a log scale.
Set the y scale to be a log scale.
(zipf-plot)
(zipf-plot opts)
Returns a Zipf (log-log scatter) plot. opts
are specified in the docs for base-plot
.
Returns a Zipf (log-log scatter) plot. `opts` are specified in the docs for `base-plot`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close