Re: listplot two lists of different lengths
- To: mathgroup at smc.vnet.net
- Subject: [mg60008] Re: [mg59989] listplot two lists of different lengths
- From: ggroup at sarj.ca
- Date: Sun, 28 Aug 2005 03:07:43 -0400 (EDT)
- References: <200508270811.EAA15275@smc.vnet.net>
- Reply-to: ggroup at sarj.ca
- Sender: owner-wri-mathgroup at wolfram.com
Saturday, August 27, 2005, 04:11 GMT -0400: Awash in controversy, Sean_Incali proclaimed: > 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) Well, if the x-axis numbers don't mean anything, then why not simply create a list of x-axis points for each list? One way could be: posl2 = Range[Length[l2]]; posl1 = Range[1, Length[l1]](Length[l2]/Length[l1]); pl1 = Transpose[{posl1, Sort@l1}]; pl2 = Transpose[{posl2, Sort@l2}]; And then plot both pl1 and pl2 together rather than l1 and l2. DisplayTogether[ ListPlot[pl1, PlotStyle -> {PointSize[0.015], Red}, DisplayFunction -> Identity, Frame -> True, Axes -> False, PlotRange -> All], ListPlot[pl2, PlotStyle -> {PointSize[0.015], Blue}, DisplayFunction -> Identity, Frame -> True, Axes -> False]]
- References:
- listplot two lists of different lengths
- From: "sean_incali" <sean_incali@yahoo.com>
- listplot two lists of different lengths