]> pintos-os.org Git - pspp/commitdiff
work on graph5
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 16 May 2026 15:46:37 +0000 (08:46 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 16 May 2026 15:46:37 +0000 (08:46 -0700)
rust/pspp/src/spv/read/graph.rs
rust/pspp/src/spv/testdata/graph5.expected.svg
rust/pspp/src/spv/testdata/graph5.xml

index e051e15fb44197d7530cbc57db75f7a8f014c093..20b6bbd3f90624fb4ee6409ed6486a0fc9bb13ab 100644 (file)
@@ -512,7 +512,7 @@ impl Visualization {
             axis_domains[axis] = AxisDomain {
                 domain,
                 formatter: formatter.unwrap_or_else(|| Formatter::default_for_locale(locale)),
-                label: axis2.and_then(|axis| axis.label.as_ref()),
+                label: dbg!(axis2.and_then(|axis| axis.label.as_ref())),
                 major_ticks: axis2.and_then(|axis| axis.major_ticks.as_ref()),
             };
         }
index f4b742d42da3ce3de534b9ac3241a8e882c8e0f3..b2f09320dc7165dbcf6dc3c08a059c3e613d6c24 100644 (file)
@@ -10,7 +10,7 @@
 
 </text>
 <text dominant-baseline="hanging" text-anchor="middle" x="333.5" y="472">
-Value of Variable 4
+Variable 4
 </text>
 <line stroke="black" x1="336" x2="618.75" y1="439" y2="439"/>
 <line stroke="black" x1="406.6875" x2="406.6875" y1="439" y2="449"/>
@@ -22,7 +22,7 @@ Value of Variable 4
 
 </text>
 <text dominant-baseline="hanging" text-anchor="middle" x="333.5" y="472">
-Value of Variable 4
+Variable 4
 </text>
 <line c:description="Y axis 0" stroke="black" x1="48.25" x2="48.25" y1="5" y2="109.75"/>
 <line stroke="black" x1="48.25" x2="38.25" y1="109.75" y2="109.75"/>
@@ -54,7 +54,7 @@ Value of Variable 4
 6
 </text>
 <text c:description="Row facet label" dominant-baseline="hanging" text-anchor="middle" transform="rotate(-90, 6.25, 57.375)" x="6.25" y="57.375">
-4
+V12-4
 </text>
 <line c:description="Y axis 1" stroke="black" x1="48.25" x2="48.25" y1="114.75" y2="219.5"/>
 <line stroke="black" x1="48.25" x2="38.25" y1="219.5" y2="219.5"/>
@@ -86,7 +86,7 @@ Value of Variable 4
 6
 </text>
 <text c:description="Row facet label" dominant-baseline="hanging" text-anchor="middle" transform="rotate(-90, 6.25, 167.125)" x="6.25" y="167.125">
-5
+V12-5
 </text>
 <line c:description="Y axis 2" stroke="black" x1="48.25" x2="48.25" y1="224.5" y2="329.25"/>
 <line stroke="black" x1="48.25" x2="38.25" y1="329.25" y2="329.25"/>
@@ -118,7 +118,7 @@ Value of Variable 4
 6
 </text>
 <text c:description="Row facet label" dominant-baseline="hanging" text-anchor="middle" transform="rotate(-90, 6.25, 276.875)" x="6.25" y="276.875">
-7
+V12-7
 </text>
 <line c:description="Y axis 3" stroke="black" x1="48.25" x2="48.25" y1="334.25" y2="439"/>
 <line stroke="black" x1="48.25" x2="38.25" y1="439" y2="439"/>
@@ -150,7 +150,7 @@ Value of Variable 4
 6
 </text>
 <text c:description="Row facet label" dominant-baseline="hanging" text-anchor="middle" transform="rotate(-90, 6.25, 386.625)" x="6.25" y="386.625">
-6
+V12-6
 </text>
 <text c:description="Y axis label" dominant-baseline="hanging" text-anchor="middle" transform="rotate(-90, 6.25, 222)" x="6.25" y="222">
 Frequency
index b3123bf6e9a1473752056fcb7e0235823f0db5cf..4f06ca6e33dafb770fd5b0ba0b37ca44fc374d7a 100644 (file)
   <sourceVariable categorical="false" creator="internal_aggregate" id="variable5" key="false" label="Frequency" shortLabel="Frequency" source="source0" sourceName="$WEIGHT" weight="true" />
   <sourceVariable categorical="true" creator="external_datasource" id="variable11" key="false" shortLabel="V11" source="source0" sourceName="V11" weight="false">
     <format>
-      <relabel from="101" id="relabel_1270" to="Category 1" />
-      <relabel from="102" id="relabel_1271" to="Category 2" />
+      <relabel from="101" id="relabel_1270" to="V11-1" />
+      <relabel from="102" id="relabel_1271" to="V11-2" />
+    </format>
+  </sourceVariable>
+  <sourceVariable categorical="true" creator="external_datasource" id="variable12" key="false" shortLabel="V12" source="source0" sourceName="V12" weight="false" >
+    <format>
+           <relabel from="4" to="V12-4"/>
+           <relabel from="5" to="V12-5"/>
+           <relabel from="6" to="V12-6"/>
+           <relabel from="7" to="V12-7"/>
     </format>
   </sourceVariable>
-  <sourceVariable categorical="true" creator="external_datasource" id="variable12" key="false" shortLabel="V12" source="source0" sourceName="V12" weight="false" />
   <!--  Structure  -->
   <graph cellStyle="facetLabel_data_1s" id="frame_data_1" style="frame_data_1s">
     <location method="fixed" part="left" value="1%" />
@@ -41,7 +48,7 @@
       <dimension id="dimension_1306" lowerMargin="5%" upperMargin="5%">
         <axis combineAxisLabels="true" id="axis_axisx_1" repeat="never" style="axis_axisx_1s">
           <label id="label_axisx_1" style="style_1312" textFrameStyle="style_1310">
-            <text id="text_1309">Value of Variable 4</text>
+            <text id="text_1309">Variable 4</text>
           </label>
           <majorTicks id="majorTicks_1314" markStyle="majorTicks_axis_axisx_1markStyle" stagger="false" style="style_1317" tickFrameStyle="style_1315" />
         </axis>
@@ -65,7 +72,7 @@
       <facetLevel gap="2%" id="facetLabel_panel_1" level="1">
         <axis id="axis_panel_1" opposite="true" repeat="never" style="axis_panel_1s">
           <label id="label_panel_1" style="style_1343" textFrameStyle="style_1341">
-            <text id="text_1340">Variable 4</text>
+            <text id="text_1340">Variable 11</text>
           </label>
           <majorTicks id="majorTicks_1345" markStyle="majorTicks_axis_panel_1markStyle" stagger="false" style="style_1348" tickFrameStyle="style_1346" />
         </axis>