Re: Line Thicknes in arrows in PlotField
- To: mathgroup at smc.vnet.net
- Subject: [mg24984] Re: Line Thicknes in arrows in PlotField
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Fri, 1 Sep 2000 01:09:21 -0400 (EDT)
- References: <8odlqe$t4d@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Jordi,
<<Graphics`PlotField`
The efffect of
ColorFunction->({Hue[0],Dashing[{.03,.1}],Thickness[.02]}&)
in the following is to place the sequence
Hue[0],Dashing[{.03,.1}],Thickness[.02]
in front of each occurence of Arrow[...] in graphics object generated.
gr = PlotVectorField[{x, y},
{x, 1,2 }, {y, 1,2 },PlotPoints ->2,
ColorFunction->({Hue[0],Dashing[{.03,.1}],Thickness[.02]}&)]
We can see this
gr[[1]]
{Thickness[
0.0001`], {{Hue[0], Dashing[{0.03`, 0.1`}], Thickness[0.02`],
Arrow[{1.`, 1.`}, {1.3535533905932737`, 1.3535533905932737`},
HeadScaling -> Automatic, HeadLength -> 0.02`, HeadCenter -> 1,
HeadWidth -> 0.5`, HeadShape -> Automatic, ZeroShape -> Automatic,
HeadScaling -> Automatic, HeadLength -> 0.02`, HeadCenter -> 1,
HeadWidth -> 0.5`, HeadShape -> Automatic, ZeroShape -> Automatic]},
----------- SNIP ------------
}}
It might be better to call the option "StyleFunction"
--
Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565
"Jordi Ignes" <jignes at mailhost.tcs.tulane.edu> wrote in message
news:8odlqe$t4d at smc.vnet.net...
> I would like to specify the line thickness in the arrows that form a
> PlotField plot. The standard PlotField.m package forces the thickness to
> be 0.0001 (line 194 of package). Now, that can easily be overcome by
> modifying that package to the thickness I want and saving into, say,
> myPlotField.m .
>
> What I am puzzled about is the comment that one can read just above that
> line in the PlotField.m package:
> "(* note that line thickness is forced to 0.0001 (thin lines);
> this can be overridden by use of ColorFunction option *)"
>
> How can I use the ColorFunction option to override the forced line
> thickness? It would certainly be much more elegant and portable than
> modifying the standard package.
>
> Thanks.
>
> Jordi.
>