| Author |
Comment/Response |
Forum Moderator
email me
 |
10/01/02 09:28am
Text, Arrows, Circles, etc. are called Graphics
Primitives in Mathematica. Most of these
are defined when the Kernel is launched. Arrows
are defined in one of the Standard AddOn packages.
You can load that package:
<<Graphics`Arrow`
and then do some drawing:
Show[Graphics[{Text["Here is an arrow pointing at a circle", {0, 1}],
Arrow[{.1, .9}, {.4, .6}], Circle[{.5, .5}, .1]}], PlotRange -> All]
You can add primitives to a plot using Epilog:
Plot[x, {x, 0, 1},
Epilog -> {Text["Here is the mid point of the line", {0, 1}],
Arrow[{.1, .9}, {.4, .6}], Circle[{.5, .5}, .1], PointSize[.05],
Point[{.5, .5}]}, PlotRange -> All]
Note the use of PlotRange in each case. In most
cases the setting All will suffice. At times,
however, you may need to specify the range
explicitly.
PointSize is an example of a Graphics Directive,
that is something that controls the appearance
of a Graphics "object."
You can also combine a plot and primitives using
Show:
In[29]:= gr=Plot[x, {x, 0, 1}]
In[30]:=
Show[{gr,
Graphics[{Text["Here is the mid point of the line",{0,1}],
Arrow[{.1,.9},{.4,.6}], Circle[{.5,.5},.1],PointSize[.05],
Point[{.5,.5}]}]}, PlotRange\[Rule] All]
Show, Graphics, Text, Arrow, Circle, etc. are
all discused in the documentation available in
the Help Browser.
URL: , |
|