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: [mg124856] Re: Something other than PlotStyle to change look of graphs
  • From: Alexei Boulbitch <Alexei.Boulbitch at iee.lu>
  • Date: Thu, 9 Feb 2012 05:42:33 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

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.



Try this:



filledSquare = {Graphics[{Blue, Rectangle[]}], .02};



vertexDownFilledTriangle = {Graphics[{Purple,

     Polygon[{{1, 0}, {0, Sqrt[3]}, {-1, 0}}]}], .02};



hexagonFilled = {Graphics[{Red,

     Polygon[Table[{Cos[2 \[Pi] k/6], Sin[2 \[Pi] k/6]}, {k, 0,

        5}]]}], 0.02};



tab1 = Table[{x, SurvivalFunction[WeibullDistribution[2.2, 3.2], x]}, {x, 0, 5, 0.1}];

tab2 = Table[{x, SurvivalFunction[LogNormalDistribution[.1, .8], x]}, {x, 0, 5, 0.1}];

tab3 = Table[{x, SurvivalFunction[ExponentialDistribution[.6], x]}, {x, 0, 5, 0.1}];



pl1 = ListPlot[tab1, PlotMarkers -> filledSquare,  AxesLabel -> TraditionalForm /@ {t, "S(t)"}, Ticks -> None, PlotLabel -> Style["Survival Curves", FontSize -> 18]];

pl2 = ListPlot[tab2, PlotMarkers -> vertexDownFilledTriangle];

pl3 = ListPlot[tab3, PlotMarkers -> hexagonFilled];



Show[{pl1, pl2, pl3}]



Have fun. Alexei



Alexei BOULBITCH, Dr., habil.

IEE S.A.

ZAE Weiergewan,

11, rue Edmond Reuter,

L-5326 Contern, LUXEMBOURG



Office phone :  +352-2454-2566

Office fax:       +352-2454-3566

mobile phone:  +49 151 52 40 66 44



e-mail: alexei.boulbitch at iee.lu<mailto:alexei.boulbitch at iee.lu>








  • Prev by Date: Re: Something other than PlotStyle to change look of graphs
  • Next by Date: Re: Kolmogorov Smirnov in two or more dimensions
  • Previous by thread: Re: Something other than PlotStyle to change look of graphs
  • Next by thread: Re: Something other than PlotStyle to change look of graphs