WolframLang: Extract Graphics from Builtin Plot Functions
Extract Graphics from Builtin Plot Functions
all builtin functions that display graphics return
either a
Graphics
or
Graphics3D
expression.
the first element of it is a list of Graphics Primitives (and directives). (or, a GraphicsComplex that represent list of graphics primitives. )
so, to exctract graphics primitives, just get the first element of the result.
Example: 2D Graphics
(* extract the graphic primitives from a builtin visualization function *) gr = Plot[ Sin[x], {x,0,5} ]; Length[gr] === 2 Head[gr] === Graphics (* list of graphics primitives and directives. *) gp = First[gr]
Example: 3D Graphics
gr = Plot3D[ Sin[x] Cos[y], {x,0,5}, {y,0,5} ]; Length[gr] === 2 Head[gr] === Graphics3D (* list of graphics primitives and directives. *) gp = First[gr]
WolframLang, Graphics Programing
- WolframLang: Plot and Visualization
- WolframLang: Graphics Primitives
- WolframLang: Graphics Directives
- WolframLang: Extract Graphics from Plot
- WolframLang: Geometric Transformation Functions
- WolframLang: Compose Transformations
- WolframLang: Apply Transform to Graphics
- WolframLang: Translate Copy Graphics
- WolframLang: Transformation Matrix
- WolframLang: GraphicsComplex
- WolframLang: Mesh Region
- WolframLang: Graphics Misc
- WolframLang: Animation