plottools
scale
scale PLOT and PLOT3D data structures
Calling Sequence
Parameters
Description
Examples
scale(p, a, b, pt_2d)
scale(q, a, b, c, pt_3d)
p
-
PLOT data structure
q
PLOT3D data structure
a, b, c
real numbers; scale factors in the x, y and z directions
pt_2d
(optional) list of two real numbers specifying the center of the scale (for the 2-D case)
pt_3d
(optional) list of three real numbers specifying the center of the scale (for the 3-D case)
The scale command takes a plot structure and produces a new plot structure scaled by the specified values with respect to the center (pt_2d for the 2-D case or pt_3d for the 3-D case). If pt_2d or pt_3d is not specified, the default center is at the origin.
The inputs p or q must be two- or three-dimensional plot data structures or objects, while a, b, and c are real numbers representing the scale factors in the x, y and z directions.
The result of a call to scale is a PLOT or PLOT3D data structure or object containing information to render the plot. You can assign the data structure to a variable, save it in a file, then read it back in for redisplay. For more information about plot data structures, see plot/structure.
Several commands in the plottools package can transform plots. For a list, see the plottools help page. The plots:-changecoords and plots:-display commands can also be used to transform plots.
with⁡plottools:
with⁡plots:
p≔plot⁡sin⁡x,x,x=0..2⁢π:
s≔scale⁡p,2,3:
display⁡p,s
q≔plot3d⁡sin⁡x+y,x=−1..2⁢π,y=0..π:
s≔scale⁡q,3,1,12:
display⁡q,s,axes=frame,lightmodel=light2,orientation=−100,65,shading=zgrayscale,style=patchnogrid
c≔circle⁡0,0,2:
display⁡c,scale⁡c,13,13,color=blue,scaling=constrained
See Also
plot
plot/structure
plot3d
plots:-changecoords
plots:-display
plottools:-circle
Download Help Document