MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Give arrow a certai color

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104796] Re: [mg104775] Give arrow a certai color
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 10 Nov 2009 05:59:46 -0500 (EST)
  • Reply-to: hanlonr at cox.net

r[t_] := Exp[-t];
theta[t_] := 3 t + 0.7;

The original works because you replace the head Line with Arrow

ParametricPlot[
  {r[t]*Cos[theta[t]], r[t]*Sin[theta[t]]},
  {t, 0, 1.1},
  Ticks -> None,
  AxesLabel -> {"z", "z'"},
  PlotRange -> {-1, 1}][[1, 1, 3, 2, 0]]

Line

However, when you add the PlotStyle you move the target (you are no longer repacing the head Line)

ParametricPlot[
  {r[t]*Cos[theta[t]], r[t]*Sin[theta[t]]},
  {t, 0, 1.1},
  PlotStyle -> Black,
  Ticks -> None,
  AxesLabel -> {"z", "z'"},
  PlotRange -> {-1, 1}][[1, 1, 3, 2, 0]]

GrayLevel

Correcting your aim:

ReplacePart[
 ParametricPlot[
  {r[t]*Cos[theta[t]], r[t]*Sin[theta[t]]},
  {t, 0, 1.1},
  PlotStyle -> Black,
  Ticks -> None,
  AxesLabel -> {"z", "z'"},
  PlotRange -> {-1, 1}],
 {1, 1, 3, 3, 0} -> Arrow]

However, use of other options are likely to cause the same problem. It is better to replace the Head directly

ParametricPlot[
  {r[t]*Cos[theta[t]], r[t]*Sin[theta[t]]},
  {t, 0, 1.1},
  PlotStyle -> Black,
  Ticks -> None,
  AxesLabel -> {"z", "z'"},
  PlotRange -> {-1, 1}] /.
 Line[x_] -> Arrow[x]


Bob Hanlon

---- Alexei Boulbitch <boulbitch at gmx.de> wrote:

=============
Dear community,

we discussed recently how to make curved arrows. Here is an example:

r[t_] := Exp[-t];
\[Theta][t_] := 3 t + 0.7;

pl1 = ReplacePart[
   ParametricPlot[{r[t]*Cos[\[Theta][t]], r[t]*Sin[\[Theta][t]]}, {t,
     0, 1.1}, Ticks -> None, AxesLabel -> {"z", "z'"},
    PlotRange -> {-1, 1}], {1, 1, 3, 2, 0} -> Arrow];
pl2 = ParametricPlot[{r[t]*Cos[\[Theta][t]],
    r[t]*Sin[\[Theta][t]]}, {t, 1, 7}, Ticks -> None,
   AxesLabel -> {"z", "z'"}, PlotRange -> {-1, 1}];

Show[{pl1, pl2}]

However, I cannot force Mathematica to make the graph black (or any other color) instead of blue. The option PlotStyle->Black as below

ReplacePart[
 ParametricPlot[{r[t]*Cos[\[Theta][t]], r[t]*Sin[\[Theta][t]]}, {t, 0,
    1.1}, PlotStyle -> Black, Ticks -> None, AxesLabel -> {"z", "z'"},
   PlotRange -> {-1, 1}], {1, 1, 3, 2, 0} -> Arrow]

does not work.


Could you please give me a hint, of how to do this?

Thank you, Alexei
--
Alexei BOULBITCH,
Dr. , habil.
IEE S.A.
Department for Material Development
ZAE Weiergewan
11, rue Edmond Reuter
L-5326 Contern, Luxembourg

Tel.          ++352-2454-2566
Fax.:        ++352 424737201
mobile:         0152-03807245
E-mail:      alexei.boulbitch at iee.lu
Internet:   http://www.physik.tu-muenchen.de/~aboulbit/

GRATIS f=C3=BCr alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



  • Prev by Date: Re: Re: Mathematica skill level snippet(s)
  • Next by Date: Re: Set::setps error? Twitter.m's OOP-like approach?
  • Previous by thread: Re: Give arrow a certai color
  • Next by thread: Any Mathematica Programmers in/near Santa Monica, CA?