RE: Plotting mulitple lists on one log plot
- To: mathgroup at smc.vnet.net
- Subject: [mg34489] RE: [mg34454] Plotting mulitple lists on one log plot
- From: "Annetts, Dave (E&M, North Ryde)" <David.Annetts at csiro.au>
- Date: Thu, 23 May 2002 03:32:39 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi John, > I'm having a problem with using LogListPlot to plot multiple > data sets on the > same plot. Basically it will not format each individual data > set line as I > wish - Mathematica appears to ignore the PlotStyle option. > Below I include > the relevant lines of code. Mathematica version = 4.01 > running on Linux > > ************* > > Debonded = {{0., 81.5244}, {0.1, 5.81173}, {0.2, 3.53041}, {0.3, > 3.09363}, {0.4, 3.09363}, {0.5, 1.44145}, {0.6, > 1.44145}, {0.7, > 0.522863}}; > > NoDistalCement = {{0., 71.8089}, {0.1, 8.1722}, {0.2, 6.51516}, {0.3, > 5.17021}, {0.4, 5.17021}, {0.5, 2.65144}, {0.6, > 2.65144}, {0.7, > 0.697332}}; > > DisplayTogether[ LogListPlot[NoDistalCement, AxesLabel -> > {"Probability of > failure", "Percentage of cement satisfying probability"}, > PlotStyle -> > {{Thickness[0.04], GrayLevel[0.5], > Dashing[{0.1, 0.5, 0.5, 0.5}]}}], > LogListPlot[Debonded, PlotJoined -> True]] > > ************** > > If anyone has any ideas about how I can resolve this problem > I'd be very > grateful, and I will post a summary of responses. (Have searched the > archives, web and Mathematica help to no avail). Two solutions ... The first is to correct your first PlotStyle to PlotStyle -> {Thickness[0.04], GrayLevel[0.5], Dashing[{0.1, 0.5, 0.5, 0.5}]} You'll also need to rejig your command to the form DisplayTogether[ {plot1, plot2, plot ...}, AxesLabel-> ... ]; for the axes label to be visible. The second solution is to use MultipleListPlot rather than DisplayTogether. The code for that is ... newNoD = {#[[1]], Log[10, #[[2]]]} & /@ NoDistalCement; newDeb = {#[[1]], Log[10, #[[2]]]} & /@ Debonded; styles = {{Thickness[0.04], GrayLevel[0.5], Dashing[{0.1, 0.5, 0.5, 0.5}]}, Black}; MultipleListPlot[newNoD, newDeb, PlotStyle -> styles, SymbolStyle -> None, SymbolShape -> None, FrameTicks -> {Automatic, LogScale, None, None}, FrameLabel -> {"Probability of failure", "Percentage of cement satisfying probability"}]; Regards, Dave. -------------------------------------------------------- Dr. David Annetts EM Modelling Analyst Tel: (+612) 9490 5416 CSIRO DEM, North Ryde Fax: (+612) 9490 5467 David.Annetts at csiro.au Include "usual_disclaimers" --------------------------------------------------------