Example#1 · Example#11: SampleAxis SampleAxis 1.0 3.7 6.3 9.0 1.0 2.6 4.2 5.8 7.4 9.0 y=x Source:...
Transcript of Example#1 · Example#11: SampleAxis SampleAxis 1.0 3.7 6.3 9.0 1.0 2.6 4.2 5.8 7.4 9.0 y=x Source:...
Example #1:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\begin{plot}{}
\function{x}{}
\end{plot}
1
Example #2:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\begin{plot}{width=3in,height=2.5in}
\function{x}{}
\end{plot}
2
Example #3:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\begin{plot}{width=3in,height=2.5in}
\function{x | x in [2,8]}{}
\end{plot}
3
Example #4:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\begin{plot}{width=3in,height=2.5in}
\function[linecolor=red]{x | x in [2,8]}{}
\end{plot}
4
Example #5:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\begin{plot}{width=3in,height=2.5in}
\function[linecolor=red,linewidth=2pt]{x | x in [2,8]}{}
\end{plot}
5
Example #6:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\defineline[linecolor=red,linewidth=2pt,
linestyle=dash]{MyLine1}
\begin{plot}{width=3in,height=2.5in}
\function[linetype=MyLine1]{x | x in [2,8]}{}
\end{plot}
6
Example #7:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\begin{plot}{width=3in,height=2.5in}
\function[linetype=MyLine1,numpoints=2]{x | x in [2,8]}{}
\end{plot}
7
Example #8:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Source:
\defineline[linestyle=dashdotdot,linecolor=blue,
linewidth=1pt,marksize=5pt,mark=circle]{MyLine2}
\begin{plot}{width=3in,height=2.5in}
\function[numpoints=10,linetype=MyLine2]{x | x in [2,8]}{}
\end{plot}
8
Example #9:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
y = x
Source:
\begin{plot}[legend=rt]{width=3in,height=2.5in}
\function[numpoints=10,linetype=MyLine2]{x | x in [2,8]}{$y=x$}
\end{plot}
9
Example #10:
Sample Axis
0.0
2.0
4.0
6.0
8.0
10.0
1.0 2.6 4.2 5.8 7.4 9.0
y = x
Source:
\defineaxis[minlimit=1,maxlimit=9]{Sample Axis}{MyAxis1}
\begin{plot}[legend=rt]{width=3in,height=2.5in,haxis=MyAxis1}
\function[numpoints=10,linetype=MyLine2]{x | x in [2,8]}{$y=x$}
\end{plot}
10
Example #11:
Sample Axis
Sam
ple
Axis
1.0
3.7
6.3
9.0
1.0 2.6 4.2 5.8 7.4 9.0
y = x
Source:
\defineticks[numsteps=3,outlength=4pt,inlength=0pt]{MyTicks}
\defineaxis[minlimit=1,maxlimit=9,ticks=MyTicks,linecolor=green,
linewidth=4pt,labelgap=5pt]{Sample Axis}{MyAxis2}
\begin{plot}[legend=rt]{width=3in,height=2.5in,
haxis=MyAxis1,vaxis=MyAxis2}
\function[numpoints=10,linetype=MyLine2]{x | x in [2,8]}{$y=x$}
\end{plot}
11
Example #12:
Sample Axis
Sam
ple
Axis
1.0
3.7
6.3
9.0
1.0 2.6 4.2 5.8 7.4 9.0
y = x
Source:
\begin{plot}[legend=rt]{width=3in,height=2.5in,
haxis=MyAxis1,vaxis=MyAxis2}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,8]}{$y=x$}
\end{plot}
12
Example #13:
Sample Axis
Sam
ple
Axis
1.0
3.0
5.0
9.0
1.0 3.0 5.0 9.0
y = x
Source:
\defineticks[outlength=4pt,inlength=0pt,
labels=(0)(1)(3)(5)(9)]{MyTicks}
\begin{plot}[legend=rt]{width=3in,height=2.5in,
haxis=MyAxis2,vaxis=MyAxis2,framecolor=green}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,8]}{$y=x$}
\end{plot}
13
Example #14:
1.0
3.0
5.0
9.0
1.0 3.0 5.0 9.0
y = x
Source:
\defineline[linecolor=red,linewidth=.2pt,
linestyle=dot]{GridLine}
\defineaxis[minlimit=1,maxlimit=9,grid=GridLine,
ticks=MyTicks]{}{MyAxis3}
\begin{plot}[legend=rt]{width=3in,height=2.5in,
haxis=MyAxis3,vaxis=MyAxis3,framecolor=green}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,8]}{$y=x$}
\end{plot}
14
Example #15:
1.0
3.0
5.0
9.0
1.0 3.0 5.0 9.0
y = x
Source:
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis3,vaxis=MyAxis3,framecolor=green}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,8]}{{\color{cyan}$y=x$}}
\end{plot}
15
Example #16:
1.0
3.0
5.0
9.0
1.0 3.0 5.0 9.0
y = x
Source:
\defineticks[outlength=4pt,inlength=0pt,
labels=(1)(3)(5)(9)]{MyTicksLog1}
\defineaxis[minlimit=1,maxlimit=9,grid=GridLine,log,
ticks=MyTicksLog1]{}{MyAxis4}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis3,vaxis=MyAxis4,framecolor=green}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,8]}{{\color{cyan}$y=x$}}
\end{plot}
16
Example #17:
1.0
10000.0
1.0 10000.0
y = x
Source:
\defineticks[numsteps=1]{MyTicksLog2}
\defineaxis[minlimit=1,maxlimit=10000,grid=GridLine,log,
ticks=MyTicksLog2]{}{MyAxis5}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,10000]}{{\color{cyan}$y=x$}}
\end{plot}
17
Example #18:
1.0
10.0
100.0
1000.0
10000.0
1.0 10.0 100.0 1000.0 10000.0
y = x
Source:
\defineticks[labels=(1)(10)(100)(1000)(10000)]{MyTicksLog2}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,10000]}{{\color{cyan}$y=x$}}
\end{plot}
18
Example #19:
1
10
100
103
104
1 10 100 103 104
y = x
Source:
\defineticks[labels=(1|$1$)(10|$10$)(100|$100$)(1000|$10ˆ3$)
(10000|$10ˆ4$)]{MyTicksLog2}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=10,linetype=MyLine2,
lineoff]{x | x in [2,10000]}{{\color{cyan}\strut$y=x$}}
\end{plot}
19
Example #20:
1
10
100
103
104
1 10 100 103 104
y = x
Source:
\defineline[linecolor=blue,linewidth=1pt,
dashpattern=(0.1mm)(0.5mm)(0.1mm)(0.3mm)(0.5mm)]{MyLine3}
\definefill{yellow}{MyFill1}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=2,linetype=MyLine3]
[fill=MyFill1]{x | x in [2,1000]}{{\color{cyan}\strut$y=x$}}
\end{plot}
20
Example #21:
1
10
100
103
104
1 10 100 103 104
y = x
Source:
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=2,linetype=MyLine3]
[fill=MyFill1,minlimit=10,maxlimit=100,
level=10]{x | x in [2,1000]}{{\color{cyan}\strut$y=x$}}
\end{plot}
21
Example #22:
1
10
100
103
104
1 10 100 103 104
y = x
Source:
\definehatching{MyHatch1}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=2,linetype=MyLine3]
[fill=MyFill1,hatching=MyHatch1,minlimit=10,maxlimit=100,
level=10]{x | x in [2,1000]}{{\color{cyan}\strut$y=x$}}
\end{plot}
22
Example #23:
1
10
100
103
104
1 10 100 103 104
y = x
Source:
\definehatching[angle=90,linecolor=cyan,linewidth=3pt,
interval=6pt]{MyHatch2}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=2,linetype=MyLine3]
[fill=MyFill1,hatching=MyHatch2,minlimit=10,maxlimit=100,
level=1e4]{x | x in [2,1000]}{{\color{cyan}\strut$y=x$}}
\end{plot}
23
Example #24:
1
10
100
103
104
1 10 100 103 104
y = x
Source:
\definefill[progression=linear,
target=color white]{yellow}{MyFill2}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,
haxis=MyAxis5,vaxis=MyAxis5,framecolor=green}
\function[numpoints=2,linetype=MyLine3]
[fill=MyFill2,hatching=MyHatch2,minlimit=10,maxlimit=100,
level=1e4]{x | x in [2,1000]}{{\color{cyan}\strut$y=x$}}
\end{plot}
24
Example #25:
Sample Axis
Sam
ple
Axis
-2.0
-1.2
-0.4
0.4
1.2
2.0
-2.0 -1.2 -0.4 0.4 1.2 2.0
x = sin(t)y = cos(t)
Source:
\defineaxis[minlimit=-2,maxlimit=2]{Sample Axis}{MyAxis2-2}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,vaxis=MyAxis2-2,haxis=MyAxis2-2,
framecolor=green}
\function{sin(t); cos(t) | t in [3.14, 6.28]}{%
\parbox{.7in}{$x=\sin(t)$\\$y=\cos(t)$}}
\end{plot}
25
Example #26:
Sample Axis
Sam
ple
Axis
-2
-1
0
1
2
-2 -1 0 1 2
x = sin(t)y = cos(t)
Source:
\defineticks[numsteps=4]{MyTicks2}
\defineaxis[minlimit=-2,maxlimit=2,labelformat=.0f,
ticks=MyTicks2]{Sample Axis}{MyAxis6}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt]
{width=3in,height=2.5in,vaxis=MyAxis6,haxis=MyAxis6,
framecolor=green}
\function[linecolor=red,linewidth=2pt]
[fill=MyFill2,hatching=MyHatch2]{sin(t);
cos(t) | t in [3.15, 6.28]}{%
\parbox{.7in}{$x=\sin(t)$\\$y=\cos(t)$}}
\end{plot}
26
Example #27:
Sample Axis
Sam
ple
Axis
-2
-1
0
1
2
-2 -1 0 1 2
x = sin(t)y = cos(t)
Source:
\definecolor{MyColor1}{cmyk}{0.5,0,0,0}
\definefill{MyColor1}{MyFill3}
\definecolor{MyColor2}{cmyk}{0,0.5,0,0}
\definefill{MyColor2}{MyFill4}
\begin{plot}[legend=lc,framecolor=yellow,framewidth=3pt,
fill=MyFill3]
{width=3in,height=2.5in,vaxis=MyAxis6,haxis=MyAxis6,
framecolor=green,plotfill=MyFill3,gapsfill=MyFill4}
\function[linecolor=red,linewidth=2pt]
[fill=MyFill2,hatching=MyHatch2]{sin(t);
cos(t) | t in [3.15, 6.28]}{%
\parbox{.7in}{$x=\sin(t)$\\$y=\cos(t)$}}
\end{plot}
27
Example #28:
My Favorite Parabola
0.0
2.0
4.0
6.0
8.0
10.0
0.0 0.5 1.0 1.5 2.0
Source:
\definehatching{MyHatch}
\definecolor{mygray}{gray}{0.8}
\definefill{mygray}{FillP}
\defineticks[numsteps=4]{TicksP}
\defineaxis[minlimit=0,maxlimit=2,ticks=TicksP,
labelformat=.1f]{My Favorite Parabola}{AxisP}
\begin{plot}{haxis=AxisP}
\function[][minlimit=1,maxlimit=2,level=1.0,
fill=FillP,hatching=MyHatch]{2*xˆ2}{$y=2xˆ2$}
\end{plot}
28
Example #29:
Polar Radius
Polar
Angle
0.0 1.0 2.0
0◦
90◦
180◦
270◦
(1.5, φ), φ ∈ [0, π]
Source:
\definecolor{MyColor3}{cmyk}{0,0.1,0,0}
\definefill{MyColor3}{MyFill5}
\defineticks[numsteps=4]{MyTicks3}
\defineaxis[labelformat=.0f,
ticks=MyTicks3]{Polar Angle}{MyAxis7}
\defineticks[numsteps=2]{MyTicks3p}
\defineaxis[minlimit=0,maxlimit=2,
ticks=MyTicks3p]{Polar Radius}{MyAxis7p}
\begin{plot}[legend=ct,framecolor=yellow,framewidth=3pt,
fill=MyFill5]
{polar,width=3in,height=2.5in,haxis=MyAxis7p,vaxis=MyAxis7,
framecolor=green,framewidth=1pt,gapsfill=MyFill5}
\function[linecolor=blue]{1.5 | phi in [0, 3.14]}
{$(1.5, \phi), \phi\in[0,\pi]$}
\end{plot}
29
Example #30:
Polar Radius
Polar
Angle
0.0 1.0 2.0
0◦
57◦18′114◦35′
180◦
| sin(πτ2)|, τ ∈ [0, 3]
Source:
\defineticks[labels=(0)(1rad)(2rad)(180)]{MyTicks3pa}
\defineaxis[labelformat=.2f,
ticks=MyTicks3pa]{Polar Angle}{MyAxis7pa}
\begin{plot}[legend=ct,framecolor=yellow,framewidth=3pt,
fill=MyFill5]
{polar,width=3in,height=2.5in,haxis=MyAxis7p,vaxis=MyAxis7pa,
framecolor=green,framewidth=1pt,gapsfill=MyFill5}
\function[numpoints=400,linecolor=red]
{abs(sin(Pi()*tauˆ2)) | tau in [0,3]}
{$|\sin(\pi\tauˆ2)|$, $\tau\in[0,3]$}
\end{plot}
30
Example #31:
Polar Radius
Polar
Angle
0.0 1.0 2.0
0
π6
π3
π22π
3
5π6
π
| sin(πτ2)|, τ ∈ [0, 3]
Source:
\defineticks[labels=(0|$0$)(.5rad|$\frac{\pi}{6}$)
(1rad|$\frac{\pi}{3}$)(90|$\frac{\pi}{2}$)
(2rad|$\frac{2\pi}{3}$)(2.5rad|$\frac{5\pi}{6}$)
(180|$\pi$),linecolor=green,linewidth=1.5pt,
inlength=4pt]{MyTicks3pa1}
\defineaxis[labelformat=.2f,linecolor=blue,linewidth=2pt,
ticks=MyTicks3pa1]{Polar Angle}{MyAxis7pa1}
\begin{plot}[legend=ct,framecolor=yellow,framewidth=3pt,
fill=MyFill5]
{polar,width=3in,height=2.5in,haxis=MyAxis7p,vaxis=MyAxis7pa1,
gapsfill=MyFill5}
\function[numpoints=400,linecolor=red]
{abs(sin(Pi()*tauˆ2)) | tau in [0,3]}
{$|\sin(\pi\tauˆ2)|$, $\tau\in[0,3]$}
\end{plot}
31
Example #32:
0.0
2.0
4.0
6.0
8.0
10.0
0.0 2.0 4.0 6.0 8.0 10.0
Step Function
Source:
\begin{datatable}{MyData1}
2 & 2 & 4 & 4 & 6 & 6 & 8 & 8 \\
0 & 5 & 5 & 0 & 0 & 5 & 5 & 0
\end{datatable}
\begin{plot}[legend=ct]
{width=3in,height=2.5in,framecolor=green,
framewidth=1pt,gapsfill=MyFill5}
\brokenline[linecolor=red,linewidth=3pt]
{datatable=MyData1,row=1; datatable=MyData1,row=2}
{Step Function}
\end{plot}
32
Example #33:
-1.0
0.0
1.0
0 π/2 π
y = sin(iπ/10), i = 0, ..., 10 y = cos(iπ/10), i = 0, ..., 10
Source:
\defineticks[labels=(0|0)(1.57|$\pi/2$)(3.14|$\pi$)]{MyTicks5}
\defineticks[labels=(-1)(0)(1)]{MyTicks6}
\defineaxis[minlimit=0,maxlimit=3.14,ticks=MyTicks5]{}{MyAxis9}
\defineaxis[minlimit=-1.25,maxlimit=1.25,
ticks=MyTicks6]{}{MyAxis10}
\defineline[linecolor=red,linewidth=1pt,marksize=6pt,
mark=cross]{MyLine4}
\defineline[linecolor=blue,linewidth=1pt,marksize=6pt,
mark=asterisk]{MyLine5}
\begin{plot}[legend=ct]{width=4in,height=3in,framecolor=green,
framewidth=1pt,gapsfill=MyFill5,haxis=MyAxis9,vaxis=MyAxis10,
gaps=(0pt)(5pt)(5pt)(-15pt)}
\brokenline[linetype=MyLine4]
{file=sincos.dat,column=1; file=sincos.dat,column=2}
{$y=\sin(i\pi/10)$, $i=0,...,10$}
\brokenline[linetype=MyLine5]
{file=sincos.dat,column=1; file=sincos.dat,column=3}
33
{$y=\cos(i\pi/10)$, $i=0,...,10$}
\end{plot}
Input File ”sincos.dat”:
0.00000 0.00000 1.00000
0.31416 0.30902 0.95106
0.62832 0.58779 0.80902
0.94248 0.80902 0.58779
1.25664 0.95106 0.30902
1.57080 1.00000 0.00000
1.88496 0.95106 -0.30902
2.19911 0.80902 -0.58779
2.51327 0.58779 -0.80902
2.82743 0.30902 -0.95106
3.14159 0.00000 -1.00000
34
Example #34:
Cartesian Leaf
Cartesian
Leaf
-5.0
-3.0
-1.0
1.0
3.0
5.0
-5.0 -3.0 -1.0 1.0 3.0 5.0
Source:
\defineline[linestyle=dash,linecolor=red]{MyLine}
\defineline[linestyle=dashdotdot,linecolor=ForestGreen,
linewidth=2pt,marksize=5pt,mark=circle]{MyLine2}
\defineticks[labels=(-2)(-1)(0)(1)(2)]{MyTicks}
\defineaxis[minlimit=-2,maxlimit=2,
ticks=MyTicks]{\color{black}$xˆ2+yˆ2=1$}{MyAxis}
\definefill[angle=90,path=straight,progression=square,
target=color white]{green}{MyFill2}
\definefill[angle=0,path=clockwise,progression=radial,
target=color yellow]{white}{MyFill3}
\definefill[angle=0,path=straight,progression=radial,
target=color white]{red}{MyFill4}
\definefill{yellow}{MyYell}
\defineaxis[minlimit=-5,maxlimit=5,labelformat=.1f]
{Cartesian Leaf}{CartP}
\begin{plot}{haxis=CartP,vaxis=CartP}
\function[numpoints=400,linecolor=red]
{6*t/(tˆ3+1);6*tˆ2/(tˆ3+1)| t in [1,100] }{}
\function[numpoints=400,linecolor=blue]
35
{6*t/(tˆ3+1);6*tˆ2/(tˆ3+1)| t in [-.1,1] }{}
\function[numpoints=400,linecolor=yellow]
{6*t/(tˆ3+1);6*tˆ2/(tˆ3+1)| t in [-100,-.1] }{}
\function[numpoints=3,linetype=MyLine]
{-sqrt(6)-x | x in [-50,50]}{}
\end{plot}
36
Example #35:
x2 + y2 = 1
x2+y2=
1
-2.0
-1.0
0.0
1.0
2.0
-2.0 -1.0 0.0 1.0 2.0
1 2
Source:
\begin{datatable}{MyTable}
-2 & -1 & 0 & 1 & 2 \\
0 & -1 & 0 & -1& 2
\end{datatable}
\color{yellow}\bf
\begin{plot}[legend=ct,fill=MyFill2]{haxis=MyAxis,vaxis=MyAxis,
plotfill=MyFill3,gapsfill=Baby}
\function[linetype=MyLine][minlimit=0,maxlimit=2,fill=Baby,
hatching=MyHatch]{sin(t); cos(t) | t in [0,6.4]}{1}
\brokenline[linetype=MyLine2]
{datatable=MyTable,row=1;file=try.dat,row=2}{2}
\end{plot}
37
Example #36:
y = sin(x)
0.0
0.2
0.4
0.6
0.8
1.0
0 π/4 π/2 3π/4 π
Source:
\defineticks[labels=(0|0)(0.785398|$\pi/4$)(1.570796|$\pi/2$)
(2.356194|$3\pi/4$)(3.141592|$\pi$)]{SineTicks}
\defineaxis[minlimit=0,maxlimit=3.141592,ticks=SineTicks]
{$y=\sin(x)$}{SineXAxis}
\defineaxis[minlimit=0,maxlimit=1,labelformat=.1f]{}{SineYAxis}
\begin{plot}{haxis=SineXAxis,vaxis=SineYAxis,gapsfill=Sunset2}
\function[linetype=MyLine]{sin(t)}{A trivial function}
\end{plot}
38
Example #37:
y = e−x2
10−6
10−4
10−2
1
0 1 2 3 4 5
Source:
\defineticks[labels=(0.000001|$10ˆ{-6}$)%
(0.0001|$10ˆ{-4}$)(0.01|$10ˆ{-2}$)(1|1)]{ExpTicks}
\defineaxis[log,minlimit=0.000001,maxlimit=1,
ticks=ExpTicks]{}{ExpYAxis}
\defineaxis[minlimit=0,maxlimit=5,labelformat=.0f]
{$y=eˆ{-xˆ2}$}{ExpXAxis}
\begin{plot}{haxis=ExpXAxis,vaxis=ExpYAxis,gapsfill=Sunset2}
\function[linetype=MyLine]{e()ˆ(-xˆ2) | x in [0, 5]}
{Another trivial function}
\end{plot}
39
Example #38:
0.0
1.0
2.0
3.0
4.0
5.0
-50 0 50 100
x = (50 + 0.5t) cos(t) − 25;y = 2.5 + (1 + 0.03t) sin(t) + 0.02t
1.5 + cos(y2/250)
4 sin(0.3(x−25))0.3(x−25) + 0.01|x + 50| + 0.001x
-80 -75 -75 -70 -70 -65 -604.2 4.2 3.6 3.6 3 3 4.2
Source:
\begin{datatable}{Ex3}
-80 & -75 & -75 & -70 & -70 & -65 & -60 \\
4.2 & 4.2 & 3.6 & 3.6 & 3 & 3 & 4.2 \\
\end{datatable}
\definecolor{medgray}{gray}{0.5}
\definecolor{framecolor}{rgb}{0,0.6,0.6}
\definecolor{Ex3FillC}{rgb}{0.3,0.6,0.9}
\definecolor{Ex3HatchC}{rgb}{0.5,0,0}
\definecolor{Ex3FFillS}{rgb}{1,0.6,0.6}
\definecolor{Ex3FFillT}{rgb}{1,0.6,0.59}
\definecolor{ExD1}{rgb}{0,0.3,0.6}
\definecolor{cEx3Fill2}{rgb}{0.8,0.4,0.8}
\definecolor{liyellow}{cmyk}{0.3,0,1,0}
\definecolor{awhite}{rgb}{0.99,1,1}
\definefill{Ex3FillC}{Ex3Fill1}
\definefill[progression=linear,angle=190,numsteps=100,
40
target=color blue,path=counterclockwise]{white}{Ex3LegendFill}
\definefill[progression=radial,hshift=0.9,vshift=0.7,
target=brightness 1]{liyellow}{Ex3Fill}
\definefill[progression=radial,target=color red,
path=counterclockwise,hshift=0.25,vshift=0.5]{white}{Ex3Fill2}
\definefill[path=clockwise,progression=linear,angle=180,
target=color Ex3FFillT]{Ex3FFillS}{Ex3FFill}
\defineline[linecolor=black,linewidth=0.1pt]{TicksLineEx3}
\defineline[linecolor=framecolor,linewidth=0.5pt]{FrameLineEx3}
\defineline[linecolor=framecolor,linewidth=1.5pt]
{MainFrameLineEx3}
\defineline[linecolor=medgray,linewidth=1pt,
dashpattern=(1pt)(1pt)]{hAxLineEx3}
\defineline[linecolor=medgray,linewidth=.1pt,
dashpattern=(0.2pt)(2pt)]{GridLineEx3}
\defineline[linecolor=green,linewidth=0.6pt,
linestyle=dash]{F2Ex3}
\defineline[linecolor=blue,linewidth=0.1pt,mark=circle,
marksize=2.5pt]{Ex3F1}
\defineline[linecolor=red,linewidth=0.3pt,mark=cross,
marksize=2.5pt]{Ex3F2}
\defineline[linecolor=ExD1,linewidth=1pt,mark=cross,
marksize=4pt]{ExD1}
\definehatching[interval=1.5pt,angle=90,linecolor=Ex3HatchC,
linewidth=0.1pt]{Ex3Hatch}
\defineticks[numsteps=5,linetype=TicksLineEx3,outlength=2pt,
inlength=2pt,labels=(-50)(0)(50)(100)]{hTicksEx3}
\defineticks[numsteps=5,linewidth=0.1pt,outlength=2pt,
inlength=2pt]{vTicksEx3}
\defineaxis[ticks=hTicksEx3,minlimit=-100,maxlimit=100,
linetype=hAxLineEx3,grid=GridLineEx3,labelgap=5pt,
labelformat=.0f]{}{hAxEx3}
\defineaxis[ticks=vTicksEx3,minlimit=0,maxlimit=5,
linewidth=0.2pt,grid=GridLineEx3,labelgap=5pt,
labelformat=.1f]{}{vAxEx3}
\begin{plot}[legend=rt,fill=Ex3LegendFill,keylength=10pt,
frame=FrameLineEx3]{width=200pt,height=200pt,
haxis=hAxEx3,vaxis=vAxEx3,frame=MainFrameLineEx3,
plotfill=Ex3Fill,gaps=(10pt)(5pt)(10pt)(5pt),
gapsfill=Ex3Fill2}
41
\function[numpoints=2500,linetype=F2Ex3]{(50+0.5*t)*cos(t)-25;
2.5+(1+0.03*t)*sin(t)+t*0.02 | t in [-200,40]}
{\tiny\parbox{4.5cm}{$x=(50+0.5t)\cos(t)-25;$\\
$y=2.5+(1+0.03t)\sin(t)+0.02t$}}
\function[linetype=Ex3F2,lineoff,numpoints=500][minlimit=60,
maxlimit=80,fill=Ex3FFill,hatching=Ex3Hatch,level=1.5]
{1.5+cos(yˆ2/250) | y in [-100,100]}{\tiny$1.5+\cos(yˆ2/250)$}
\function[numpoints=250,linetype=Ex3F1][minlimit=-100,
maxlimit=100,level=0.5,fill=Ex3Fill1]
{4*(sin((x-25)*0.3)/((x-25)*0.3))
+abs(x+50)*0.01+x*0.001 | x in [-100,100]}{\tiny
$\frac{4\sin(0.3(x-25))}{0.3(x-25)}+0.01|x+50|+0.001x$}
\brokenline[linetype=ExD1]{datatable=Ex3,row=1;
datatable=Ex3,row=2}{%
\tiny
\begin{tabular}{|r|r|r|r|r|r|r|}
\hline
-80 & -75 & -75 & -70 & -70 & -65 & -60 \\
\hline
4.2 & 4.2 & 3.6 & 3.6 & 3 & 3 & 4.2 \\
\hline
\end{tabular}
}
\end{plot}
42