[R] contour

Eik Vettorazzi E.Vettorazzi at uke.de
Wed Jul 18 12:52:44 CEST 2012


Hi Akhil,
in addition to Rui's post, here is a solution using lattice graphics.

tmp<-read.table(textConnection("x1 x2 x3
0   1    2
0   2    1
0   3    5
1   1    4
1   2    2
1   3    3"),header=T)

library(lattice)
contourplot(x3~x1*x2,tmp)

hth.

Am 18.07.2012 11:23, schrieb Akhil dua:
> Hello Everyone
> 
> I have the data long format and I want to draw the contour plot with it
> 
> x1 x2 x3
> 0   1    2
> 0   2    1
> 0   3    5
> 1   1    4
> 1   2    2
> 1   3    3
> 
> 
> when I am using contour(x1,x2,x3,col=heat.colors) or fill.contour
> its giving me an error that increasing x and y expected
> 
> 
> So please tell me what is the right function to draw contour when the data
> is not ordered and you cant order it.
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.
> 


-- 
Eik Vettorazzi

Department of Medical Biometry and Epidemiology
University Medical Center Hamburg-Eppendorf

Martinistr. 52
20246 Hamburg

T ++49/40/7410-58243
F ++49/40/7410-57790

--
Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg

Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus 



More information about the R-help mailing list