MathGroup Archive 2005

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

Search the Archive

listplot two lists of different lengths

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59989] listplot two lists of different lengths
  • From: "sean_incali" <sean_incali at yahoo.com>
  • Date: Sat, 27 Aug 2005 04:11:28 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

let's say you have lists of different lengths


<< Statistics`ContinuousDistributions`
<< Graphics`Graphics`
<< Graphics`Colors`

l1 = RandomArray[NormalDistribution[1, 0.5], 100];
l2 = RandomArray[NormalDistribution[1, 1], 200];

DisplayTogether[
ListPlot[Sort@l1, PlotStyle -> {PointSize[0.015], Red}, DisplayFunction
-> Identity, Frame -> True, Axes -> False, PlotRange -> All ],
ListPlot[Sort@l2, PlotStyle -> {PointSize[0.015], Blue},
DisplayFunction -> Identity, Frame -> True, Axes -> False],

DisplayFunction -> $DisplayFunction]

shows red is off to the left hand side because the list plotted in red
is shorter inn length that one in blue.

How do I stretch the scale for the list in red, so the plots are scaled
to same axis? (taking half as many points for longer list doesn't work
for me)

the best way will be to stretch the red line...

thanks for any inputs

sean


  • Prev by Date: Re: Mathematica & Excel
  • Next by Date: help working with functions
  • Previous by thread: Re: format of "Solve" output
  • Next by thread: Re: listplot two lists of different lengths