zhijie zhang
2006-Nov-07 10:36 UTC
[R] plot questions?-errors in persp(x1, x2, y) and contour(x1, x2, y)
Dear Uwe Ligges ,
I still can't finish it.
*> aa* #my data
x1 x2 y
5 0.05 6 4.4180
1 0.50 3 2.6979
4 0.50 9 2.9000
7 0.95 6 2.6230
8 0.95 6 2.9078
9 0.95 6 2.6727
3 1.40 3 2.4203
2 1.40 9 2.5329
6 1.85 6 2.4867
*> attach(aa)*
*> persp(x1,x2,y*
error in persp.default(x1, x2, y) : increasing 'x' and 'y'
values expected
*> contour(x1,x2,y)*
error in contour.default(x1, x2, y) : increasing 'x' and 'y'
values expected
What's the problem? And could u recommend a book for me?
Thanks again.
On 11/7/06, Uwe Ligges <ligges@statistik.uni-dortmund.de>
wrote:>
>
>
> zhijie zhang wrote:
> > Dear Rusers,
> > I want to know which function in R can perform the following tasks:
> > 1.surface-data grid(x,y,z) #which could be done in splus, the name
was
> from
> > splus's options of graph
> > 2. contourplot(x,y,z) #which could be done in splus
> > By the way, where can i find some useful materials to learn to plot
> > 3-dimensionel graphs?
> > Thanks!
> >
>
> 1. persp()
> 2. contour()
> 3. E.g., look into a good book about R.
>
> Uwe Ligges
>
--
With Kind Regards,
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
[***********************************************************************]
Zhi Jie,Zhang ,PHD
Tel:86-21-54237149 epistat@gmail.com
Dept. of Epidemiology,school of public health,Fudan University
Address:No. 138 Yi Xue Yuan Road,Shanghai,China
Postcode:200032
[***********************************************************************]
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::
:::::::::::::
[[alternative HTML version deleted]]
Uwe Ligges
2006-Nov-07 10:50 UTC
[R] plot questions?-errors in persp(x1, x2, y) and contour(x1, x2, y)
zhijie zhang wrote:> Dear Uwe Ligges , > I still can't finish it. > *> aa* #my data > x1 x2 y > 5 0.05 6 4.4180 > 1 0.50 3 2.6979 > 4 0.50 9 2.9000 > 7 0.95 6 2.6230 > 8 0.95 6 2.9078 > 9 0.95 6 2.6727 > 3 1.40 3 2.4203 > 2 1.40 9 2.5329 > 6 1.85 6 2.4867 > *> attach(aa)* > *> persp(x1,x2,y* > error in persp.default(x1, x2, y) : increasing 'x' and 'y' values expected > *> contour(x1,x2,y)* > error in contour.default(x1, x2, y) : increasing 'x' and 'y' values > expected > What's the problem? And could u recommend a book for me? > Thanks again.Well, your x and y coordinates must be equidistant and z a corresponding matrix. Please read the help files. If you cannot provide this data, a grid seems inappropriate. For a book: Paul Murrell wrote some nice book about "R Graphics". Uwe Ligges> > On 11/7/06, Uwe Ligges <ligges at statistik.uni-dortmund.de> wrote: >> >> >> >> zhijie zhang wrote: >> > Dear Rusers, >> > I want to know which function in R can perform the following tasks: >> > 1.surface-data grid(x,y,z) #which could be done in splus, the name was >> from >> > splus's options of graph >> > 2. contourplot(x,y,z) #which could be done in splus >> > By the way, where can i find some useful materials to learn to plot >> > 3-dimensionel graphs? >> > Thanks! >> > >> >> 1. persp() >> 2. contour() >> 3. E.g., look into a good book about R. >> >> Uwe Ligges >> > > >
Maybe Matching Threads
- plot questions?
- Indexing in anova summary output of the form: summary(aov(y ~ x1, Error = (x1/x2)))
- (Resolved) How to draw a line in plot when I know the start point(x1, y1) and end point(x2, y2)?
- how to qplot two x-axis x1:Farenheit x2:Celsius
- How to draw a line in plot when I know the start point(x1, y1) and end point(x2, y2)?