Displaying 20 results from an estimated 8000 matches similar to: "R demos"
2007 Feb 09
3
two perspective plots in in plot
Dear all,
I would like to put two perspective plots into one plot. The help page
for ?persp shows how one can add points and lines but not another
perspective plot.
data(volcano)
z <- 2 * volcano # Exaggerate the relief
x <- 10 * (1:nrow(z)) # 10 meter spacing (S to N)
y <- 10 * (1:ncol(z)) # 10 meter spacing (E to W)
## Don't draw the grid lines : border = NA
persp(x,
2009 Mar 14
4
persp plot + plotting grid lines
Dear all;
Does anyone know how to add grid lines to a persp plot? I've tried
using lines(trans3d..) but the lines of course are superimposed into
the actual 3d surface and what I need is something like the plot shown
in the following link:
http://thermal.gg.utah.edu/tutorials/matlab/matlab_tutorial.html
I'll appreciate any ideas
Thanks
PM
2006 Jun 10
1
Math symbols for labels in Perspective plots
Hi ..
I would like to have math symbols in perspective plots
i tried : persp(x,y,z,xlab=expression(phi))
but it plots it as phi.
Thanks.
Harsh
__________________________________________________
[[alternative HTML version deleted]]
2010 May 26
1
persp(); help with 'tck' option
Hi All,
I'm using 'tck' option to *reduce* the length of tick marks but it is not
working, can anyone please tell me where I'm going wrong...
require(graphics)
require(grDevices)
x <- seq(-10, 10, length= 30)
y <- x
f <- function(x,y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r }
z <- outer(x, y, f)
z[is.na(z)] <- 1
# 'bg' works but 'tck' is not showing
2007 Sep 10
1
persp() problem
I am having some trouble getting the persp() package to change the x
and y axis on a 3d plot. It defaults to the [0,1] interval and when I
try to change it I get errors.
Example:
This works:
------------
D <- c(1,2,3,4,5,6,7,8,9,10)
M <- c(11,12,13,14,15,16,17,18,19,20)
DM <- cbind(D,M)
persp(DM, theta = 40, phi = 30, expand = 0.5, col = "lightblue",
ltheta = 120,
2001 Sep 19
5
3d images
Hi,
The screenshots page of the R-project contains nice 3d images: "3d plot
of a surface" and "image and 3d plot of a volcano".
What packages were used to generate these images?
Or
What packages have 3d plotting capabilities?
thanks
pawel
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2003 Sep 20
4
persp graphs
Hi,
I am doing my way on R, with much experimenting. So, I am trying to plot a 3d
graphic ussing "persp" and entering a data set (attached) of UTM coordinates
as x,y and a pH values as z. However when I try an error message comes out
telling that increasing x and y values are expected. Jus ordering the first
vector does not help, and, of course, order the first two independently
2017 Oct 19
1
overlaying points and lines on a surface3d rgl plot with axes
Hi R users and experts,
I am interested in learning more about the use of 3D plots. Specifically, I
want to add points and lines to a surface plot. And get the axes and labels
plotted also. Here is what I have tried with an example data set :
library(rgl)
vol2 <- 2*volcano # Exaggerate the relief
library(reshape)
mvol2 <- melt(vol2)
str(mvol2)
# First, persp and persp3d plots do not succeed
2003 Sep 15
2
Persp and color
How can I control de "wrap-around" color behaviour in the persp
function ?
I am using something like :
persp(bb[1:100,2:97], col= rainbow(8,start=0.1, end=0.8)))
Depending on the rainbow length value I get several "wrap-around" blocks of
the selected color range...something that I wanted to avoid...
My idea is to use the color in order to make a separation from a
certain
2011 Mar 29
1
Dirichlet surface
Dear list members,
I want to draw surfaces of Dirichlet distributions with different
parameter settings.
My code is the following:
#<begin code>
a1 <- a2 <- a3 <- 2
#a2 <- .5
#a3 <- .5
x1 <- x2 <- seq(0.01, .99, by=.01)
f <- function(x1, x2){
term1 <- gamma(a1+a2+a3)/(gamma(a1)*gamma(a2)*gamma(a3))
term2 <- x1^(a1-1)*x2^(a2-1)*(1-x1-x2)^(a3-1)
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives
demonstrations on what can be done using R? I downloadedR Langauage
definition and An introduction to R but haven't found them overly useful.
I'd really like to be able to follow some tutorials using a dataset or many
datasets. The datasets I have available on R are
Data sets in package 'datasets':
2001 Feb 12
1
3d plots?
Hi all
I'm trying to create a three-dimensional wireframe-type plot,
much like the screenshot shown at
http://www.r-project.org/screenshots/volcano-persp.jpg
In my case, I'm trying to show a density estimate of
two-variable system, using the GenKern package. I've
used the image() and contour() to create a nice shaded plot,
but I've found a 3d plot is often easier for the
2008 Jun 12
1
Problems with mars in R in the case of nonlinear functions
Hi,
I'm trying to use mars function in R to interpolate nonlinear
multivariate functions.
However, it seems that mars gives me a fit which uses only very few
basis function and
it underfits very badly.
For example, I have tried the following code to test mars:
require("mda")
f <- function(x,y) { x^2-y^2 };
#f <- function(x,y) { x+2*y };
# Grid
x <-
1998 Jan 07
1
R-beta: image
Questions on image:
1) How can I put labels on the x and y axes?
2) How to tell it to use e.g. 32 grey levels (not some colour map)?
3) How to know what the legend is (i.e. each grey level = what z value)?
Thanks very much for any help.
BTW I was wondering if persp was on the To Do list. That would be great!
Bill Simpson
2004 Aug 10
1
persp, array and colors
Dear R-users,
I'd like to plot a three-dimensional surface and at the meantime I'm using
an array. I would like to have the values of my first matrix in the heights
of the plot and the colors of the single facet taking into account the
second matrix.
I hope that the next code will help all of you to understand better my
issue,
Thanks in advance, Giancarlo
############################
##
2006 May 26
2
Is there a way to draw 3d plot?
Hi all,
I have a 2D matrix, which has 100 rows, and 100 columns,
I have a 2D matrix, with 100 rows and 100 columns,
I want to display it using 3D plot, much like plot3d and mesh/surf functions
in matlab.
Specifically, in matlab, I just need to do the following:
--------
[X, Y]=meshgrid([0:0.01:0.99, 0:0.01:0.99]);
% Z is my 2D matrix,
surf(X, Y, Z);
--------
Note that X and Y are created so
2009 Mar 27
1
interactive image graphic
Dear All
I want to plot a kind of figures, which can interactive with user.
For example, i have a matirx which can be showed by image function.
i.e. we can compare the value depend on different colors.
However, the change of colors depend on the range of value.
Nowaday, i want to set a bar, which can be moved by user such that the
user can obtain the appropriate range.
Does anyone suggest me which
2008 Apr 30
2
Summary statistics across factor levels
R users,
I intention is to calculate some summary statistics across factor
levels. I know that in Hmisc package there is a summary function which
produces neat summary statistics when using "cross" option. I would
like to produce similar output with N and Missing columns but produce
a data.frame. Is there any built-in function for that?
#example data
install.packages("Hmisc")
2010 Apr 28
1
What is the best way to plots surfaces in 3 dimensions?
Hi R help,
What is the best way to plots surfaces in 3 dimensions?
I also have the following availability problem with "plot3d" and "scatterplot3d", and "wireframe":
install.packages("scatterplot3d")
Warning: unable to access index for repository http://cran.ch.r-project.org/bin/macosx/leopard/contrib/2.10
Warning message:
In getDependencies(pkgs,
2008 May 20
1
drawing lines in 3D (rotating them)
Hi the list,
I write a short function to draw lines in 3D, showing then turning.
At some point, I add "delais" to slow down the rotation.
So two questions:
1) I try to find a library to draw animate lines in 3D but I did not
find. That surprise me since it is very simple to do. Did I forget to
look somewhere ?
If it does not exists and I have to use my own function :
2) Is it