Re: [R] plotting picture data

2006-08-04 Thread Ritwik Sinha
Just a suggestion. It seems like each square can be denoted by x and y
coordinates. Then you essentially have a two dimensional histogram/density
that you need to plot. You can use the lattice functions
cloud/wireframe. You can also go for a heat map/contour plot, the
lattice functions for that will be levelplot/contourplot. In case the
number of squares are small, you might prefer a two-dimensional histogram,
cloud in lattice has an option to plot the point as histogram.

Ritwik.

On 8/4/06, Gichangi, Anthony [EMAIL PROTECTED] wrote:

 Hi R users

 I have a dataset which represents points that are market by patients as
 the
 source of pain.
 Basically the patients indicates by a cross on a chest pictures where
 he/she
 thinks is the
 source of pain. The data was then digitalized by divinding the chest into
 small squares and each
 square was give value 1 if it was the center 2 if it was touched by the
 markings and 3 if it was not
 touched.  I would like to plot this data on the chest like graph showing
 the
 intesities of different
 points and later stratify the grouping variables to see the difference.

 Has anybody got an idea how I can go around this ?

 Help is highly appreciated.

 Regards

 Anthony Gichangi, M. sc.
 Department of Statistics.
 JB. Winsløvej 9B,
 DK 5000 Odense C.
 Tel:   00 45 6550 3379
 Mobile:  00 45 61105805

 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
Ritwik Sinha
Graduate Student
Epidemiology and Biostatistics
Case Western Reserve University

http://darwin.cwru.edu/~rsinha

[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] plotting picture data

2006-08-04 Thread Petr Pikal
Hi

seems to me that it can be done by image. See ?image.

Just as illustration.
mat-matrix(sample(c(1,rep(2,10), rep(3,50)), 1000, replace=T), 
100,100)
for(i in 1:6) mat[i,c(1:(50-5*i),(50+5*i):100)]-NA
for(i in 14:9) mat[i,c(1:(50-5*(15-i)),(50+5*(15-i)):100)]-NA
image(1:100,1:100,mat)

HTH
Petr


On 4 Aug 2006 at 15:12, Gichangi, Anthony wrote:

From:   Gichangi, Anthony [EMAIL PROTECTED]
To: R-help r-help@stat.math.ethz.ch
Date sent:  Fri, 4 Aug 2006 15:12:36 +0200
Subject:[R] plotting picture data

 Hi R users
 
 I have a dataset which represents points that are market by patients
 as the source of pain. Basically the patients indicates by a cross on
 a chest pictures where he/she thinks is the source of pain. The data
 was then digitalized by divinding the chest into small squares and
 each square was give value 1 if it was the center 2 if it was touched
 by the markings and 3 if it was not touched.  I would like to plot
 this data on the chest like graph showing the intesities of different
 points and later stratify the grouping variables to see the
 difference.
 
 Has anybody got an idea how I can go around this ?
 
 Help is highly appreciated.
 
 Regards
 
 Anthony Gichangi, M. sc.
 Department of Statistics.
 JB. Winslřvej 9B,
 DK 5000 Odense C.
 Tel:   00 45 6550 3379
 Mobile:  00 45 61105805
 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html and provide commented,
 minimal, self-contained, reproducible code.

Petr Pikal
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.