# Copyright (c) 2025-2026 Gigasoft, Inc. All rights reserved. === ProEssentials Pepso (knowledge rev 4.2) (Polar/Smith Object) Patterns === Pepso is the Polar/Smith Chart Object for polar coordinates, Smith charts, radar/spider plots, and rose charts. ALWAYS query pe_query.py for exact paths -- this file provides conceptual understanding only. CRITICAL -- PLOTTING METHOD ENUM: Pepso uses PSGraphPlottingMethod (NOT GraphPlottingMethod or others). Pepso1.PePlot.Method = PSGraphPlottingMethod.PointsPlusLine; The enum has only 4 values: Line (0), Point (1), PointsPlusLine (2), Area (3) Query: pe_query.py enum "PSGraphPlottingMethod" WARNING: Integer values differ from other chart object enums. Using GraphPlottingMethod or SGraphPlottingMethod with Pepso produces silent runtime bugs. Always use PSGraphPlottingMethod. CHART TYPE SELECTION: PePlot.SmithChart = SmithChart enum controls the polar chart variant: Polar (0) -- standard polar chart (default) Smith (1) -- Smith chart (RF engineering) Rose (2) -- rose/wind rose chart Admittance (3) -- admittance Smith chart DATA MODEL: PeData.X[s,p] = angle in degrees (0--360 for polar) PeData.Y[s,p] = radius/magnitude value PeData.Subsets = number of data series PeData.Points = number of data points per series ROSE CHART SPECIFICS (Example 204): Rose charts are polar histograms/frequency distributions (e.g., wind roses). DATA ANGLE MAPPING: Default 0 deg is at 3 o'clock (East). Do NOT use ZeroDegreeOffset. Convention: X data starts at 90 deg (East) and decrements counterclockwise: DataX = {90, 67.5, 45, 22.5, 0, 337.5, 315, 292.5, 270, 247.5, 225, 202.5, 180, 157.5, 135, 112.5} PointLabels map by index: [0]="E", [1]="ENE", [2]="NE", [3]="NNE", [4]="N", [5]="NNW", [6]="NW", [7]="WNW", [8]="W", [9]="WSW", [10]="SW", [11]="SSW", [12]="S", [13]="SSE", [14]="SE", [15]="ESE" DEGREE LINE CONTROL (for 16 compass directions): PeGrid.Configure.ManualXAxisTicknLine = true; PeGrid.Configure.ManualXAxisLine = 22.5; PeGrid.Configure.ManualXAxisTick = 22.5; SPECIAL ROSE LEGEND: Rose charts have a built-in special legend. Suppress normal legend: PeLegend.SubsetsToLegend[0] = -1; Setting -1 as first element disables the standard subset legend. CENTER LABEL: PeString.RoseCenterLabel = "1.25|1.1%"; Uses PIPE delimiter | for multi-line (standard PE delimiter pattern). NOT \n. Pipe delimiter also used in MainTitle for left|center|right. RADIUS LABELS: PeGrid.RadiusLabels = false; // hide radius line labels TYPICAL SETUP: 13 subsets (speed bins) x 16 points (compass directions). SubsetLabels = speed bin values, PointLabels = compass directions. MONOCHROME SUPPORT: PeColor.SubsetShades[0] = Color.Black; PeColor.SubsetShades[1] = Color.White; SubsetShades controls monochrome image colors (separate from SubsetColors). LEGEND STYLE NOTE: SimpleLegendStyle enum (TwoLine=0, OneLine=1) is distinct from LegendStyle enum (TwoLine=0, OneLine=1, plus 4 more values). Rose charts typically use: PeLegend.SimplePoint = true; PeLegend.SimpleLine = true; PeLegend.Style = SimpleLegendStyle.OneLine; SUBSET VISIBILITY AND DRAW ORDER: PeData.SubsetsToShow[subsetIndex] = priority (0--9): 0 = hidden, 1--9 = visible, higher values drawn first (behind). Simpler than RandomSubsetsToGraph for basic show/hide. PeData.RandomSubsetsToGraph -- lists explicit subset indices to include. Order of indices controls draw order. PeLegend.SubsetsToLegend -- independently controls legend order/visibility. See pe-legends knowledge file for legend ordering details. PEPSO BASE (Example 200) PROVIDES: 2 subsets x 360 points, PointsPlusLine method, sine wave data, DarkNoBorder QuickStyle, BitmapGradientMode, Large fonts, bold text, point gradient style, line shadows, HorzAndVert zoom, Direct2D render, PrepareImages, CacheBmp. KEY EXAMPLES: 200 -- Simple Polar Chart (base) 201 -- Polar Chart with legend / custom polar grid 202 -- Bi-polar grid 203 -- Smith Chart 204 -- Rose Chart (wind rose, compass labels, special legend) KEY: Always query exact paths: pe_query.py enum "PSGraphPlottingMethod" pe_query.py enum "SmithChart" pe_query.py props "SmithChart" pe_query.py props "RoseCenterLabel" pe_query.py props "RadiusLabels" pe_query.py props "SubsetsToLegend"