Re: Something other than PlotStyle to change look of graphs
- To: mathgroup at smc.vnet.net
- Subject: [mg124868] Re: Something other than PlotStyle to change look of graphs
- From: "E. Martín-Serrano" <eMartinSerrano at telefonica.net>
- Date: Fri, 10 Feb 2012 05:52:34 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- 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 at telefonica.net] Enviado el: jueves, 09 de febrero de 2012 11:45 Para: mathgroup at 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 at gmail.com] Enviado el: mi=E9rcoles, 08 de febrero de 2012 11:26 Para: mathgroup at 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.
- References:
- Something other than PlotStyle to change look of graphs
- From: cylurian <cylurian@gmail.com>
- Re: Something other than PlotStyle to change look of graphs
- From: "E. Martín-Serrano" <eMartinSerrano@telefonica.net>
- Something other than PlotStyle to change look of graphs