MathGroup Archive 2005

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

Search the Archive

Re: listplot two lists of different lengths

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59997] Re: [mg59989] listplot two lists of different lengths
  • From: "David Park" <djmp at earthlink.net>
  • Date: Sun, 28 Aug 2005 03:07:34 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Sean,

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

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

list1 = Transpose[{Range[100], Sort[l1]}];
list2 = Transpose[{Range[0.5, 100, 0.5], Sort[l2]}];

Show[Graphics[
      {PointSize[0.015],
       Red, Point /@ list1,
       Blue, Point /@ list2}],
    Frame -> True];

You don't need ListPlot. Throw ListPlot into the garbage can.

David Park
djmp at earthlink.net
http://home.earthlink.net/~djmp/ 



From: sean_incali [mailto:sean_incali at yahoo.com]
To: mathgroup at smc.vnet.net


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: help working with functions
  • Next by Date: Re: listplot two lists of different lengths
  • Previous by thread: Re: listplot two lists of different lengths
  • Next by thread: Re: listplot two lists of different lengths