search for: xlabel

Displaying 20 results from an estimated 141 matches for "xlabel".

Did you mean: label
2011 Jun 09
2
scatterplot3d - help assign colors based on multiple conditions
...to assign "red" to all the values whose first column and second column contain "Anterior_nares" and assign black to any other combination. Thanks! Karthik library(scatterplot3d) chd1=read.table(file="test.out", header=F, sep="\t") col=as.vector(chd1[,1]) xlabels=as.vector(chd1[,1]) ylabels=as.vector(chd1[,2]) mycols<-c("red","blue","green","chocolate","orange", "brown") col[grep("_Stool", xlabels) ]<-mycols[1] #col[grep("_Stool", xlabels) && grep("_Stool&qu...
2002 Mar 21
3
plot question
...100; plot(x,testone,type="l",xlab="",ylab="",main="",lty=4,axes=FALSE,ylim=c(-1.0,1.0),cex=1); par(new=TRUE); plot(z,testtwo,type="l",xlab="",ylab="",main="",lty=1,col="red",axes=FALSE,ylim=c(-1.0,1.0),cex=1); xlabels<-x*10; axis(1,1:100,xlabels); axis(2); box(); -- myriam -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or &q...
2017 Jun 15
2
duplicated factor labels.
...bout this for a while. I am sorry to ask for your time, but can one of you help me understand this? This concerns duplicated labels, not levels, in the factor function. I think it is hard to understand that factor() fails, but levels() after does not > x <- 1:6 > xlevels <- 1:6 > xlabels <- c(1, NA, NA, 4, 4, 4) > y <- factor(x, levels = xlevels, labels = xlabels) Error in `levels<-`(`*tmp*`, value = if (nl == nL) as.character(labels) else paste0(labels, : factor level [3] is duplicated > y <- factor(x, levels = xlevels) > levels(y) <- xlabels > y [1]...
2014 Jun 13
2
no x label using axis.Date
I have tried multiple different methods to figure out how to get a date axis of my preference (start date of each month). Any assistance would be appreciated. The below section is not producing a date axis: plot(totaldays$totaldays,totaldays$y,type="n",ylim=c(0,Emax),xaxt="n") *xlabels<-(strptime(totaldays$totaldays,"%Y-%m-%d",tz="")) xlabels<-xlabels[xlabels$mday==1] axis.Date(1,at=xlabels,format="%b-%Y")* The above section is used in the following plot: par(mfrow=c(4,1)) par(mar=c(0.8,0,0,0)) par(oma=c(2,4.5,3,2)) plot(totaldays$totaldays...
2010 Jun 07
1
Patch for legend.position={left,top,bottom} in ggplot2
...00000000 +0200 +++ ggplot2 2010-06-07 15:22:33.000000000 +0200 @@ -7003,27 +7003,27 @@ ) } else if (position == "left") { viewports <- vpList( - vp("panels", 2, 3), - vp("legend_box", 2, 1), - vp("ylabel", 2, 2), - vp("xlabel", 3, 3), - vp("title", 1, 3) + vp("panels", 3, 4), + vp("legend_box", 3, 2), + vp("ylabel", 3, 3), + vp("xlabel", 4, 4), + vp("title", 2, 4) ) } else if (position == "top") { viewpo...
2008 Oct 27
1
Problem with script
...random_sq]] == : missing value where TRUE/FALSE needed the script is this: # ______________ # ----- Define a function for plotting a matrix ----- # myImagePlot <- function(x, ...){ min <- min(x) max <- max(x) yLabels <- rownames(x) xLabels <- colnames(x) title <-c() # check for additional function arguments if( length(list(...)) ){ Lst <- list(...) if( !is.null(Lst$zlim) ){ min <- Lst$zlim[1] max <- Lst$zlim[2] } if( !is.null(Lst$yLabels) ){...
2005 Oct 03
1
Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ
...17 2 849 17 3 905 17 4 925 17 5 1043 19 6 1104 20 7 1097 18 8 979 19 9 926 18 10 1133 18 ~~ ~~ 240 1124 12 241 1344 12 242 1375 11 243 1359 12 but when I try to plot the data I keep getting this error: > plot(temp,output) Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ any advice on how to over come this error would be greatly appreciated. Cheers, Robbie. [[alternative HTML version deleted]]
2014 Sep 08
3
problema con los cambios de marcas temporales en el eje X
...en "strings". Mira si esto es lo que buscabas... #--------------------------- datIn <- read.csv("Libro1.csv", header=T, sep=";", dec=",") library(lubridate) datIn$mes <- month(dmy(datIn$fecha), label=T, abbr=T) datIn$anio <- year(dmy(datIn$fecha)) xlabels <- paste(datIn$mes,"-",datIn$anio,sep="") par(oma=c(4,2,1,1)) plot(datIn$xbar, axes=F, type="b", pch=19, ylim=c(400,650), xlab="", ylab="xbar") axis(1,at=1:length(datIn$xbar), labels=xlabels,cex.lab=0.5, las=2) axis(2) box() datIn$xorig <...
2010 Nov 25
3
moving xlabels in lattice
Dear R users, I am trying to move the "xlab" string on my xyplot, without success, I would like it to shifted down, would one of you know a way ? Thanks for reading Colin -- View this message in context: http://r.789695.n4.nabble.com/moving-xlabels-in-lattice-tp3059092p3059092.html Sent from the R help mailing list archive at Nabble.com.
2014 Sep 08
3
problema con los cambios de marcas temporales en el eje X
...a de nuevo, acabo de encontrar la solución. He creado una variable ficticia con los días 1 de cada mes en la secuencia temporal que quería y después he actuado de la siguiente manera attach(Libro1) plot (xbar~as.Date(fecha,"%d/%m/%y"), type="b", pch=19,cex=2,xaxt="n") xlabels<-strptime(ofeje, format = "%d/%m/%y") axis.Date(1, at=xlabels[xlabels$mday==1], format="%b-%y") El resultado se plasma en la grafica adjunta, por si alguien está interesado también envío la base de datos con la variable ficticia. Muchas gracias y disculpas por las molestia...
2008 Apr 22
1
plot(x) in 2.7.0 (with y=NULL) proposed code correction
......) localBox <- function(..., col, bg, pch, cex, lty, lwd) box(...) localWindow <- function(..., col, bg, pch, cex, lty, lwd) plot.window(...) localTitle <- function(..., col, bg, pch, cex, lty, lwd) title(...) if (!is.null(y)) { ## normal plot x against y xlabel <- if (!missing(x)) deparse(substitute(x)) ylabel <- deparse(substitute(y)) xy <- xy.coords(x, y, xlabel, ylabel, log) xlab <- if (is.null(xlab)) xy$xlab else xlab ylab <- if (is.null(ylab)) xy$ylab else ylab xlim <- if (is.null(xlim)) range...
2007 Jan 10
0
axis labels at subset of tick marks
...9;B','C','D','E','F','G','H','I','J') axis(2, at=1:10, labels=ylabels, las=HORIZONTAL<-1) # adding arbitrary categorical labels to x-axis, # for every nth category; first add tick marks, # then the labels axis(1, at=1:10, FALSE) xlabels=c('A','','C','','E','','G','','I','') # this is length=10 axis(1, at=1:10, labels=xlabels) This works, but when using axis, the 'at=1:10' and the length(xlabels) must be the same length. Is it ever possible...
2007 Apr 15
1
Expression for pedices
I know that this maybe a trivial question. I am not able to plot pedices in graph axes. Instead I am able to plot different math symbols : XLABEL <- expression(paste(cmH,lim(f(x), x %->% 0),"O PEEP")) works well XLABEL <- expression(paste(cmH,[2],"O PEEP")) is considered a wrong expression. Thanks
2012 Feb 23
1
multhist weird behavior/ xlabels wrong
Hi, I found some weird behavior of the function multhist in the plotrix package and I would like to ask you about it: so, it works well to put two histograms next to each other, but I don't understand the breaks… so for example, library(plotrix) mh <- list(rnorm(200, mean=100, sd=10), rnorm(200, mean=100, sd=10)) multhist(mh) #produces a plot with
2017 Jun 15
0
duplicated factor labels.
...time, but can one of you help me understand this? > This concerns duplicated labels, not levels, in the factor function. > I think it is hard to understand that factor() fails, but levels() > after does not >> x <- 1:6 >> xlevels <- 1:6 >> xlabels <- c(1, NA, NA, 4, 4, 4) >> y <- factor(x, levels = xlevels, labels = xlabels) > Error in `levels<-`(`*tmp*`, value = if (nl == nL) > as.character(labels) else paste0(labels, : > factor level [3] is duplicated >> y <- factor(x, levels = xlevels...
2014 Sep 08
2
problema con los cambios de marcas temporales en el eje X
Muchas gracias Carlos, previo a mi correo, entre las pruebas que hice estaba una parecida a la que apuntas de la siguiente manera: attach (Libro1) plot (xbar~as.Date(fechas,"%d/%m/%y"), ylim=c(400,660), xaxt="n", type="b", pch=19,cex=1) xlabels<-strptime(fecha,format="%d/%m/%Y") axis.Date (1,at=xlabels,format="%b-%y") arrows(x0=as.Date(fechas,"%d/%m/%y"),y0=lci, x1=as.Date(fechas,"%d/%m/%y"),y1=lcs,angle=90,code=3,length=.1) Pero esta me saca las etiquetas que yo tengo (ver grafica adjunt...
2004 May 06
1
plot(hist.default(1:10,plot=F)) error.
Hi! How to find out which plot function is used when i call plot(hist.default(1:10,plot=F)) and all works fine ? The reason why I would like to know it is that after loading some self written R functions > plot(hist.default(1:10,plot=F)) Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ > traceback() 5: stop("x and y lengths differ") 4: xy.coords(x, y, xlabel, ylabel, log) 3: plot.default(hist.default(1:10, plot = F)) 2: plot(hist.default(1:10, plot = F)) 1: plot(hist.default(1:10, plot = F)) gives an error. It seems that inste...
2005 Nov 15
2
y-axis in histograms
Dear R- list, I have some data to present with histograms. Therefore I used hist(...). I have few values with almost 80% of the frequencies (totaly 800) and some other values with low frequencies ( totaly 5 -10 ) that I want to emphasize. Therefore I want to "cut" the y-axis on 100, but I don't know how to deal with this. Thanks in advance, Michael Graber
2011 Jul 25
1
Trouble with line of best fit
...much with graphs in R, and this is my first time adding a line of best fit. Hopefully this is an easy problem to solve. I'm looking at a variable called soloKills along the range 5:28. Here are all my commands, in script form: range=5:28 graph=soloKills title="Solo kill/death data" xlabel="Number of deaths/1 game" ylabel="Mean number of kills/1 game" #No problems with the scatterplot plot(x=range, y=graph, main=title, xlab=xlabel, ylab=ylabel, ylim=c(0,20)) abline(lm(range~graph)) I checked several websites, the abline(lm(/x-variable/~/y-variable/)) format...
2008 Mar 09
2
[patch] add=TRUE in plot.default()
...log = "", main = NULL, sub = NULL, xlab = NULL, ylab = NULL, ann = par("ann"), axes = TRUE, frame.plot = axes, - panel.first = NULL, panel.last = NULL, asp = NA, ...) + panel.first = NULL, panel.last = NULL, asp = NA, add=FALSE, ...) { + xlabel <- if (!missing(x)) deparse(substitute(x)) + ylabel <- if (!missing(y)) deparse(substitute(y)) + if (add) { + log <- paste(ifelse(unlist(par("xlog", "ylog")), c("x", "y"), ""), + collapse="") + xy <- xy.coords(x, y,...