(add-data p data)
Add data
to the top-level of plot p
.
Add `data` to the top-level of plot `p`.
(add-layer p l)
Add another layer l
at the end of the existing plotp
.
Add another layer `l` at the end of the existing plot`p`.
(aggregate-transform p op field-name as-field groupby-field)
Add an aggregate transform.
Add an aggregate transform.
(base-plot {:keys [mark-type mark-opts x-field x-type x-opts y-field y-type
y-opts x2-field x2-type x2-opts y2-field y2-type y2-opts
color-value color-field color-type color-opts shape-field
shape-type shape-opts facet-field facet-type facet-opts
encoding-opts]
:or {x-type "quantitative"
y-type "quantitative"
color-type "nominal"
shape-type "nominal"
y2-type "quantitative"
y-field "y"
x-field "x"
facet-type "nominal"
x2-type "quantitative"}
:as opts})
Helper function that generates a base Oz plot.
Helper function that generates a base Oz plot.
(calculate-transform p expression as-field-name)
Add a calculate transform.
Add a calculate transform.
(density-plot)
(density-plot {:keys [density-field groupby-field groupby-field-type]
:or {density-field "x" groupby-field-type "nominal"}
:as opts})
Returns a density plot.
Returns a density plot.
(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 column-field column-type row-opts column-opts]
:or {row-type "nominal" column-type "nominal"}})
Wrap a facet around the plot.
Wrap a facet around the plot.
(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.
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. 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.
Add a filter transform.
(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.
Returns a histogram 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.
(line-plot)
(line-plot opts)
Returns a line plot.
Returns a line 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.
The theoretical-distribution
must be one of:
"Normal" (default), "Uniform", or "LogNormal".
Returns a QQ 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.
Add a quantile transform.
(regression-transform p dep-field indep-field reg-opts)
Add a regression transform.
Add a regression transform.
(scatter-plot)
(scatter-plot opts)
Returns a scatter plot.
Returns a scatter 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
.
Add a `title` to the x-axis of the plot `p`.
(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
.
Add a `title` to the y-axis of the plot `p`.
(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 {:keys [] :or {} :as opts})
Returns a Zipf (log-log scatter) plot.
Returns a Zipf (log-log scatter) plot.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close