1919//! # Internal vs User-Facing Aesthetics
2020//!
2121//! The pipeline uses internal positional aesthetic names (pos1, pos2, etc.) that are
22- //! transformed from user-facing names (x/y or theta /radius) early in the pipeline
22+ //! transformed from user-facing names (x/y or angle /radius) early in the pipeline
2323//! and transformed back for output. This is handled by `AestheticContext`.
2424
2525use std:: collections:: HashMap ;
@@ -87,7 +87,7 @@ pub const NON_POSITIONAL: &[&str] = &[
8787/// Comprehensive context for aesthetic operations.
8888///
8989/// Uses HashMaps for efficient O(1) lookups between user-facing and internal aesthetic names.
90- /// Used to transform between user-facing aesthetic names (x/y or theta /radius)
90+ /// Used to transform between user-facing aesthetic names (x/y or angle /radius)
9191/// and internal names (pos1/pos2), as well as facet aesthetics (panel/row/column)
9292/// to internal facet names (facet1/facet2).
9393///
@@ -102,8 +102,8 @@ pub const NON_POSITIONAL: &[&str] = &[
102102/// assert_eq!(ctx.map_user_to_internal("ymin"), Some("pos2min"));
103103///
104104/// // For polar coords
105- /// let ctx = AestheticContext::from_static(&["theta ", "radius"], &[]);
106- /// assert_eq!(ctx.map_user_to_internal("theta "), Some("pos1"));
105+ /// let ctx = AestheticContext::from_static(&["angle ", "radius"], &[]);
106+ /// assert_eq!(ctx.map_user_to_internal("angle "), Some("pos1"));
107107/// assert_eq!(ctx.map_user_to_internal("radius"), Some("pos2"));
108108///
109109/// // With facets
@@ -212,7 +212,7 @@ impl AestheticContext {
212212
213213 /// Map user aesthetic (positional or facet) to internal name.
214214 ///
215- /// Positional: "x" → "pos1", "ymin" → "pos2min", "theta " → "pos1"
215+ /// Positional: "x" → "pos1", "ymin" → "pos2min", "angle " → "pos1"
216216 /// Facet: "panel" → "facet1", "row" → "facet1", "column" → "facet2"
217217 ///
218218 /// Note: Facet mappings work regardless of whether a FACET clause exists,
@@ -242,7 +242,7 @@ impl AestheticContext {
242242
243243 /// Map internal aesthetic to user-facing name (reverse of map_user_to_internal).
244244 ///
245- /// Positional: "pos1" → "x", "pos2min" → "ymin", "pos1" → "theta " (for polar)
245+ /// Positional: "pos1" → "x", "pos2min" → "ymin", "pos1" → "angle " (for polar)
246246 /// Facet: "facet1" → "panel" (wrap), "facet1" → "row" (grid), "facet2" → "column" (grid)
247247 /// Non-positional: "color" → "color" (unchanged)
248248 ///
@@ -331,7 +331,7 @@ impl AestheticContext {
331331 & self . internal_primaries
332332 }
333333
334- /// Get user positional aesthetics (x, y or theta , radius or custom names)
334+ /// Get user positional aesthetics (x, y or angle , radius or custom names)
335335 pub fn user_positional ( & self ) -> & [ String ] {
336336 & self . user_primaries
337337 }
@@ -515,7 +515,7 @@ mod tests {
515515 assert ! ( !is_positional_aesthetic( "x" ) ) ;
516516 assert ! ( !is_positional_aesthetic( "y" ) ) ;
517517 assert ! ( !is_positional_aesthetic( "xmin" ) ) ;
518- assert ! ( !is_positional_aesthetic( "theta " ) ) ;
518+ assert ! ( !is_positional_aesthetic( "angle " ) ) ;
519519
520520 // Non-positional
521521 assert ! ( !is_positional_aesthetic( "color" ) ) ;
@@ -549,10 +549,10 @@ mod tests {
549549
550550 #[ test]
551551 fn test_aesthetic_context_polar ( ) {
552- let ctx = AestheticContext :: from_static ( & [ "theta " , "radius" ] , & [ ] ) ;
552+ let ctx = AestheticContext :: from_static ( & [ "angle " , "radius" ] , & [ ] ) ;
553553
554554 // User positional names
555- assert_eq ! ( ctx. user_positional( ) , & [ "theta " , "radius" ] ) ;
555+ assert_eq ! ( ctx. user_positional( ) , & [ "angle " , "radius" ] ) ;
556556
557557 // Primary internal names
558558 let primary: Vec < & str > = ctx
@@ -586,12 +586,12 @@ mod tests {
586586
587587 #[ test]
588588 fn test_aesthetic_context_polar_mapping ( ) {
589- let ctx = AestheticContext :: from_static ( & [ "theta " , "radius" ] , & [ ] ) ;
589+ let ctx = AestheticContext :: from_static ( & [ "angle " , "radius" ] , & [ ] ) ;
590590
591591 // User to internal
592- assert_eq ! ( ctx. map_user_to_internal( "theta " ) , Some ( "pos1" ) ) ;
592+ assert_eq ! ( ctx. map_user_to_internal( "angle " ) , Some ( "pos1" ) ) ;
593593 assert_eq ! ( ctx. map_user_to_internal( "radius" ) , Some ( "pos2" ) ) ;
594- assert_eq ! ( ctx. map_user_to_internal( "thetaend " ) , Some ( "pos1end" ) ) ;
594+ assert_eq ! ( ctx. map_user_to_internal( "angleend " ) , Some ( "pos1end" ) ) ;
595595 assert_eq ! ( ctx. map_user_to_internal( "radiusmin" ) , Some ( "pos2min" ) ) ;
596596 }
597597
@@ -687,14 +687,14 @@ mod tests {
687687
688688 #[ test]
689689 fn test_aesthetic_context_internal_to_user_polar ( ) {
690- let ctx = AestheticContext :: from_static ( & [ "theta " , "radius" ] , & [ ] ) ;
690+ let ctx = AestheticContext :: from_static ( & [ "angle " , "radius" ] , & [ ] ) ;
691691
692692 // Primary aesthetics map to polar names
693- assert_eq ! ( ctx. map_internal_to_user( "pos1" ) , "theta " ) ;
693+ assert_eq ! ( ctx. map_internal_to_user( "pos1" ) , "angle " ) ;
694694 assert_eq ! ( ctx. map_internal_to_user( "pos2" ) , "radius" ) ;
695695
696696 // Variants
697- assert_eq ! ( ctx. map_internal_to_user( "pos1end" ) , "thetaend " ) ;
697+ assert_eq ! ( ctx. map_internal_to_user( "pos1end" ) , "angleend " ) ;
698698 assert_eq ! ( ctx. map_internal_to_user( "pos2min" ) , "radiusmin" ) ;
699699 assert_eq ! ( ctx. map_internal_to_user( "pos2max" ) , "radiusmax" ) ;
700700 }
0 commit comments