search for: xlabels

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

Did you mean: labels
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&quo...
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 &qu...
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
Hi Hadley and everyone, here's a patch for ggplot2 that fixes the behavior of opts(legend.position={left,top,bottom}). If you try the following code in an unmodified ggplot2 options(warn = -1) suppressPackageStartupMessages(library("ggplot2")) data <- data.frame( x = c(1, 2, 3, 4, 5, 6), y = c(2, 3, 4, 3, 4, 5), colour = c(TRUE, TRUE, TRUE, FALSE, FALSE, FALSE))
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
I am currently trying to use R to construct a regression model to explain output based on temperature. I have combined my output and temp data into a notepad file. there is no problem with loading the data into R. > data.df output temp 1 850 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
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 molestias...
2008 Apr 22
1
plot(x) in 2.7.0 (with y=NULL) proposed code correction
Hi all: following the previous discussion, it looks like plot(x) with y=NULL still does not work correctly. If one tries for example plot(1:5) it works, but already for plot(runif(100)) it does not. I posted the proposed correction for plot.POSIXct and plot.POSIXlt before. Please voice your opinions whether the following fix for plot.default could be reasonable? I include the full function and
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 t...
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 adjunta...
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,
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
I don't usually do 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
2008 Mar 09
2
[patch] add=TRUE in plot.default()
Hi all, As long as I've used R, add=TRUE hasn't worked in contexts like this: f <- function(x) x^2 X <- seq(0, 1, by=1/4) plot(f, col="blue") plot(X, f(X), col="red", type="l", add=TRUE) I attached a fix for version 2.6.2. Cheers, Andrew -------------- next part -------------- diff --git a/src/library/graphics/R/plot.R