Hii

The contour plot is somewhat similar to what I want.
I am attaching the data here.

What I want to do is divide all the three variable( Recency, frequency,and
monetory ) in 5 intervals based on their values.That will make
25 rectangle(5(recency)X 5(frequency) boxes on heat plot. and then plot a
heat map with recency on X axis and frquency on Y axis, and also I want to
show the no. of elements in each box( total 25) by heat colours i.e
increasing no. of elements with the darker colour box.
And one more plot with the same variable on XY as mentioned above but this
time box colour depicting the average monetary value of that box.

Hope this clears the problem I am facing.
Thank you.

Regards,
Sumit




On 6/11/08, Petr PIKAL <[EMAIL PROTECTED]> wrote:
>
> "sumit gupta" <[EMAIL PROTECTED]> napsal dne 11.06.2008 07:53:54:
>
> > Hello
> > thanx for the info..
> >
> > I still have tthe doubt regarding the heat map.
> > I am attching a plot of a 70X3 data matrix.In which 3rd variable has
> been
> > shown as  colour of different boxes.Could you help me to draw this type
> of graph using R
>
> Well, as you did not provided some data
>
> mat<-cbind(sample(1:5, 70, replace=T), sample(1:5, 70, replace=T),
> rnorm(70))
> dim(mat)
> [1] 70  3
> library(akima)
> filled.contour(interp(mat[,1], mat[,2], mat[,3], duplicate="mean"))
> image(interp(mat[,1], mat[,2], mat[,3], duplicate="mean"))
>
>
> is this what you want?
>
> Regards
> Petr
>
> >
> > Regards,
> > Sumit
> >
> >
> > On 6/10/08, Petr PIKAL <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > [EMAIL PROTECTED] napsal dne 10.06.2008 14:49:55:
> >
> > > Hello,
> > >
> > > I am facing a problem in drawing heat map using R.
> > >
> > > I have a 70X3 matrix and I want to draw a heat map with 1 coloumn on X
> > axis
> > > another on Y axis and want to show the value of 3rd coloumn using heat
> > > colours.
> > > Could you please help me with this .
> >
> > You can use function interp from akima package
> >
> > Petr
> >
> > > Thank you .
> > >
> > > Regards,
> > > Sumit
> > >
> > >    [[alternative HTML version deleted]]
> > >
> > > ______________________________________________
> > > R-help@r-project.org mailing list
> > > https://stat.ethz.ch/mailman/listinfo/r-help
> > > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> > > and provide commented, minimal, self-contained, reproducible code.
>
> >
> >
> >
> > --
> > Sumit Kumar Gupta
> > 4thYear ,Biotechnology
> > IIT Madras [příloha rfm.bmp odstraněna uživatelem Petr PIKAL/CTCAP]
>



-- 
Sumit Kumar Gupta
4thYear ,Biotechnology
IIT Madras



-- 
Sumit Kumar Gupta
4thYear ,Biotechnology
IIT Madras
Recency Frequency       Monetary
562     2               4795.5
570     2               1200
578     3               1719
585     2               728
575     3               2326.6666
583     1               1822
612     2               9508.9637
578     2               2127.5
581     4               2781.5
562     5               1504.4
563     3               1447
575     1               3163
577     2               995
564     6               1198.6666
569     2               1740.5
562     6               1294.5
566     8               881.25
587     1               1913
578     2               1553.5
585     13              2472.0769
567     1               3049
560     1               964
568     2               1452
569     2               3370
575     6               1386.3333
585     3               1643
560     3               4554.2631
559     2               1536.7438
559     1               1319.6811
559     5               3169.5263
560     3               875.5572
561     2               5093.6068
559     8               2394.0242
561     1               4076.4088
559     1               1625.0949
562     5               1775.1878
560     1               1500.597
562     14              1876.4794
563     3               1582.5177
564     3               4268.6134
564     2               3799.6765
567     4               4590.8274
563     1               2140
564     2               1475
569     1               6970
568     1               1500
567     7               2070.2857
568     3               1681.6666
568     3               697.5219
571     1               2000
571     5               1438
570     4               1393
570     4               2355.25
571     1               756.3875
576     1               1720.8184
571     5               1613
574     3               1903.3333
577     6               1828.2312
571     2               2087.5
581     3               3456.3333
582     13              2135.3076
582     1               3876
581     1               2424
576     1               3061
583     1               1534
583     3               2810
577     13              1042.7692
576     4               756.3875
______________________________________________
R-help@r-project.org 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.

Reply via email to