Fancy Figures

First define a function

f[L_, n_, x_] := 2/L^(1/2) Sin[(n π x)/L]

Now we change the plotting fonts

$TextStyle := {FontFamily->"Times-Bold", FontWeight→ "Normal", FontSize→ "14"}

Notice the option to the Plot command

Plot[ {f[10,1,x], f[10,1,x]^2,
       f[10,2,x], f[10,2,x]^2}, {x,0,10},
       Frame -> True,PlotStyle->{{Dashing[{0.02}],Hue[1.0],Thickness[0.01]},{Thickness[0.01]}}]

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

-Graphics -

Another function

sig3[z_,zo_,b_] := 1./(1.+ Exp[b(z-zo)])

where zo is the threshold concentration and b is the attenuation constant.

fig1 = Plot[{sig3[x,10.,0.5],sig3[x,10.,1.],sig3[x,10.,2],sig3[x,10,5]},
      {x,0,20},PlotRange->{0,1.20},Frame->True,
FrameLabel->{"z","f"},PlotStyle->{Thickness[0.01],Hue[.8]},DisplayFunction->Identity];

DisplayFunction->Identity instructs Plot to save the plot in memory under the name "fig1".  The plot can be recall and shown using the Show function and the command DisplayFunction->$DisplayFunction, which is the default setting

FIG1 = Show[{fig1,Graphics[{Text["b=0.5",{5,.75}],
            Text["b=5.0",{12,.9}]}]},
            DisplayFunction->$DisplayFunction,
            RotateLabel->False];

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

The command "With" allows us to use local values

dou1 = With[{a=5},ParametricPlot3D[
                       {Cos[t]*(a+Cos[ u ]),
                        Sin[t]*(a+Cos[ u ]),
                         Sin[ u]
                       },
                       {t,0,2 π},
                       {u,0,2 π},
                       Boxed->False,
                       Axes->False
                      ]];

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

dou2 = With[{a=10},ParametricPlot3D[
                       {Cos[t]*(u+Cos[ u ]),
                        Sin[t]*(u+Cos[ u ]),
                        a Sin[ u]
                       },
                       {t,0,2 π},
                       {u,0,2 π},
                       Boxed->False,
                       Axes->False
                      ]];

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


Created by Mathematica  (September 7, 2006) Valid XHTML 1.1!