#include <plot.h>
Plotting style, used for both layout and SVG rendering.
Colour/dash/hatch styles are defined as CSS classes, assigned to elements based on their integer style index. CSS is written inline in the SVG, and can be extended/overridden with .cssPrefix/.cssSuffix.
It generates CSS classes from .colours (svg-plot-sN/svg-plot-fN/svg-plot-tN for stroke/fill/text), .dashes (svg-plot-dN) and .hatches (svg-plot-hN), where N is the index - e.g. there are six colours by default, generating svg-plot-s0 to svg-plot-s5.
Nested Classes | |
| struct | Counter |
| struct | Hatch |
Static Methods | |
| static PlotStyle & | defaultStyle () |
| static void | defaultCMap (double v, double *rgba) |
Methods | |
| std::string | strokeClass (const Counter &counter) const |
| std::string | fillClass (const Counter &counter) const |
| std::string | textClass (const Counter &counter) const |
| std::string | dashClass (const Counter &counter) const |
| std::string | hatchClass (const Counter &counter) const |
| std::string | markerId (const Counter &counter) const |
| const std::string & | markerRaw (const Counter &counter) const |
| void | css (std::ostream &o) const |
| PlotStyle | copy () |
Attributes | |
| double | scale = 1 |
| scales the entire plot (including adjusting the precision) | |
| double | padding = 10 |
| double | lineWidth = 1.5 |
| double | precision = 100 |
| double | markerSize = 3.25 |
| double | tickH = 4 |
| double | tickV = 4 |
| double | labelSize = 12 |
| double | valueSize = 10 |
| double | titleSize = 13 |
| double | fontAspectRatio = 1 |
| scales size estimates, if using a particularly wide font | |
| double | textPadding = 5 |
| double | titlePadding = 15 |
| double | lineHeight = 1.2 |
| double | fillOpacity = 0.28 |
| double | dotOpacity = 0.5 |
| double | hatchWidth = 1 |
| double | hatchSpacing = 3 |
| double | animation = 2 |
| Animation duration. | |
| std::string | scriptHref = "" |
| std::string | scriptSrc = "" |
| std::string | cssPrefix = "" |
| std::string | cssSuffix = "" |
| std::vector< std::string > | colours = {"#0073E6", "#CC0000", "#00B300", "#806600", "#E69900", "#CC00CC"} |
| std::vector< std::vector< double > > | dashes = {{}, {1.2, 1.2}, {2.8, 1.6}, {5, 4}, {4, 1, 1, 1, 1, 1}, {10, 3}, {4, 2, 1, 2}} |
| std::vector< std::string > | markers |
SVG literals for the markers. These should be centered on (0, 0) and look correct next to a filled circle of radius 1. They will be given both a stroke and fill-class, so they should specify fill="none"/stroke="none" if fill/stroke is not wanted. | |
| std::vector< Hatch > | hatches = {{}, {-50}, {{30}, 0.9, 0.8}, {{8, 93}, 0.7, 1}} |
| std::function< void(double, double *)> | cmap = defaultCMap |
| double | dotCmapDepth = -0.85 |
| double signalsmith::plot::PlotStyle::animation = 2 |
Animation duration.
| double signalsmith::plot::PlotStyle::fontAspectRatio = 1 |
scales size estimates, if using a particularly wide font
| std::vector<std::string> signalsmith::plot::PlotStyle::markers |
SVG literals for the markers. These should be centered on (0, 0) and look correct next to a filled circle of radius 1. They will be given both a stroke and fill-class, so they should specify fill="none"/stroke="none" if fill/stroke is not wanted.
| double signalsmith::plot::PlotStyle::scale = 1 |
scales the entire plot (including adjusting the precision)