can often be controlled by the user; refer to descriptions of individual
procedures for details.
- The system-missing value exists only for numeric variables. String
+The system-missing value exists only for numeric variables. String
variables always have a defined value, even if it is only a string of
spaces.
- Variables, whether numeric or string, can have designated
-"user-missing values". Every user-missing value is an actual value for
-that variable. However, most of the time user-missing values are
-treated in the same way as the system-missing value.
+Variables, whether numeric or string, can have designated
+"user-missing values". Every user-missing value is an actual value
+for that variable. Any variables can have up to three user-missing
+values; numeric variables can also have a range of missing values.
+Most of the time, user-missing values are treated in the same way as
+the system-missing value.
_hinge_style: Option<String>,
_outlier_style: Option<String>,
_extreme_style: Option<String>,
+ _position_modifier: PositionModifier,
style: Option<String>,
statistics: Vec<Statistic>,
#[serde(rename = "$value")]
statistics: Vec<Statistic>,
+ #[serde(rename = "@positionModifier")]
+ position_modifier: PositionModifier,
+
/// `position` is just a generic way to say x, y, z
position: Vec<Coordinate>,
x: Option<Coordinate>,
_hinge_style: raw.hinge_style,
_outlier_style: raw.outlier_style,
_extreme_style: raw.extreme_style,
+ _position_modifier: raw.position_modifier,
style: raw.style,
statistics: raw.statistics,
operator,
}
}
+#[derive(Copy, Clone, Deserialize, Debug, Default, PartialEq, Eq)]
+#[serde(rename_all = "camelCase")]
+enum PositionModifier {
+ #[default]
+ None,
+ Center,
+ CenterStacked,
+ Stack,
+ StackInterpolating,
+ SetMissingsToZero,
+ MinusIntersection,
+ Dodge,
+ Pile,
+ JitterJointUniform,
+ JitterConditionalUniform,
+ JitterJointNormal,
+ JitterConditionalNormal,
+}
+
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
struct ColorAesthetic {
use either::Either;
use itertools::Itertools as _;
-use crate::spv::read::graph::Series;
+use crate::spv::read::graph::{Series, format::Formatter};
/// Operator precedence:
///
pub struct NestError;
+#[derive(Copy, Clone, Debug, PartialEq, Eq)]
+enum DimensionKind {
+ Coordinate,
+ Facet,
+ Statistic,
+ Weight,
+ Layer,
+}
+
+struct DimensionInfo {
+ name: String,
+ kind: DimensionKind,
+ format: Formatter,
+ is_categorical: bool,
+}
+
#[cfg(test)]
mod tests {
use std::str::FromStr;