简体   繁体   中英

Wireframe plot with small values in R

I have data with very small values between -1 to 1 in X, Y and Z values between -1 to 1 like below

X,Y,Z
-0.858301,-1,1.00916
-0.929151,-1,1.0047
-0.896405,-0.940299,1.00396
-0.960967,-0.944075,1.00035

wireframe(Z~X+Y,data=sol)

Seems wireframe works only with larger values (1, 2, 3...) , How do I plot small values?

wireframe might be use in one of two ways -

With a rectangular data matrix where the values of x and y are implied by the shape of the matrix.

wireframe(matrix(rnorm(100),ncol=5),drape=TRUE)

Or with a dataframe, where the values of x and y are explicit, and here you can use a formula for the relationships between the columns.

df<-expand.grid(x = seq(0,.1,.01), y = seq(0,.1,.01))
df$z<-rnorm(121)
wireframe(z~x*y,data=df,drape=TRUE)

我发现,如果包含定义z轴极限的线,则不能将其绘制在1以下。但是,如果取出定义的轴极限,并让R对其本身作图,则可以工作,并且可以对图进行绘制。小数字。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM