1.12. Examples of 2D and 3D graphics

g1 = Plot[Sin[x],    {x, -2 π, 2 π}]

[Graphics:../HTMLFiles/index_45.gif]

-Graphics -

g2 = Plot[Tan[x],    {x, -2 π, 2 π}, PlotStyle -> Hue[.6] ]

[Graphics:../HTMLFiles/index_48.gif]

-Graphics -

Show[g1, g2]    (* simultaneous vizualization of the two graphical objects g1, g2 *)

[Graphics:../HTMLFiles/index_51.gif]

-Graphics -

g3 = Plot[{Sin[x], Cos[2 x]}, {x, -3, 3}, PlotStyle -> {Hue[0.1], Hue[0.8]}]

[Graphics:../HTMLFiles/index_54.gif]

-Graphics -

g4 = Plot[{Sin[x], Cos[2 x]}, {x, -3, 3}, PlotRange -> {0, 1.2}, PlotStyle -> {Hue[0.1], ... Hue[0.8]}] (*    The Option PlotRange gives desired interval for the function values *)

[Graphics:../HTMLFiles/index_57.gif]

-Graphics -

tt = {{0, 3}, {0.5, 4}, {1.1, 2.2}, {1.3, 4}, {1.5, 4}, {2, 3}} ListPlot[tt, PlotRange -> {0, 5} ]

{{0, 3}, {0.5`, 4}, {1.1`, 2.2`}, {1.3`, 4}, {1.5`, 4}, {2, 3}}

[Graphics:../HTMLFiles/index_61.gif]

-Graphics -

ListPlot[tt, PlotRange -> {0, 5}, PlotStyle -> PointSize[0.02]]

[Graphics:../HTMLFiles/index_64.gif]

-Graphics -

ListPlot[tt, PlotRange -> {0, 5}, PlotJoined -> True]

[Graphics:../HTMLFiles/index_67.gif]

-Graphics -

Plot3D[ ( Cos[x - y])/Log[x + y]   , {x, 1, 5 }, {y, 1, 10   }]

[Graphics:../HTMLFiles/index_70.gif]

-SurfaceGraphics -

Plot3D[ Cos[x - y]/Log[x + y]   , {x, 1, 5 }, {y, 1, 10   }, ColorFunction -> Hue, ViewPoint -> {0, - 3, 5}]

[Graphics:../HTMLFiles/index_73.gif]

-SurfaceGraphics -

(* ellipse *)  ParametricPlot[ {3 Cos[φ], 7 Sin[φ]}, {φ , 0, 2 π}]            

[Graphics:../HTMLFiles/index_76.gif]

 (* elliptic cylinder *)  ParametricPlot3D[{3 Cos[φ], 7 Sin[φ], u}, {φ, 0, 2 π}, {u, 0, 3}]    

[Graphics:../HTMLFiles/index_78.gif]

(*   Archimedes ' s spiral    *)  a = 3 ;  ParametricPlot [{a * fi * Cos[fi], a * fi * Sin[fi]}, {fi, 0, 5 π} ]      Null

[Graphics:../HTMLFiles/index_80.gif]

 (* 3 D Archimedes ' s   spiral *)  a = 0.25 ;  ParametricPlot3D [{a * fi * Cos[fi], a * fi * Sin[fi], u}, {fi, 0, 5 Pi}, {u, 0, 3} ]

[Graphics:../HTMLFiles/index_82.gif]

(* colored serviette *)  ParametricPlot3D [ {t, u, Sin[t * u]}, {t, -3, 3}, {u, -3, 3} ]

[Graphics:../HTMLFiles/index_84.gif]

(* pipe *)  ParametricPlot3D [ {Cos[t/2] * (3 + Cos[u]), Sin[t] * (3 + Cos[u]), 1.5 Sin[u] }, {t, 0, 2 π}, {u, 0, 2 π} ]    

[Graphics:../HTMLFiles/index_86.gif]

(* sphere *)  ParametricPlot3D[{ Cos[t] Cos[u], Sin[t] Cos[u], Sin[u]}, {t, 0, 2 Pi} , {u, -Pi/2, Pi/2}]   

[Graphics:../HTMLFiles/index_88.gif]

(* Loads the standard add - on package Graphics`Graphics` *)  << Graphics`Graphics`

(*   snowflake *)  PolarPlot[Sin[t * 10] * t , {t, -40, 20}]    

[Graphics:../HTMLFiles/index_91.gif]