plot data with circles or varying radii

  • Follow


hello all
it seems like yet again i may have to trouble all you good folks with
another of my problem. say i have a data file in the following format

x0 y0 r0
x1 y1 r1
x2 y2 r2
x3 y3 r3
..   .  .
..   .  .
xn yn rn

it has 3 columns.

how may i go about plotting a circle of radius r0 centered at (x0,y0)
and a circle of radius r1 at (x1, y1)  .... and a circle at (xn, yn)
of radius rn

that is instead of something like

plot 'datafile' u 1:2 w p

i want something like the following

plot 'datafile' u 1:2 with circle_of_radius $3.

this might be useful in a context of clustering where the cluster
centers have the location (x_i, y_i) while the corresponding cluster
size is
indicated by the radius value.

many thanks in advance
-awhan
0
Reply awimagic (10) 4/11/2010 6:17:34 AM

Awhan Patnaik wrote:

> hello all
> it seems like yet again i may have to trouble all you good folks with
> another of my problem. say i have a data file in the following format
> 
> x0 y0 r0
> x1 y1 r1
> x2 y2 r2
> x3 y3 r3
> .   .  .
> .   .  .
> xn yn rn
> 
> it has 3 columns.
> 
> how may i go about plotting a circle of radius r0 centered at (x0,y0)
> and a circle of radius r1 at (x1, y1)  .... and a circle at (xn, yn)
> of radius rn
> 
> that is instead of something like
> 
> plot 'datafile' u 1:2 w p
> 
> i want something like the following
> 
> plot 'datafile' u 1:2 with circle_of_radius $3.

You are in luck.  Exactly this form of plot is supported in version 4.4.

  plot 'datafile' u 1:2:3 with circles

  http://gnuplot.sourceforge.net/demo/circles.html
0
Reply sfeam 4/11/2010 4:24:05 PM


Use: 
plot "yourfile.dat" with circles 
In the new version 4.4
0
Reply Ángela 4/29/2011 5:58:54 PM

2 Replies
813 Views

(page loaded in 0.04 seconds)

Similiar Articles:













7/26/2012 10:39:26 AM


Reply: