Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8438
| From | "E. Martín-Serrano" <eMartinSerrano@telefonica.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Something other than PlotStyle to change look of graphs |
| Date | 2012-02-10 10:53 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jh2svs$kp$1@smc.vnet.net> (permalink) |
| References | <201202081026.FAA06378@smc.vnet.net> <201202091044.FAA18526@smc.vnet.net> |
The following examples are something definitely general
ch = Graphics[{Yellow, Disk[{0, 0}, Offset[5]], Yellow, Black,
Circle[{0, 0}, Offset[5]], Red, Disk[{0, 0}, Offset[3]], Black,
Circle[{0, 0}, Offset[3]]}, ImageSize -> 20 ]
rt = RotationTransform[-Pi/4, {0, 0}]
ParametricPlot[rt @{x + 1, x^2}, {x, -6, 6},
PlotStyle -> Directive[White, Arrowheads[{{.1, .01, ch}}]],
Oriented -> True, HowManyArrows -> 100,
PlotRange -> {{-6, 6}, {-2, 11}}]
ParametricPlot[rt @{x + 1, x^2}, {x, -6, 6},
PlotStyle -> Directive[Blue, Arrowheads[{{.1, .01, ch}}]],
Oriented -> True, HowManyArrows -> 100,
PlotRange -> {{-6, 6}, {-2, 11}}]
rt = RotationTransform[Pi/4, {0, 0}]
ParametricPlot[rt@{Cos[x] 5, Sin[x] 10}, {x, - Pi, 3 \[Pi]},
PlotStyle -> Directive[White, Arrowheads[{{.1, .01, ch}}]],
Oriented -> True, HowManyArrows -> 70,
PlotRange -> {{- 3 Pi, 3 Pi}, {-11, 11}}]
But, to run these examples you need the CurvesGraphics package by Gianluca
Gorni, that you may download here (for free at the time when I downloaded
it). Gianluca, on the other hand, is very supportive).
http://users.dimi.uniud.it/~gianluca.gorni/
The Guianluca package is meant to plot arrows in many forms at any distance
and in any color on almost any curve in 2D and 3D and much more; and by
substituting the standard (tip) arrow head by any custom-made picture, as
the double circle above, you are able to simulate any plot of the kind I
understand you need.
Besides, the Gianluca package supports the David Park's Presentations
package which, in my case, reduces in at least one order of magnitude the
effort of dealing with complex and multiple graphics either static or
dynamic.
http://home.comcast.net/~djmpark/index.html
Good luck.
E. Martin-Serrano
-----Mensaje original-----
De: E. Mart=EDn-Serrano [mailto:eMartinSerrano@telefonica.net]
Enviado el: jueves, 09 de febrero de 2012 11:45
Para: mathgroup@smc.vnet.net
Asunto: Re: Something other than PlotStyle to change look of
graphs
Try something like this
ch = Graphics[{Yellow, Disk[{0, 0}, Offset[5]], Yellow, Black,
Circle[{0, 0}, Offset[5]], Red, Disk[{0, 0}, Offset[3]], Black,
Circle[{0, 0}, Offset[3]]}, ImageSize -> 20 ]
With[{f = {Cos[x] + Sin[x], Sin[x]}},
Graphics[Table[{Hue[t/(2 Pi), 1, .8], Arrowheads[{{.1, 1, ch}}],
Arrow[{f, Normalize[D[f, x]]/20 + f}]} /. x -> t, {t, 0,
2 Pi, .1}]]]
Or this
With[{f = {Cos[x] + Sin[x], Sin[x]}},
Graphics[Table[{Hue[t/(2 Pi), 1, .8], Arrowheads[{{.1, 1, ch}}],
Arrow[{f, Normalize[D[f, x]]/10 + f}]} /. x -> t, {t, 0,
2 Pi, .1}]]]
You can change the arrow head shape at will substituting the graphics form
in 'ch'
E. martin-Serrano
-----Mensaje original-----
De: cylurian [mailto:cylurian@gmail.com] Enviado el: mi=E9rcoles, 08 de
febrero de 2012 11:26
Para: mathgroup@smc.vnet.net
Asunto: Something other than PlotStyle to change look of graphs
I have three functions in one plot. I'm using PlotStyle to differentiate
the graphs, but I need more options. I need each graph to have some special
marker, like a diamond, circle, etc. I'm using Mathematica 8 and I'm
also
using PlotLegend. Any suggestions?
My code is:
Plot[{SurvivalFunction[WeibullDistribution[2.2, 3.2], x],
SurvivalFunction[LogNormalDistribution[.1, .8], x],
SurvivalFunction[ExponentialDistribution[.6], x]}, {x, 0, 5}, PlotStyle
-> {{ Black, Thickness[Small]}, {Dashing[Tiny],
Black}, {Dashing[Large], Black, Thickness[Large]}}, AxesLabel ->
TraditionalForm /@ {t, "S(t)"}, Ticks -> None, DisplayFunction -> Identity,
PlotLabel -> Style["Survival Curves", FontSize -> 18], PlotLegend ->
{"Weibull", "LogNormal", "Exponential"}, LegendPosition -> {.3, -0.1},
LegendTextSpace -> 4, LegendLabelSpace -> .5, LegendLabel -> "Survival
Curves", LegendOrientation -> Vertical, LegendBackground -> White,
LegendSize -> .4, ShadowBackground -> White]
thx.
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Something other than PlotStyle to change look of graphs "E. Martín-Serrano" <eMartinSerrano@telefonica.net> - 2012-02-10 10:53 +0000
csiph-web