similar to: persp(), x- and y-axis with character strings

Displaying 20 results from an estimated 500 matches similar to: "persp(), x- and y-axis with character strings"

2005 Feb 01
0
persp plots axis tick-labels
Hi R-listers, I am having trouble with persp plotting and I hope some knowledgeable person can help me. I have searched the help files to no avail. I am sure there is a way of achieving this simple task. I thought in par maybe but that seems not to work for 3d plots. Maybe I have missed something. I read in ?persp that it expects increasing values for both my x and y axes, and a matrix
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)
2012 Nov 05
0
slider control questions
DeaR UseRs, I have the following code (see below). It is working as expected although I have two problems/questions: - how can I set the size of the graph? It may sound silly, but I couldnt figure that out - is it possible to export this small "interactive aplication" to html or a latex document, or maybe pdf? Thank you for your attentions. Best wishes: Daniel the code:
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,
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 ############################ ##
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 Feb 14
0
environment confusion
I'm in a bit beyond my depth with environments and such. The environment of a particular function, which I've set so it should have the things it needs, seems to be getting "lost" at some point during a call sequence. It's hard to come up with a _simple_ reproducible example, although if anyone's sufficiently interested I can post the package somewhere -- with the
2006 Jun 15
1
Problem with Julian function
Dear all, I have a problem with the function Julian, may be a bug in the function ? Here is a vector of character, which represents dates (May 18 to May 20 2000): > amj <- c("2000-05-18","2000-05-18","2000-05-18","2000-05-19","2000-05-19" > ,"2000-05-19", "2000-05-19", "2000-05-20", "2000-05-20",
2004 Jun 14
4
Quirks with system.time and simulations
I tried the code that Richard O'Keefe posted last week, to wit: library(chron) ymd.to.POSIXlt <- function (y, m, d) as.POSIXlt(chron(julian(y=y, x=m, d=d))) n <- 100000 y <- sample(1970:2004, n, replace=TRUE) m <- sample(1:12, n, replace=TRUE) d <- sample(1:28, n, replace=TRUE) system.time(ymd.to.POSIXlt(y, m, d)) [1] 8.78 0.10
2009 Aug 21
2
gantt chart for dataset
hi, Thanks for responding of gantt charts. but i have some problem regarding with gantt charts. i.e. Ymd.format <- "%Y/%m/%d" Ymd <- function(x){ as.POSIXct(strptime(x, format=Ymd.format))} gantt.info <- list( labels =c("First task","Second task","Third task","Fourth task","Fifth task"), starts
2006 Nov 16
6
Gantt chart problem after upgrade to R 2.4.0
I am having a problem with a gantt chart since moving to R2.4.0. from 2.3.1 I made some adaptations to the code from http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=74 and successful produced a simple gantt chart. However when I upgraded to 2.4.0 it no longer works as desired. See http://ca.geocities.com/jrkrideau/R/gantproblem.pdf for the two charts. The charts were produced
2010 Feb 27
1
help with Gantt chart
Hi, I don't know to solve this error that is returned, even though I understand it: library(plotrix) Ymd.format<-"%Y/%m/%d" gantt.info<-list(labels= c("First task","Second task (1st part)","Third task (1st part)","Second task (2nd part)","Third task (2nd part)", "Fourt task","Fifth task","Sixth
2017 Jun 21
0
customizing color key with plot3D
Karline, Thank you for your help. I discovered that in addition to including clim, I needed to omit breaks. This code uses one of your other examples as a starting point and works as intended: persp3D(z = volcano, zlim = c(-60, 200), phi = 20, colkey = list(length = 0.2, width = 0.4, shift = 0.15, cex.axis = 0.8, cex.clab = 0.85), lighting = TRUE, lphi = 90, clab =
2014 Jul 17
3
FW: Selección eficiente de individuos
Hola, Otra forma, utilizando la función de intervalos y la que comprueba si otro intervalo se solapa del paquete "lubridate": #---------------------- library(lubridate) fe.chas <- data.frame( entra=c('2001-01-01','2001-06-01','2003-01-01') ,sale=c('2002-01-01','2002-06-01','2004-01-01') ) ref <-
2013 Dec 09
1
Plot mortality data and show trend
I have a mortality data over many years and I wish to plot the data and also add some smoother to clearly highlight the trend. How could I do that in R with base graphics or ggplot? I have the following sample data: require(lubridate) mdate<-seq(ymd('2000-01-01'),ymd('2010-12-31'), by = '1 day') death<- rnorm(4018, 80, 45) df<-cbind(mdate,death)
2010 Dec 08
1
possible bug in chron packages
Dear, According to the documentation, the parameters given in "dates" are passed to the function "chron". When trying this out, it turns out that this apparently doesn't happen, eg: > dates("20100101",format="Ymd",out.format="day mon year") [1] 01/01/10 > chron("20100101",format="Ymd",out.format="day mon
2004 Feb 23
6
Need help on parsing dates
I know this: > library(date) > x="1979-04-04" > try=as.date(x, "ymd") > print(try) [1] 4Apr79 and that `x' here has to be a string, e.g.: > x=1979-04-04 > print(x) [1] 1971 I'm stuck in reading from a file. I say: > A <- read.table(file="try") > print(A) V1 V2 1 1979-04-04
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 <-
2007 Mar 12
1
timeDate & business day
I have a daily time series and have two questions to get some help with. Firs,t I have dates in simple numeric values. e.g. ymd [1] 20050104 20050105 20050106 20050107 20050110 20050111 20050113 20050114 [9] 20050118 20050120 20050121 20050124 20050125 20050126 20050127 20050128 [17] 20050201 20050202 20050203 20050204 Now, I'd like to compute statistics, e.g. acf, by business days. So, I
2003 Feb 04
1
Background color of plot
I'm using the parameters "mfrow" and "mfg" to display some graphics(plots) at the same time. Although, because of the parameter "mfg", the parameter "bg" don´t change the background color. What can I do to solve this? Here is the code I'm using... ... i <- 1 for(j in 1:4){ for(k in 1:2){ limiares <-