MathGroup Archive 2008

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

Search the Archive

RE: Multiple data sets with ListPlot and different PointSizes - Mesh

  • To: mathgroup at smc.vnet.net
  • Subject: [mg85705] RE: [mg85687] Multiple data sets with ListPlot and different PointSizes - Mesh
  • From: "David Annetts" <davidannetts at aapt.net.au>
  • Date: Tue, 19 Feb 2008 07:06:50 -0500 (EST)
  • References: <200802190659.BAA27862@smc.vnet.net>

Hi Tibor,

> I would like to plot a few data sets with different 
> PointSizes using ListPlot.
> My format: {{x1Pos,y1Pos,dot1Size}, 
> {x2Pos,y2Pos,dot2Size},...} The initial state:
> data1 = {{1, 1, 3}, {5, 5, 6}, {6, 8, 10}}
> data2 = {{1, 2, 10}, {2, 3, 5}, {6, 10, 16}}
> data3 = ...
> 
> Any solution would be appreciated.

You probably don't need ListPlot for this.

Given three sets of random integer triples

	d1 = RandomInteger[{0, 15}, {10, 3}];
	d2 = RandomInteger[{0, 20}, {11, 3}];
	d3 = RandomInteger[{10, 30}, {12, 3}];

we can coerce them into the form you want using

	d1 = d1 /. {x_, y_, s_} -> {Directive[AbsolutePointSize[s], Red],
Tooltip[Point[{x, y}], {x, y, s}]};
	d2 = d2 /. {x_, y_, s_} -> {Directive[AbsolutePointSize[s], Green],
Tooltip[Point[{x, y}], {x, y, s}]};
	d3 = d3 /. {x_, y_, s_} -> {Directive[AbsolutePointSize[s], Blue],
Tooltip[Point[{x, y}], {x, y, s}]};

and display them using

	Show[Graphics[{d1, d2, d3}], Frame -> True]

Regards,

Dave.



  • Prev by Date: Re: Making a lists with conditions
  • Next by Date: Re: Making a lists with conditions
  • Previous by thread: Multiple data sets with ListPlot and different PointSizes - Mesh
  • Next by thread: Re: Multiple data sets with ListPlot and different PointSizes - Mesh