Displaying 20 results from an estimated 2000 matches similar to: "Adding reference line or plane to cloud or wireframe"
2012 Jul 31
2
drawing a specific "plane" with scatterplot3d
Dear All,
using the example from the package scatterplot3d I created a 3d plot as follows:
x <-rnorm(500,50,2)
y <-rnorm(500,5,1)
z <-rnorm(500,6,1)
scatterplot3d(x, y, z, highlight.3d=TRUE, col.axis="blue",col.grid="lightblue", main="scatterplot3d - 1", pch=20)
I would like to ask if anyone could help me with the following:
1. I would like to draw a
2009 Jul 24
1
Conditional sorting
Greetings!
I am trying to figure out how to order a data frame by one variable
conditioned on another.
Here is an example of what I have:
d <- data.frame(RUN = rep(1:3, each = 3), ID = 1:9, AUC =
runif(9,1,100))
> d
RUN ID AUC
1 1 70.2
1 2 86.5
1 3 20.1
2 4 74.3
2 5 53.6
2 6 67.6
3 7 99.9
3 8 47.3
3 9 41.3
2004 May 07
1
plotting planes and lines in wireframe()
Hi R-helpers
I would like to plot some planes which are perpendicular to the x-y
plane, such as x=y. Is there a way to do this in wireframe? I realize
that I am not plotting a function of x, y since there are infinite
number of z's that satisfy the above relation.... Hmm...
Somewhat related, I would also like to plot a line in 3 d space...
Finally, if you are feeling really brave, I
2008 Sep 30
0
adding planes/lines to 3d surface plots? (persp, wireframe)
Dear helplist members,
I have been using 'wireframe()' to make 3d plots using the following call:
wireframe (temp ~ xc2 * mc2, screen = list(z = 230, x = -70, y = 0),
scales = list (arrows = FALSE))
and these three vectors:
xc2 mc2 temp
[1,] 0.1 0.04 0.049797615
[2,] 0.2 0.04 0.049161159
[3,] 0.3 0.04 0.048006702
[4,] 0.4 0.04 0.046208311
[5,] 0.5 0.04
2011 Feb 23
1
lattice.wireframe missing wireframe
Hello Everyone,
I am using R ver. 2.10.1 (2009-12-14). I installed lattice today via install.packages.
I am doing this minimal example:
M = read.csv("/path/to/csv")
cloud(x ~ y * z, data = M)
this correctly gives me a scatterplot of the csv data which has 3 columns. Every column contains 1800 numeric 0 < values < 1300
when I want to plot the corresponding wireframe via
2011 Mar 04
1
lattice: wireframe "eats up" points; how to make points on wireframe visible?
Dear expeRts,
I would like to add two points to a wireframe plot. The points have (x,y,z) coordinates
where z is determined to be on the wireframe [same z-value]. Now something strange
happens. One point is perfectly plotted, the other isn't shown at all. It only
appears if I move it upwards in z-direction by adding a positive number. So somehow
it disappears in the wireframe-surface
2012 Nov 22
1
[lattice] Increase distance between tick labels and ticks in wireframe plot ("pad")
Hello,
I try to increase the distance between tick labels and ticks in a lattice wireframe plot. Here's a minimal example:
## Minimal example
x <- y <- z <- c(1,2,3)
df <- data.frame(x, y, z)
wireframe(z ~ x*y, df, scales = list(arrows = FALSE, col = "black", font = 1, tck=0.6))
I tried the axis.components option
2007 Sep 26
1
add points to wireframe
Hello
R-classicist won't like the following question due to there's no minimal reproducible example and the question was posted already.
Anyway I'm not able understand this rather complicated version of "add points to wireframe".
what I have is matrix 3x2000 with a dem<-(x,y,z, coordinates) (not provided).
with follwing code I want to produce the wireframe and add some
2007 Dec 20
2
plot3d, wireframe, persp help
Hello,
I am trying to get a surface plot of a data set that looks like the following,
1 2 5.6
5 9 2.4
9 8 9.8
... to (60,000 rows down)
From my homework, the persp function only works with evenly spaced data points with the z data beeing in a matrix. my data is not in that format.
the wireframe fxn gives me an error,
no applicable method for "wireframe"
the
2009 Jun 24
1
lattice wireframe within a loop ???
Hi,
I have the following problem. Calling wireframe within a loop results
into an empty window(s)
#generate some data
temp = expand.grid(A = 1:3,B = 1:3)
temp = cbind(temp, y1 = rnorm(9))
temp = cbind(temp, y2 = runif(9))
#plot y1 and y2 in two different windows
for(i in 1:2)
{
wireframe(y1 ~ A*B, temp, shade =T)
windows()
wireframe(y2 ~ A*B, temp, shade =T)
}
#However, calling it twice
2006 Oct 25
1
cloud() works but wireframe() is blank
Per the message from Alexander Nervedi, 29 April 2006:
> I have to be making a riddiculously silly ommission.
> when I run the fillowing i get the cloud plot ok. But I cant figure
> out what I am missing out when I call wireframe.
> Any help would be appreciated.
> x<-runif(100)
> y<-rnorm(100)
> z<-runif(100)
> temp <-data.frame(x,y,z)
>
2009 Aug 18
1
adding points to a wireframe
A quick question. I'm trying to plot a surface from a fitted model
along with the original points, as in the following example:
df<-data.frame(expand.grid(100*runif(1:100), 100*runif(1:100)))
df$Var3<-rnorm(length(df$Var1), mean=df$Var1*df$Var2, sd=10)
my.lm<-lm(Var3 ~ Var1*Var2, data=df)
my.fun<-function(x,y) predict(my.lm, data.frame(Var1=x, Var2=y),
2010 Apr 20
1
3D surface plot with wireframe or persp?
Hello Dear,
I have a function, like z=f(x,y), and try a surface plot with this function.
But, on the reference of "wireframe" requires data option, so I generated x
and y, and computed z with them. But, still I have a problem to draw a
surface plot. The code and errors are
##################################################
mle_beta0=64.43707;
mle_beta1=-24365.16;
# generating for
2006 Feb 08
1
empty wireframe
Perhaps I am missing something incredibly basic, but I can't get the
wireframe function to plot anything other than an empty graph with
axes (and the correct scale). Cloud() works just fine, as does
scatterplot3d(), and wireframe() works fine for other data sets I
have. Are there some data sets that can't be plotted with
wireframe()? If so, what are the characteristics that prevent
2006 May 08
1
persp or wireframe 3D plot: how can I independently adjust linewidth of the 'surface' and framebox?
It is a trivial matter to adjust the linewidth of the axes and plot
line in a 2D plot:
x <- 1:10;
y <- 1:10;
par(lwd=2); # axis (and others) linewidth
plot(x,y,"l",lwd=6); # plot linewidth
Is there anything comparable to this for persp or wireframe? I've
tried a number of ways, and the framebox/axes seem to be linked to
the linewidth used in generating the
2007 Jul 06
1
Changing Tick Mark Values for lattice / wireframe
How can I change the tick mark values in lattice, specifically wireframe?
I have a 11*46 matrix of values that I am plotting using wireframe.
Unfortunely, the values range from 0.1-1.1 and 0.5-5. Using the code
below the tick marks have are (2,4,6,8,10) and (10,20,30,40).
Thanks in advance.
graphic5 <- wireframe(output.matrix, shade= TRUE,
scales = list(arrows = FALSE,
cex=.6,
2008 Nov 06
3
wireframe
I've been using lattice/wireframe succesfully to visualize some data.
I have one question.
I want to be able to change the viewpoint ( i.e. rotate the plotted
figure a bit left or right or up and down )
Is there a way to do that?
Or is there some other package around that could help?
Thanks.
2009 May 17
2
wireframe 3-D problems
Dear All R Users,
I am trying to graph a 3-D graph of simulated data for logit models using
the powerful wireframe command, but I got stuck. Here are the codes:
x <- seq(-4, 4, by=0.01)
y <- seq(-4, 4, by=0.01)
p <- 1/(1+exp(-0.12*x + 0.35*y))
mydata <- cbind(x, y, p)
require(lattice)
wireframe(p~x*y, data=mydata)
and I received the following message:
Error in
2012 May 07
1
wireframe and par(mfrow)
Hello List,
I have some plots with the wireframe() function, and I'd like to
display them in a single jpeg file. I know that par(mfrow=c(x,y)) will
divide my display window in x rows and y columns, and although this
works with plot(), it looks like it's not working with wireframe.
here's my code:
library(lattice)
library(Cairo)
CairoJPEG("wiley-rank.jpeg", width=960,
2009 Mar 04
2
lattice: remove box around a wireframe
#Hi,
#
#somebody knows how to remove the outer box around a wireframe and
reduce the height
#
#
test = data.frame(expand.grid(c(1:10), c(1:10)))
z = test[,1] + test[,2]
test = cbind(test, z)
names(test) = c("x", "y", "z")
require(lattice)
wireframe(z ~ x*y, data = test, par.box = c(col = "transparent") ) #not
this one but the remaining outer box.