MathGroup Archive 2012

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

Search the Archive

Re: Something other than PlotStyle to change look of graphs

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124863] Re: Something other than PlotStyle to change look of graphs
  • From: "E. Martín-Serrano" <eMartinSerrano at telefonica.net>
  • Date: Thu, 9 Feb 2012 05:44:59 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201202081026.FAA06378@smc.vnet.net>

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.




  • Prev by Date: Re: recursion won't work for some reason
  • Next by Date: Re: Something other than PlotStyle to change look of graphs
  • Previous by thread: Something other than PlotStyle to change look of graphs
  • Next by thread: Re: Something other than PlotStyle to change look of graphs