Exit[]

Visualization

Data vs. Functions vs Graphics
-ListPlot, ListPlot3D, GraphPlot, TreePlot
-Plot, Plot3D, ParametricPlot, ParametricPlot3D, ContourPlot, ContourPlot3D
-Graphics, Graphics3D

l[α_]:=Table[{Sin[x],Cos[α x]},{x,0,2Pi,Pi/60}]

ListPlot[l[1]]

Options[ListPlot]

ListPlot[{l[1],l[2],l[3]},
AspectRatio->Automatic,
Joined->{False,False,True},
Filling->Axis
]

m=Graphics3D[Sphere[{0,0,0}],Boxed->False]

l1=ListPlot[l[1],Joined->False,Filling->Axis];
l2=ListPlot[l[2],Joined->True];
l3=ListPlot[l[3],Joined->True,Filling->Axis,PlotMarkers->{m,.05}];

Show[
{l2,l3},
AspectRatio->Automatic,
Axes->Automatic
]

Manipulate[ListPlot[l[k],AspectRatio->Automatic],{k,1,6,1}]

Manipulate[ListPlot[l[k],AspectRatio->Automatic],{k,1,6}]

l[α_,n_:60]:=Table[{Sin[x],Cos[α x]},{x,0,2Pi,Pi/n}]

Manipulate[ListPlot[l[k,n],AspectRatio->Automatic],{k,1,6},{n,100}]

ListPlot3D[RandomInteger[5,{5,5}],Mesh->All]

f[x_]:=Sin[x]+Sin[2x]+Sin[4x+Pi]

Plot[f[x],{x,0,2Pi}]

