1 // PSPP - a program for statistical analysis.
2 // Copyright (C) 2017, 2018, 2019, 2020 Free Software Foundation, Inc.
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 :style[style_ref]=ref style
28 => (visualization_extension | location)*[extensions]
29 (userSource | delimitedFileSource | embeddedSource)+[sources]
30 (sourceVariable | derivedVariable | expressionVariable
31 | intervalDomain | categoricalDomain)+[variables]
32 (graph | labelFrame | container | legend)+[graphs]
33 (style | layerController | styleCycle)+[styles]
38 extension[visualization_extension]
45 :styleCycleRepository?
50 :statisticsSummary[statisticsSummary_]?
54 :percentDomain=(percentDomain)?
59 :boxplotLinkWidth=bool?
61 :preserveLocations=bool?
69 :missing=(listwise | pairwise)? // Related to omit_empty?
73 :domain=ref categoricalDomain
81 :missing[delimitedFileSource_missing]=(pairwise)
84 embeddedSource => names types labels? labelColumns? row+
98 => (categories | variableReference | domainReference)+ (simpleSort | statisticSort)?
101 :ref=ref categoricalDomain
106 => (variableReference | range)*
119 :method[sort_method]=(custom | natural | percent | naturalUsingLabel | data)
121 => (categoryOrder | sortMove)?
130 :method[statisticSort_method]=(mean | sum)
131 :sourceVariable=ref (sourceVariable | derivedVariable | expressionVariable)
132 :statVariable=ref (sourceVariable | derivedVariable | expressionVariable)
137 :source=ref (userSource | delimitedFileSource | embeddedSource)?
138 :domain=ref categoricalDomain?
140 :dependsOn=ref sourceVariable?
142 :labelVariable=ref sourceVariable?
148 :inputDateFormatPattern?
149 :measurementLevel=(ratio | nominal)?
150 => variable_extension* (format | stringFormat | numberFormat)?
155 :dependsOn=ref sourceVariable?
159 :source=ref (userSource | delimitedFileSource | embeddedSource)?
161 :domain=ref categoricalDomain?
162 => variable_extension* (format | stringFormat)? valueMapEntry*
164 extension[variable_extension]
168 :valuesAreGroupedMidpoints=bool?
179 :source=ref (userSource | delimitedFileSource | embeddedSource)?
182 valueMapEntry :from :to => EMPTY
184 categoryOrder => TEXT
191 => (location | coordinates | faceting | point | facetLayout
192 | line | schema | interval | lineGuide | functionGuide | edge | path
193 | planeGuide | frameGuide | area | polygon | pointGuide)*
196 :part=(height | width | top | bottom | left | right)
197 :method=(sizeToContent | attach | fixed | same)
200 :target=ref (labelFrame | graph | container | legend | visualization)?
202 :specifiedByUser=bool?
206 => (dimension | dimensionReference | transposeTransform | reflectionTransform
207 | polarTransform | sameRatioTransform | insetTransform
208 | rectangularTransform | obliqueTransform)*
211 :domain=ref (sourceVariable | derivedVariable | expressionVariable | categoricalDomain | intervalDomain)?
214 :niceLowerMapping=bool?
215 :niceUpperMapping=bool?
218 :clusterVariable=ref (sourceVariable | derivedVariable | expressionVariable)?
219 :facetsShareScale=bool?
228 :method[scale_method] // linear | log.safe
233 transposeTransform => EMPTY
241 :counterClockwise=bool?
272 :method[faceting_method]=(nest | cross | dot)?
273 => layer[layers1]* cross layer[layers2]* | dot | variableReference
275 cross => (unity | nest | cross | variableReference)+
277 dot => unity? variableReference
279 nest => variableReference[vars]+
284 :ref=ref (sourceVariable | derivedVariable | expressionVariable)
288 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
291 :method[layer_method]=(nest)?
297 :method[facetLayout_method]=(structured | unstructured)?
299 :alternatingColor=color?
301 => tableLayout? setCellProperties[scp1]*
302 facetLevel* setCellProperties[scp2]*
305 :verticalTitlesInCorner=bool
307 :fitCells=(ticks both)?
319 :showCollidingLabels=bool?
320 :labelCollisionHandling=(none | normal | outside | quality)?
322 :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
325 :coordinates=ref coordinates?
326 => binStatistic? graphLayoutStatistic?
327 (color | size | shape | labeling | styleBy | image)*
328 split? conditionalStyle? x? y? z?
331 // conditionalStyle x y
332 // graphLayoutStatistic labeling
334 // color*2 size shape x y
335 // color size shape color x y
336 // labeling styleBy x y
339 :from=ref (sourceVariable | derivedVariable | expressionVariable)
340 :to=ref (sourceVariable | derivedVariable | expressionVariable)
341 :nodes=ref (sourceVariable | derivedVariable | expressionVariable)
342 => initial (move | swap)?
345 :cycle=ref styleCycle
346 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
348 :domain=ref categoricalDomain?
357 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
366 :type=(grid | circle | data)
375 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
384 :breakRepresentation?
385 :labelCollisionHandling=(none | normal | outside | quality)?
386 :showCollidingLabels=bool?
390 :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
391 :showDiscontinuity=bool?
395 => (conditionalStyle | smoothStatistic | summaryStatistic | styleBy | regionStatistic | binStatistic | distributionStatistic | attach | color | labeling | size | dash | position_element)* x? y?
396 // smoothStatistic summaryStatistic color dash x y
397 // summaryStatistic smoothStatistic color x y
398 // binStatistic distributionStatistic x
399 // binStatistic summaryStatistic x y
402 :method[smoothStatistic_method]=(step-left | step-center | linear | polynomial | loess | spline)
405 :kernel=(uniform | epanechnikov)?
412 :predictIndividuals=bool
416 distributionStatistic
417 :distribution=(normal | poisson)
421 :cycle=ref styleCycle?
422 :domain=ref (categoricalDomain | intervalDomain)
423 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
430 :cycle=ref styleCycle
431 :domain=ref categoricalDomain
432 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
440 :coordinates=ref coordinates?
442 => (label | conditionalStyle)?
450 :coordinates=ref coordinates?
451 => (label | conditionalStyle)?
455 :positionModifier=(none | stack | pile | dodge | stackInterpolating)
458 => (attach | color | size | position_element | linkStatistic)* x? y? z?
459 // attach color size position
467 :breakRepresentation=(wings)?
469 :labelCollisionHandling=(none | normal | outside | quality)?
471 :showCollidingLabels=bool
473 => (styleBy | color)* x y
488 :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
489 :showDiscontinuity=bool
492 :breakRepresentation=(wings)?
493 :labelCollisionHandling=(none | normal | outside | quality)?
494 :showCollidingLabels=bool?
496 => binStatistic? summaryStatistic? color? x y?
497 // binStatistic summaryStatistic x
502 :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
514 :targetKey=ref (sourceVariable | derivedVariable | expressionVariable)
517 position[position_element]
518 :variable=ref expressionVariable
521 schema // aka boxplot
524 :fenceStyle=ref style?
525 :hingeStyle=ref style?
526 :medianStyle=ref style?
528 :outlierStyle=ref style?
529 :showCollidingLabels=bool?
530 :labelCollisionHandling=(none | normal | outside | quality)?
532 :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
534 => tukeyStatistic (color | split | labeling | pattern | styleBy)* x? y?
535 // tukeyStatistic color labeling x y
536 // tukeyStatistic labeling y
537 // tukeyStatistic labeling*2 x y
539 // tukeyStatistic labeling styleBy x y
540 // tukeyStatistic split styleBy labeling x y
541 // tukeyStatistic labeling pattern x y
543 tukeyStatistic => EMPTY
549 :combineAxisLabels=bool?
552 :transform=(linear | percent)?
553 => label? majorTicks? minorTicks? axisTransformParameter*
557 :textFrameStyle=ref style?
558 :purpose=(title | subTitle | subSubTitle | layer | footnote | subFootnote | auto)?
559 => (text | descriptionGroup)*
562 :target=ref (faceting | interval | sourceVariable | line | area)
564 => (description | text)+
568 => (format | numberFormat)*
574 :tickFrameStyle=ref style
577 :markStyle=ref style?
580 :position[majorTicks_position]=(outside | cross)?
581 => gridline? (format | numberFormat)?
586 :position[minorTicks_position]=(outside | cross)?
588 => gridline? (format | numberFormat)?
595 axisTransformParameter
596 :parameterName=(base-ratio | base-match | derived-ratio | derived-match)
601 :applyToConverse=bool?
602 => (setStyle | setFrameStyle | setFormat | setMetaData)* union[union_]?
605 :target=ref (labeling | graph | interval | majorTicks)
616 :target=ref (majorTicks | labeling)
618 => format | numberFormat | stringFormat+ | dateTimeFormat | elapsedTimeFormat
622 :target=ref majorTicks
626 :baseFormat[f_base_format]=(date | time | dateTime | elapsedTime)?
629 :mdyOrder=(dayMonthYear | monthDayYear | yearMonthDay)?
634 :yearAbbreviation=bool?
636 :monthFormat=(long | short | number | paddedNumber)?
638 :dayOfMonthPadding=bool?
643 :dayOfWeekAbbreviation=bool?
652 :dayType=(month | year)?
653 :hourFormat=(AMPM | AS_24 | AS_12)?
654 :minimumIntegerDigits?
655 :maximumFractionDigits=int?
656 :minimumFractionDigits?
658 :scientific=(onlyForSmall | whenNeeded | true | false)?
662 :tryStringsAsNumbers=bool?
663 :negativesOutside=bool?
664 :negativesInParentheses=bool?
665 :hiddenseparator=bool?
671 :minimumIntegerDigits?
672 :maximumFractionDigits=int?
673 :minimumFractionDigits=int?
675 :scientific=(onlyForSmall | whenNeeded | true | false)?
679 :hiddenseparator=bool?
682 stringFormat => relabel* affix*
685 :baseFormat[dt_base_format]=(date | time | dateTime)
687 :mdyOrder=(dayMonthYear | monthDayYear | yearMonthDay)?
689 :yearAbbreviation=bool?
694 :monthFormat=(long | short | number | paddedNumber)?
699 :dayOfWeekAbbreviation=bool?
701 :dayOfMonthPadding=bool?
710 :dayType=(month | year)?
711 :hourFormat=(AMPM | AS_24 | AS_12)?
715 :baseFormat[dt_base_format]=(date | time | dateTime)
729 :definesReference=int
730 :position=(subscript | superscript)
742 intersect => where+ | intersectWhere | alternating | EMPTY
745 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
750 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
751 :variable2=ref (sourceVariable | derivedVariable | expressionVariable)
758 :definesReference=int?
759 :position=(subscript | superscript)?
766 :labelCollisionHandling=(none | normal | outside | quality)?
767 :showCollidingLabels=bool?
769 :positionModifier=(none | stack | pile | dodge | stackInterpolating)?
772 :coordinates=ref coordinates?
773 => conditionalStyle? binStatistic? summaryStatistic* (styleBy | labeling | color | offset | pattern | size | dash)* x? y? z? footnotes?
774 // styleBy labeling x
775 // labeling styleBy x y
776 // summaryStatistic color labeling x
777 // styleBy labeling offset x
778 // summaryStatistic*2 color labeling
779 // color pattern color x y
780 // summaryStatistic color size x y
781 // summaryStatistic dash x y
782 // conditionalStyle binStatistic summaryStatistic x y
787 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
788 :connectingLines=bool?
789 :textFrameStyle=ref style?
792 :part[labeling_part]=(median)?
793 => (formatting | format | summaryStatistic | numberFormat | transparency | footnotes | labelLocation | styleBy)*
794 // summaryStatistic styleBy format
797 :domain=ref categoricalDomain
800 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
804 :cycle=ref styleCycle
805 :domain=ref categoricalDomain
806 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
811 :affect=(both | main | secondary)
812 :domain=ref intervalDomain
815 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
819 :domain=ref intervalDomain
821 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
824 formatting :variable=ref (sourceVariable | derivedVariable | expressionVariable) => formatMapping*
826 formatMapping :from=int => format?
829 :affect=(both | main | secondary)?
830 :cycle=ref styleCycle?
834 :domain=ref categoricalDomain?
846 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
850 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
854 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
861 :affects=(hingeStyle)?
865 :gridType=(square | dot)?
873 :method[summaryStatistic_method]=(count | range | percent | sum | mean | percentCount | fraction | median | first | mode | cumulativePercent)?
874 :symbol[summaryStatistic_symbol]=(circle | square)?
875 :summaryBase=(coordinate | global | aesthetic)?
876 :convertIntervalToSingleValue=bool?
879 :summaryAcrossPanels=bool?
884 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
888 :definesReference=int
895 :tickFrameStyle=ref style
896 :tickTextStyle=ref style
897 => location+ label? legendTarget*
900 :target=ref (styleBy | color | line | point | functionGuide | pattern | size | dash | interval | shape | lineGuide)
901 :domain=ref (categoricalDomain | intervalDomain)?
908 :border-bottom=(solid | thick | thin | double | none)?
909 :border-top=(solid | thick | thin | double | none)?
910 :border-left=(solid | thick | thin | double | none)?
911 :border-right=(solid | thick | thin | double | none)?
912 :border-bottom-color?
918 :font-weight=(regular | bold)?
919 :font-style=(regular | italic)?
920 :font-underline=(none | underline)?
921 :margin-bottom=dimension?
922 :margin-left=dimension?
923 :margin-right=dimension?
924 :margin-top=dimension?
925 :textAlignment=(left | right | center | decimal | mixed)?
926 :labelLocationHorizontal=(positive | negative | center)?
927 :labelLocationVertical=(positive | negative | center)?
928 :decimal-offset=dimension?
934 :stroke-linecap=(butt | round | square)?
935 :stroke-width=dimension?
939 :symbol=(circle | ibeam | flower | square | line | acrossDown | cross
940 | polygon | plus | bowtie | star | arrow | none)?
943 :padding-left=dimension?
944 :padding-right=dimension?
945 :padding-top=dimension?
946 :padding-bottom=dimension?
947 :maxAttachedTextHeight=dimension?
948 :maxAttachedTextWidth=dimension?
951 :labelInside=(preferred | false | true)?
955 :gradient-angle=real?
956 :gradient-focus=real?
957 :gradient-method=(linear)?
959 :shadow-dx=dimension?
960 :shadow-dy=dimension?
961 :background-method=(center)?
972 => container_extension? location* (labelFrame | legend | container | graph)*
974 extension[container_extension] :combinedFootnotes=(true) => EMPTY
978 => labelFrame_extension* location+ label? paragraph?
980 extension[labelFrame_extension]
982 :position[labelFrame_position]=(title | footnote | subfootnote)
985 paragraph :hangingIndent=dimension? => EMPTY
987 styleCycle => cycle+ styleCycle_extension*
991 extension[styleCycle_extension]
1000 :part[labeling_part]=(median)?
1005 :variable=ref (sourceVariable | derivedVariable | expressionVariable)
1006 => summaryStatistic?
1008 resources => imageResource*