Professional Documents
Culture Documents
b :
Styling Options in Plotting
In[26]:= Plot [Abs [Sin [x]], {x, - 2 * Pi, 2 * Pi } , PlotStyle → {Red, Thick , Dashed }]
1.0
0.8
0.6
Out[26]=
0.4
0.2
-6 -4 -2 2 4 6
1.0
0.5
Out[27]=
-6 -4 -2 2 4 6
-0.5
-1.0
2
In[29]:= Plot [{Sin [Cos [x]], Cos [Sin [x]]} , {x, - Pi, Pi }, PlotLegends → {"Curve1 ", "Curve2 "},
PlotStyle → {{Orange , Thick , Dashed }, {Green , Thick }}]
1.0
0.5
Curve1
Out[29]=
-3 -2 -1 1 2 3
Curve2
-0.5
1.0
0.5
Out[32]=
-10 -5 5 10
-0.5
-1.0
20
10
1 2 3 4 5 6
Out[4]= -10
-20
-30
-40
3
In[45]:= Plot [{(x ^ 2 + x + 1) / (x + 1), x}, {x, - 4, 3}, PlotStyle → {Blue, {{Red, Dashed , Thick }}},
ExclusionsStyle → {{Red, Dashed , Thick }, {PointSize → 0.0 }}]
10
Out[45]= -4 -3 -2 -1 1 2 3
-5
-10
In[43]:= Plot [{(x ^ 3 + 1) ^ (1 / 3), x}, {x, - 5, 2} , PlotStyle → {Purple , {{Orange , Dashed , Thick }}}]
-5 -4 -3 -2 -1 1 2
-1
Out[43]=
-2
-3
-4
-5
4
1000
800
600
Out[46]=
400
200
-4 -2 2 4 6 8 10
In[48]:= Plot [{x ^ 3, 3 * (x ^ 2), 6 x} , {x, - 10, 10 }, PlotStyle → {{Red, Dashed }, {Green , Thick }, Blue },
PlotLegends → {"Curve1 ", "Curve2 ", "Curve3 "}]
400
300
200
Curve1
100
Out[48]= Curve2
-10 -5 5 10 Curve3
-100
-200
-300
1.0
0.5
Out[52]= g'
-3 -2 -1 1 2 3
g''
-0.5
-1.0
5
In[54]:= Plot [{Sin [Floor [x]], Cos [Floor [x]]}, {x, - Pi, Pi } ,
PlotStyle → {{Red, Thick }, {Blue, Thick }}, PlotLegends → {"Function1 ", "Function2 "}]
1.0
0.5
Function1
Out[54]=
-3 -2 -1 1 2 3 Function2
-0.5
-1.0
In[57]:= Plot [{Log [Sin [x / 2]], Log [Cos [x / 2]]}, {x, - 2 * Pi, 2 * Pi } ,
PlotStyle → {{Purple , Thick }, {Orange , Thick }}]
-6 -4 -2 2 4 6
-0.5
-1.0
-1.5
Out[57]=
-2.0
-2.5
-3.0
In[60]:= f[x_] := x ^ (2 / 5) * (2 x + 5)
ResourceFunction ["EnhancedPlot "][f[x], {x, - 10, 10 },
"FindExceptions " → True , PlotLegends → "GraphA ", PlotStyle → {Blue, Thick }]
60
40
20
Out[61]= GraphA
-10 -5 5 10
-20
-40
6
In[5]:= f[x_] := (x ^ 3 + 1) / (x ^ 3 - 8)
ResourceFunction ["EnhancedPlot "][f[x], {x, - 10, 10 }, "FindExceptions " → True ]
2.5
2.0
1.5
1.0
Out[6]=
0.5
-10 -5 5 10
-0.5
-1.0
12
10
Out[16]= 6
-10 -5 5 10
7
70 000
60 000
50 000
40 000
Out[18]=
30 000
20 000
10 000
-10 -5 5 10
2.0
1.5
Out[20]=
1.0
0.5
-10 -5 5 10
8
15
10
5
y=e^(-x)
Out[6]=
-4 -2 2 4 y=-e^(-x)
-5
-10
-15