Plot settings
.qp.theme
Add a theme node to a specification
Parameters:
Name | Type | Description |
---|---|---|
t | dict | partial or whole theme |
s | table | specification |
Returns:
Type | Description |
---|---|
table | new specification |
Example: Default theme
SPEC : .qp.layout[`vert;::] (
.qp.title["User Trend Report"]
.qp.line[([]x:til 4500; y:sums ?[4500?1.<0.5;-1;1]); `x; `y]
.qp.s.aes[`fill; `x]
,.qp.s.scale[`fill; .gg.scale.colour.gradient[0xad63e9; 0x2871e7]];
.qp.title["Sales Report"]
.qp.line[([]x:til 4500; y:sums ?[4500?1.<0.5;-1;1]); `x; `y]
.qp.s.aes[`fill; `x]
,.qp.s.scale[`fill; .gg.scale.colour.gradient[0xad63e9; 0x2871e7]]);
SPEC
Example: Explicit default theme
.qp.theme[.gg.theme.default] SPEC
Example: Dark theme
.qp.theme[.gg.theme.dark] SPEC
Example: Deep blue theme
.qp.theme[.gg.theme.deepblue] SPEC
Example: Light theme
.qp.theme[.gg.theme.light] SPEC
Example: Clean theme
.qp.theme[.gg.theme.clean] SPEC
Example: Clean blue theme
.qp.theme[.gg.theme.cleanblue] SPEC
Example: Transparent theme
.qp.theme[.gg.theme.transparent] SPEC
Example: White theme
.qp.theme[.gg.theme.white] SPEC
Example: Blank theme
.qp.theme[.gg.theme.blank] SPEC
Example: custom settings
.qp.theme[``dynamic_axes`grid_style_y`legend_use!(::;1b;`zebra;0b)]
SPEC
.qp.title
Add a title node to a specification
Parameters:
Name | Type | Description |
---|---|---|
title | char[] | |
spec | table |
Returns:
Type | Description |
---|---|
table |
Example:
.qp.title["A basic scatterplot"]
.qp.point[([]x:til 45); `x; `x; ::]