Hello Sacha,

to become famous I would recommend you the 'spatstat' package which is best suited to do this kind of plotting and analysis.

You have to install the package and then you can create heatmaps, etc.

To plot the x,y coordinates transfer the particle analysis with the selected centroid and area values.

Select the values in the ImageJ menu: 'Analyze->Set Measurements...'

See video:

https://www.youtube.com/watch?v=gUQRqfh7ZNcAfter the transfer (variables ImageWidth and ImageHeight will be available after transfer!) you can plot the points with:

library(spatstat)

X<- ppp(Particles$X, Particles$Y, c(0,ImageWidth), c(0,ImageHeight))

plot.ppp(X,axes=TRUE)

In the next example I plot the coordinates like in ImageJ (0,0 coordinates in the upper left) and with custom axes.

library(spatstat)

xrange <- c(0,ImageWidth)

yrange <- c(ImageHeight,0)

X<- ppp(Particles$X, Particles$Y, c(0,ImageWidth), c(0,ImageHeight))

plot(x = xrange, y = yrange,xlim=c(1,ImageWidth),ylim=c(ImageHeight,1), type = "n", main = "", asp = 1, axes = F, xlab = "x", ylab = "y")

plot(X,axes=TRUE,xlim=c(1,ImageWidth),ylim=c(ImageHeight,1),add = T)

axis(1)

axis(2, las = 2)

For a density map you can plot:

plot(density(X))

plot(X,add=TRUE)

And here you find an example of the mark correlation function:

http://www.inside-r.org/packages/cran/spatstat/docs/markcorrFor a marked point pattern (in this example the area):

X<- ppp(Particles$X, Particles$Y, c(0,ImageWidth), c(0,ImageHeight),marks=Particles$Area)

plot(density(X, weights=Particles$Area))

Please consult the spatstat documentation for more details.

(type 'spatstat' in the texfield of the R-Shell view and then press the ? action button)