sols=NSolve[f'[x]==0,x]

?Point

sols

Graphics[Point[{x,f[x]}]/.sols]

pts=Graphics[{Red,PointSize[.02],Point[{x,f[x]}]}/.sols]

Show[{
Plot[f[x],{x,-2Pi,2Pi}],
pts}
]

Reduce[f'[x]==0&&0≤x≤2 Pi,x,Reals]

ToRules[Reduce[f'[x]==0&&0≤x≤2 Pi,x,Reals]]

Plot[
f[x],{x,0,2Pi},
Epilog->
Map[
Point[{#,f[#]}]&,
x/.{ToRules[Reduce[f'[x]==0&&0≤x≤2 Pi,x,Reals]]}
]
]

Plot[f[x],{x,0,2Pi},
Epilog->
(
{Red,Point[{y,f[y]}]}/.
{ToRules[Reduce[f'[y]==0&&0≤y≤2 Pi,y,Reals]]}
)
]

tan[f_,x0_,h_]:=
With[{
y0=f[x0],
m=f'[x0]},

Line[{{x0-h,y0-m h},{x0+h,y0+m h}}]
]

Plot[f[x],{x,0,2Pi},
Epilog->tan[f,2.75,.25],
PlotStyle->{Thickness[.005]}]

?Text

Manipulate[
Plot[f[x],{x,0,2Pi},
Epilog->{
{Thickness[.007],tan[f,p,l]},
{Text[f'[p]//N,{1,-2}]}
}
],
{p,0,2Pi},
{l,.01,.5}
]

Clear[m]

d2[{x0_,y0_},{x1_,y1_}]:=(x1-x0)^2+(y1-y0)^2

d2[{x0-k,y0-m k},{x0+k,y0+m k}]

Solve[d2[{x0-k,y0-m k},{x0+k,y0+m k}]==h^2,k]

tan2[f_,x0_,h_]:=
Block[{
y0=f[x0],
m=f'[x0],
k=h/Sqrt[4+4m^2]
},
Line[{{x0-k,y0-m k},{x0+k,y0+m k}}]
]

Manipulate[
Plot[f[x],{x,0,2Pi},
Epilog->{
{Thickness[.007],tan2[f,p,l]},
{Text[f'[p]//N,{1,-2}]}
}
],
{p,0,2Pi},
{l,.1,1}
]

ball[f_,x0_,h_]:=Disk[{x0,f[x0]+h},h]

Plot[f[x],{x,0,2Pi},
Epilog->{
tan2[f,2.75,.6],
Blue,ball[f,3,.05]
}
]

f[x_,a_,b_,c_]:=Sin[a x]+Sin[b x + Pi/4]+Sin[c x^2+Pi]

Manipulate[
Plot[f[x,a,b,c],{x,0,2Pi}],
{a,0,Pi},{b,0,1},{c,0,1}
]

Manipulate[
Plot[f[x,a,b,c],{x,0,2Pi},
PlotRange->{-3,3},
Epilog->
{Blue,ball[f[#,a,b,c]&,p,.05]}
],
{p,0,2Pi},
{a,0,Pi},{b,0,1},{c,0,2}
]

Options[Plot]

g[x_]:=Sin[.5 x^2]

pl=Plot[g[x],{x,0,2 Pi},PlotRange->{-1,1},PlotStyle->Yellow,Background->Brown]

ListPlot[Map[{#,g[#]}&,Range[0,2Pi,.1]]]

lp=ListPlot[Map[{#,g[#]}&,Range[0,2Pi,.1]],Joined->True,PlotStyle->Red]

Show[{pl,lp},Background->RGBColor[.2,.3,.4]]

evals={};

gaux[x_]:=(evals=Join[evals,{x}];g[x])

pl=Plot[gaux[x],{x,0,2 Pi},PlotRange->{-1,1},PlotStyle->Yellow,Background->Brown]

evals//Short

pts=Graphics[
Map[{AbsolutePointSize[1],Blue,Point[{#,g[#]}]}&,evals]
]

Show[{pl,pts}]

g3D[x_,y_]:=Sin[x^2+y^2]

g3Daux[x_,y_]:=(evals3D=Join[evals3D,{{x,y}}];g3D[x,y])

evals3D={};
Plot3D[g3Daux[x,y],{x,0,3/2Pi},{y,0,Pi},BoxRatios->Automatic,PlotPoints->30]

{Length[evals3D],30^2}

pt3d=Graphics3D[
Map[{AbsolutePointSize[1.2],White,Point[Join[#,{g3D@@#}]]}&,evals3D],Background->Gray
]

pl3d=Plot3D[g3D[x,y],{x,0,3Pi/2},{y,0,Pi},BoxRatios->Automatic,Mesh->False,Lighting->{{"Ambient",Black}}];

Show[{pl3d,pt3d}]

t=2;Plot3D[Sin[x^2+y^2+t],{x,-Pi,Pi},{y,0,Pi}]

t=2;Plot3D[Sin[x^2+y^2+t],{x,-Pi,Pi},{y,0,Pi},PlotPoints->100]

Animate[
Plot3D[Sin[x^2+y^2+t],{x,-Pi,Pi},{y,0,Pi},
PlotPoints->40,PlotLabel->"t:"<>ToString[N@t],Mesh->True],
{t,0,2Pi,Pi/5}]

Table[
Plot3D[Sin[x^2+y^2+t],{x,-Pi,Pi},{y,0,Pi},
PlotPoints->40,PlotLabel->"t:"<>ToString[N@t],Mesh->True],
{t,0,2Pi,Pi/2}]//ColumnForm

Animate[
DensityPlot[Sin[x^2+y^2+t],{x,-Pi,Pi},{y,0,Pi},
PlotPoints->20,PlotLabel->"t:"<>ToString[N@t],Mesh->True],
{t,0,2Pi,Pi/5}]

Animate[
ContourPlot[Sin[x^2+y^2+t],{x,-Pi,Pi},{y,0,Pi},
PlotPoints->20,PlotLabel->"t:"<>ToString[N@t],Mesh->True],
{t,0,2Pi,Pi/5}]

ContourPlot[x^2+y^2==1,{x,0,1},{y,0,1}]

a=ParametricPlot3D[{t,Sin[t],Cos[t]},{t,0,4Pi},{v,0,2Pi}]

ParametricPlot3D[{Sin[t/4],Sin[t],Cos[t]},{t,0,8Pi}]

ParametricPlot3D[{Sin[t] ,Sin[t]Sin[v],Cos[t]Sin[v]},{t,0,4Pi},{v,0,2Pi}]

a=Plot[Sin[x],{x,0,Pi}];
b=Plot3D[Sin[x y],{x,0,Pi},{y,0,Pi}];

Show[{a,b}]