▼V Reference
52 Find a task or a name
53 Modules to require
54 Scenes and sampling
55 Scene states
56 Animation requests
57 Native model details
58 Visuals
59 Geometry
60 Number Lines and Coordinate Decorations
61 Point Markers, Scatter Plots, and Filled Areas
62 Probability and Statistical Diagrams
63 Calculus lessons
64 Colors
65 Slides
66 Slide command-line tools
67 Source Programs and Authored Timelines
68 Interactive Preview and Inspection
69 Preview controls and diagnostics
70 Projects and Final Rendering
71 Project execution and cache details
72 Pict Renderer Protocol
73 3D reference map
74 3D:   Objects, groups, and paths
75 3D:   Cameras and projection
76 3D:   Views inside a Scene
77 3D:   Animating 3D objects
78 3D:   Animating the 3D camera
79 3D:   Cuts, caps, and section measurements
80 3D:   Supplementary surface, section, and annotation bindings
81 3D:   Cuts, sections, and numerical volume
82 3D:   Vectors
83 3D:   Linear maps and rotations
84 3D:   Affine transforms
85 3D:   Bounds, rays, and planes
86 3D:   Spatial maps and homotopies
87 3D:   Materials and lights
88 3D:   Lighting inspection
89 3D:   Shadow descriptors and stable bounds
90 3D:   Finite-light animation
91 3D:   Software finite-light evaluation
92 3D:   Colour space and final output
93 3D:   Relations and geometric annotations
94 3D:   Projected labels
95 3D:   Textured billboards
96 3D:   Spatial curves and vector diagrams
97 3D:   Spatial anchors and label layout
98 3D:   Anchors and projected labels
99 3D:   Parametric surfaces and calculus
100 3D:   Adaptive, trimmed, and implicit surfaces
101 3D:   Constructive solids
102 3D:   Surface constructors and queries
103 3D:   Meshes
104 3D:   Triangle topology
105 3D:   Polygonal faces
106 3D:   Deterministic convex hulls
107 3D:   Polyhedral duals
108 3D:   Schlegel diagrams and polyhedral nets
109 3D:   Conservative mesh correspondence
110 3D:   Topology-safe mesh matching
111 3D:   Checking and repairing mesh orientation
112 3D:   Clipping, sections, and transparency
113 3D:   Prepared spatial ODE trajectories and vector fields
114 3D:   Seeds and streamline sets
115 3D:   Poincare sections and return maps
116 3D:   Equilibria and local linearization
117 3D:   Flow maps and volume change
118 3D:   Drawing and inspecting trajectories
119 3D:   Reading prepared trajectories
120 3D:   Drawing vector fields and particles
121 3D:   Trajectory display
122 3D:   Spatial inspection and exact picking
123 3D:   Retained renderer backends
124 3D:   Compiled geometry and instances
125 3D:   Frame requests and results
126 3D:   Software rendering and statistics
127 3D:   Optional Racket/  Open  GL backend
128 Experimental Derived Visuals
129 Source Package Hygiene
On this page:
point-marker-shape?
point-marker
point-marker-visual?
point-marker-visual-shape
point-marker-visual-size
point-marker-visual-fill
point-marker-visual-stroke
point-marker-visual-stroke-width
scatter-plot
sample-function-area-path
function-area
data-series-area-path
data-area
9.3

61 Point Markers, Scatter Plots, and Filled Areas🔗ℹ

Point markers, ordered scatter-plot groups, and closed areas represent data and regions derived from sampled function graphs or ordered data series. These values remain ordinary immutable Visuals. They use the existing affine, opacity, group, path, timeline, camera, and renderer protocols.

procedure

(point-marker-shape? value) → boolean?

  value : any/c
Returns #t when value is one of:

'circle
'square
'diamond
'triangle-up
'triangle-down

The set is explicit. Other symbols are rejected.

procedure

