From: Ben Pfaff Date: Tue, 18 Aug 2026 21:37:46 +0000 (-0700) Subject: update graphs notes X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c57879a4ca2009ccead8922b3eeb12dc4f2ffd3;p=pspp update graphs notes --- diff --git a/rust/doc/src/spv/graphs.md b/rust/doc/src/spv/graphs.md index bfc0d75348..3d653fee8a 100644 --- a/rust/doc/src/spv/graphs.md +++ b/rust/doc/src/spv/graphs.md @@ -163,6 +163,36 @@ derivedVariable => variable_extension* (format | stringFormat)? valueMapEntry* ``` +`value` takes one of the following forms: + +* `constant(0)` + `constant(VARIABLE)` + All zeros. The reason why a variable is sometimes named is + unknown. Sometimes the "variable name" has spaces in it. + +* `map(VARIABLE)` + Transforms the values in the named VARIABLE using the + `valueMapEntry`s contained within the element. + +* `VARIABLE?IFTRUE:IFFALSE` + where: + + - `RELOP` is one of `<>`, `!=`, `>=`, `<=`, `==`, `=`, `<`, or `>` + + - `OPERAND`, `IFTRUE`, and `IFFALSE` are each a number, a variable + name, or a string quoted with `"` or `'`. + + Examples: + + - `x>=0?"0positive":"1negative"` + - `xVariable<100?"a":"b"` + +* `a+b+c+...` + where each of the operands is either a variable name or a `"`-quoted + string. The variables and quoted strings get concatenated in some + nonobvious way. + + ``` expressionVariable :id @@ -186,8 +216,6 @@ Forms of value: * `label(variableName)` * `"quoted string"` * `rowIndex()` -* `x>=0?"0positive":"1negative"` -* `xVariable<100?"a":"b"` ## `categoricalDomain` @@ -755,7 +783,16 @@ The following variations on `faceting` have been observed in the corpus: The possible `method`s are `cross`, `dot`, and `nest`. `dot` means the same as `blend`. All the methods appear in the corpus. The methods are about combining the "main expression" with the faceting -(but I'm not sure what that means). +(but I'm not sure what that means). Observed behavior: + +* `cross`: The facets are all forced to have the same domain and axes. + This is the common case for faceted data. + +* `nest`: The facets can have different domains and axes according to + whatever data is in them. For example, this is used when the facets + contain different pie charts, where stacking of percentages in + different facets produces, say, a total of 55% in one facet and 45% + in another, but both pie charts should be out of 100%. In the corpus, `faceting` only has a single child. The schema says that it can have statistics children, but these never appear in the