On this page:
plot3d
plot3d-file
plot3d-pict
plot3d-bitmap
plot3d-snip
plot3d-frame
plot3d/ dc
Version: 5.2

4 3D Plot Procedures

Each 3D plot procedure corresponds with a 2D Plot Procedures procedure. Each behaves the same way as its corresponding 2D procedure, but takes the additional keyword arguments #:z-min, #:z-max, #:angle, #:altitude and #:z-label.

(plot3d renderer-tree 
  [#:x-min x-min 
  #:x-max x-max 
  #:y-min y-min 
  #:y-max y-max 
  #:z-min z-min 
  #:z-max z-max 
  #:width width 
  #:height height 
  #:angle angle 
  #:altitude altitude 
  #:title title 
  #:x-label x-label 
  #:y-label y-label 
  #:z-label z-label 
  #:legend-anchor legend-anchor 
  #:out-file out-file 
  #:out-kind out-kind]) 
  (or/c (is-a?/c image-snip%) void?)
  renderer-tree : (treeof renderer3d?)
  x-min : (or/c real? #f) = #f
  x-max : (or/c real? #f) = #f
  y-min : (or/c real? #f) = #f
  y-max : (or/c real? #f) = #f
  z-min : (or/c real? #f) = #f
  z-max : (or/c real? #f) = #f
  width : exact-positive-integer? = (plot-width)
  height : exact-positive-integer? = (plot-height)
  angle : real? = (plot3d-angle)
  altitude : real? = (plot3d-altitude)
  title : (or/c string? #f) = (plot-title)
  x-label : (or/c string? #f) = (plot-x-label)
  y-label : (or/c string? #f) = (plot-y-label)
  z-label : (or/c string? #f) = (plot-z-label)
  legend-anchor : anchor/c = (plot-legend-anchor)
  out-file : (or/c path-string? output-port? #f) = #f
  out-kind : (one-of/c 'auto 'png 'jpeg 'xmb 'xpm 'bmp 'ps 'pdf 'svg)
   = 'auto
This procedure corresponds with plot. It plots a 3D renderer or list of renderers (or more generally, a tree of renderers), as returned by points3d, parametric3d, surface3d, isosurface3d, and others.

When the parameter plot-new-window? is #t, plot3d opens a new window to display the plot and returns (void).

When #:out-file is given, plot3d writes the plot to a file using plot3d-file as well as returning a image-snip% or opening a new window.

When given, the x-min, x-max, y-min, y-max, z-min and z-max arguments determine the bounds of the plot, but not the bounds of the renderers.

Deprecated keywords. The #:fgcolor and #:bgcolor keyword arguments are currently supported for backward compatibility, but may not be in the future. Please set the plot-foreground and plot-background parameters instead of using these keyword arguments. The #:lncolor keyword argument is also accepted for backward compatibility but deprecated. It does nothing.

The #:az and #:alt keyword arguments are backward-compatible, deprecated aliases for #:angle and #:altitude, respectively.

(plot3d-file renderer-tree    
  output    
  [kind]    
  #:<plot-keyword> <plot-keyword> ...)  void?
  renderer-tree : (treeof renderer3d?)
  output : (or/c path-string? output-port?)
  kind : (one-of/c 'auto 'png 'jpeg 'xmb 'xpm 'bmp 'ps 'pdf 'svg)
   = 'auto
  <plot-keyword> : <plot-keyword-contract>
(plot3d-pict renderer-tree ...)  pict?
  renderer-tree : (treeof renderer3d?)
(plot3d-bitmap renderer-tree ...)  (is-a?/c bitmap%)
  renderer-tree : (treeof renderer3d?)
(plot3d-snip renderer-tree ...)  (is-a?/c image-snip%)
  renderer-tree : (treeof renderer3d?)
(plot3d-frame renderer-tree ...)  (is-a?/c frame%)
  renderer-tree : (treeof renderer3d?)
Plot to different backends. Each of these procedures has the same keyword arguments as plot3d, except for deprecated keywords.

These procedures correspond with plot-file, plot-pict, plot-bitmap, plot-snip and plot-frame.

(plot3d/dc renderer-tree    
  dc    
  x    
  y    
  width    
  height    
  [#:x-min x-min    
  #:x-max x-max    
  #:y-min y-min    
  #:y-max y-max    
  #:z-min z-min    
  #:z-max z-max    
  #:angle angle    
  #:altitude altitude    
  #:title title    
  #:x-label x-label    
  #:y-label y-label    
  #:z-label z-label    
  #:legend-anchor legend-anchor])  void?
  renderer-tree : (treeof renderer3d?)
  dc : (is-a?/c dc<%>)
  x : real?
  y : real?
  width : (>=/c 0)
  height : (>=/c 0)
  x-min : (or/c real? #f) = #f
  x-max : (or/c real? #f) = #f
  y-min : (or/c real? #f) = #f
  y-max : (or/c real? #f) = #f
  z-min : (or/c real? #f) = #f
  z-max : (or/c real? #f) = #f
  angle : real? = (plot3d-angle)
  altitude : real? = (plot3d-altitude)
  title : (or/c string? #f) = (plot-title)
  x-label : (or/c string? #f) = (plot-x-label)
  y-label : (or/c string? #f) = (plot-y-label)
  z-label : (or/c string? #f) = (plot-z-label)
  legend-anchor : anchor/c = (plot-legend-anchor)
Plots to an arbitrary device context, in the rectangle with width width, height height, and upper-left corner x,y.

Every 3D Plot Procedures procedure is defined in terms of plot3d/dc.

Use this if you need to continually update a plot on a canvas%, or to create other plot3d-like functions with different backends.

This procedure corresponds with plot/dc.