(point-marker #:id identifier 
  [#:center center 
  #:rotation rotation 
  #:scale scale 
  #:opacity opacity 
  #:shape shape 
  #:size size 
  #:fill fill 
  #:stroke stroke 
  #:stroke-width stroke-width]) 
 → point-marker-visual?
  identifier : symbol?
  center : vec2? = origin
  rotation : finite-real? = 0
  scale : any/c = 1
  opacity : opacity? = 1
  shape : point-marker-shape? = 'circle
  size : positive-real? = 1/5
  fill : any/c = "royalblue"
  stroke : any/c = "black"
  stroke-width : nonnegative-real? = 1
Constructs one semantic point marker. size is a local world-unit extent before affine scale. It is the circle diameter, square side, diamond width and height, or triangle width and height. Stroke width is cosmetic and is not multiplied by semantic scale.

The marker implements the basic Visual, affine-Visual, and opacity-Visual protocols. It can therefore be moved, rotated, scaled, faded, grouped, and used with renderer-aware layout.

The constructor rejects a non-symbol identity, non-finite position or rotation, nonpositive scale or size, opacity outside the closed unit interval, an unknown shape, and a negative or non-finite stroke width. Fill and stroke values are passed to the selected rendering backend in the same way as for the existing circle, rectangle, and path Visuals.

procedure

(point-marker-visual? value) → boolean?

  value : any/c
Returns #t when value is a point-marker Visual.

Returns the marker shape.

procedure

(point-marker-visual-size visual) → positive-real?

  visual : point-marker-visual?
Returns the full local marker extent before affine scale.

procedure

(point-marker-visual-fill visual) → any/c

  visual : point-marker-visual?
Returns the adapter-specific fill style.

procedure

(point-marker-visual-stroke visual) → any/c

  visual : point-marker-visual?
Returns the adapter-specific stroke style.

procedure

(point-marker-visual-stroke-width visual) → nonnegative-real?

  visual : point-marker-visual?
Returns the cosmetic stroke width.

The default Pict adapter converts marker shapes to existing semantic circle, rectangle, or path primitives after explicit renderer selection. A custom renderer placed before the defaults can override the complete marker. Semantic opacity is applied once after either custom rendering or fallback conversion.

procedure

(scatter-plot axes    
  points    
  #:id identifier    
  [#:clip? clip?    
  #:shape shape    
  #:size size    
  #:opacity opacity    
  #:fill fill    
  #:stroke stroke    
  #:stroke-width stroke-width]) → group-visual?
  axes : axes-visual?
  points : (listof (or/c vec2? false/c))
  identifier : symbol?
  clip? : boolean? = #t
  shape : point-marker-shape? = 'circle
  size : positive-real? = 1/5
  opacity : opacity? = 1
  fill : any/c = "royalblue"
  stroke : any/c = "black"
  stroke-width : nonnegative-real? = 1
Constructs an ordered group of point markers from numeric coordinates. #f entries are omitted. When clip? is true, points whose centers lie outside either closed axes range are also omitted. Marker geometry is not clipped at an axes boundary.

Visible markers preserve input order. Their identities are derived from the plot identity and original zero-based list index:

plot-id-marker-index

Indexes are not renumbered when a #f value or clipped point is omitted. The returned group copies the current axes center and rotation. Numeric marker positions include the current x and y axes scale, while the markers themselves start upright and keep the requested world-unit size. This is a construction-time snapshot. Later changes to the axes do not update the scatter plot.

The opacity argument belongs to the complete returned group. Individual marker children start with opacity one. The returned group can be transformed or faded through the ordinary timeline requests.

The constructor rejects anything other than a proper list of vec2 values and #f gaps. It also validates the identity, clipping flag, shape, positive finite size, opacity, and nonnegative finite stroke width before creating any marker child.

procedure

(sample-function-area-path axes 
  function 
  [#:baseline baseline 
  #:x-min x-min 
  #:x-max x-max 
  #:sample-count sample-count 
  #:clip? clip? 
  #:max-jump max-jump 
  #:interpolation interpolation]) 
 → path-geometry?
  axes : axes-visual?
  function : (procedure-arity-includes/c 1)
  baseline : finite-real? = 0
  x-min : (or/c finite-real? false/c) = #f
  x-max : (or/c finite-real? false/c) = #f
  sample-count : exact-integer? = 201
  clip? : boolean? = #t
  max-jump : (or/c nonnegative-real? false/c) = #f
  interpolation : curve-interpolation? = 'smooth
Samples function with the same endpoint, gap, jump, clipping, and interpolation rules as sample-function-path. Every accepted open graph run becomes one closed subpath. A straight edge is added from the horizontal baseline to the first graph point, and another from the last graph point back to the baseline. The implicit closing edge joins the two baseline points.

When clipping is enabled, baseline is clamped to the displayed y range. The graph segments are clipped first, and only the visible accepted runs are closed. Therefore this operation fills beneath the visible sampled graph path; it does not reconstruct a region whose complete graph lies outside the display. Each discontinuous run becomes a separate closed region. Smooth cubic graph segments remain cubic inside the area.

The baseline must be finite. All other domain, sample-count, callback-result, exception, clipping, jump, and interpolation errors are the same as for sample-function-path. Sampling stops at the first reported error.

procedure

(function-area axes    
  function    
  #:id identifier    
  [#:baseline baseline    
  #:x-min x-min    
  #:x-max x-max    
  #:sample-count sample-count    
  #:clip? clip?    
  #:max-jump max-jump    
  #:interpolation interpolation    
  #:opacity opacity    
  #:fill fill    
  #:stroke stroke    
  #:stroke-width stroke-width]) → path-visual?
  axes : axes-visual?
  function : (procedure-arity-includes/c 1)
  identifier : symbol?
  baseline : finite-real? = 0
  x-min : (or/c finite-real? false/c) = #f
  x-max : (or/c finite-real? false/c) = #f
  sample-count : exact-integer? = 201
  clip? : boolean? = #t
  max-jump : (or/c nonnegative-real? false/c) = #f
  interpolation : curve-interpolation? = 'smooth
  opacity : opacity? = 1/2
  fill : any/c = "cornflowerblue"
  stroke : any/c = #f
  stroke-width : nonnegative-real? = 0
Creates a styled path Visual from sample-function-area-path. The returned Visual copies the current axes translation, rotation, and scale. The procedure is used only during construction and is not retained. The default style is a half-opacity fill with no visible outline.

The identity must be a symbol, opacity must be in the closed unit interval, and stroke width must be a nonnegative finite real. Sampling and baseline errors are reported by sample-function-area-path.

procedure

(data-series-area-path axes 
  points 
  [#:baseline baseline 
  #:clip? clip? 
  #:max-distance max-distance 
  #:interpolation interpolation]) 
 → path-geometry?
  axes : axes-visual?
  points : (listof (or/c vec2? false/c))
  baseline : finite-real? = 0
  clip? : boolean? = #t
  max-distance : (or/c nonnegative-real? false/c) = #f
  interpolation : curve-interpolation? = 'linear
Converts an ordered data series to closed area subpaths. Data order, explicit #f gaps, clipping, maximum-distance breaks, and interpolation follow data-series-path. Each accepted run is closed to the horizontal baseline using the same rules as a function area.

The baseline must be finite. Point-list, clipping, distance, and interpolation errors are the same as for data-series-path.

procedure

(data-area axes    
  points    
  #:id identifier    
  [#:baseline baseline    
  #:clip? clip?    
  #:max-distance max-distance    
  #:interpolation interpolation    
  #:opacity opacity    
  #:fill fill    
  #:stroke stroke    
  #:stroke-width stroke-width]) → path-visual?
  axes : axes-visual?
  points : (listof (or/c vec2? false/c))
  identifier : symbol?
  baseline : finite-real? = 0
  clip? : boolean? = #t
  max-distance : (or/c nonnegative-real? false/c) = #f
  interpolation : curve-interpolation? = 'linear
  opacity : opacity? = 1/2
  fill : any/c = "lightgreen"
  stroke : any/c = #f
  stroke-width : nonnegative-real? = 0
Creates a styled path Visual from data-series-area-path. The returned Visual copies the current axes transform and stores no reference to the input list. It uses the ordinary path renderer and therefore supports opacity, groups, create, uncreate, path morphing, affine animation, and animated cameras.

The identity, opacity, and stroke width are validated before the path Visual is created. Geometry-construction errors are reported by data-series-area-path.

For a worked composition, see Combining Plot Areas and Observations.

Reference · Visuals