search for: xlab

Displaying 20 results from an estimated 3485 matches for "xlab".

Did you mean: slab
2010 Apr 16
2
how to change the position of xlab in truehist?
Hi, I'm wondering how can I change the position of xlab in truehist. For example, the following code creats a histogram with 4 bins for my discrete data. I want each bin to be labelled as 0, 1, 2, or 3 in the middle, so that it's clear each bin corresponds to each of the discrete case. I was thinking of first delete xlab and then add marks myself,...
2012 Nov 19
3
Plot Area Dimensions
...ller than the others, as is the top plot which has larger margins. How can I get the plot region the same size for all 6 plots, whislt still having a large enough margin for the x-axis label on the bottom plot? y<-rnorm(1:100) x<-rnorm(1:100) par(mfrow=c(6,1)) par(mar=c(0,5,2,5)) plot(y~x, xlab="", xaxt="n", ylab="y") par(mar=c(0,5,0,5)) plot(y~x, xlab="", xaxt="n", ylab="y") plot(y~x, xlab="", xaxt="n", ylab="y") plot(y~x, xlab="", xaxt="n", ylab="y") plot(y~x, xlab=&qu...
2008 Jun 10
2
substitute() reading data instead of name
I seem to have run across a bug in which substitute() inside a function definition gets 'confused.' The code is listed below. The same behavior occurs under OSX 10.3.9, PPC, w/ R2.2 and Rgui 1.14 and under OSX 10.4.11 Intel w/ 2.70 and the latest Rgui. What I see is that 'xlab' properly has the name of the data I entered for the x-input. But 'ylab' contains the string ' c( {all the data values in the y-input vector}) ' . If I un-comment the 'cat(ylab)' line or the 'dreck<-y' line, or if I create yy<-y and use yy from there on...
2008 Jun 19
1
Setting the xlab for 'the other' (upper) X axis?
I would like to set the 'xlab' on the 'upper' x axis. The following code shows roughly what I want by way of (one possible) expected behaviour. par(mar=c(5.1, 4.1, 5.1, 2.1)) plot(rnorm(10), rnorm(10), xlab="the lower one") axis(3, xlab="the upper one????") There are various other ways that cou...
2009 Nov 24
4
Graphic Device - View/get all graphics
...is that I end up viewing just last graphic and in my FUNCTION there are 4 graphics with the PAR command function... Like those below... How do I view/get the other 3 graphics? Any help? Thanks in advance... histogram<-par(mfrow=c(1,2)) hist(rw_mean_app,main='Bootstrap Method RWOriginal',xlab='Mean',ylab=' ') hist(rwy_mean_app,main='Bootstrap Method RWY',xlab='Mean',ylab=' ') par(histogram) histogram<-par(mfrow=c(1,3)) hist(rw_median_app_ori,main='Bootstrap Method RWOriginal',xlab='Median',ylab=' ') hist(rw_median_app_m...
2001 Jul 03
2
How do one modify an expression?
I am using expressions to annotate x and y labels in plots. I start of with a label as xlab <- expression(X) Note that it is the user that sets this. It could also be something more complicated as expression(sqrt(R*G)). Can I easily add a log[2] "around" this expression? I would like to get xlab <- expression(log[2](X)) I basically know nothing about expressions. Tha...
2010 May 13
3
Multiple plots; single x(y) labels
Hi All, Can anyone please help me with getting a single x and y-axis label while plotting muliple plots. Here is the code: par(mfcol=c(2,2)) plot(x <- sort(rnorm(7)), type = "s", main = "", ylab="", xlab="") plot(x <- sort(rnorm(27)), type = "s", main = "", ylab="", xlab="") plot(x <- sort(rnorm(47)), type = "s", main = "", ylab="", xlab="") plot(x <- sort(rnorm(67)), type = "s", main = &quo...
2008 Dec 11
3
check if a certain ... argument has been passed on to my user-defined function
Hi, How can I check if a certain ... argument has been passed on to my user-defined function or not? foo <- function(data, ...) { ### here I want to check whether xlab was passed with the ... arguments ### or if the ... arguments did not contain an xlab argument } I tried missing(xlab) , exists(xlab) and several other things but did not find a solution. TIA, Mark
2010 Nov 08
2
Several lattice plots on one page
...var5 = c(10,20,30,40), var6 = c(0.001,0.002,0.003,0.004), var7 = c(123,223,123,412), var8 = c(213,123,234,435), all = as.factor(c(1,1,1,1))) pdf("test1.pdf", width=20, heigh=27, paper="a4") print(plot(groupedData(var1 ~ day | all, data = df), main = "var1", xlab="", ylab=""), split=c(1,1,2,4), more=TRUE) print(plot(groupedData(var2 ~ day | all, data = df), main = "var2", xlab="", ylab=""), split=c(1,2,2,4), more=TRUE) print(plot(groupedData(var3 ~ day | all, data = df), main = "var3", xlab...
2010 Jun 26
2
several common sub-axes within multiple plot area
...thing combined with the 'high level' plot() function? Or do i need to get specific with some low level commands (help!)? With big thanks in advance for any suggestions/examples. cheers, Karl #my example: dev.new() plot.new() par(mfrow=c(3,2)) #Graph 1: plot(rnorm(20), rnorm(20), xlab = "Results 1 (Int)", ylab = "Variable A", main = "Factor X") #Graph 2: plot(rnorm(20), rnorm(20), xlab = "Results 1 (Int)", ylab = "Variable A", main = "Factor Y") #Graph 3: plot(rnorm(20), rnorm(20), xl...
2000 Oct 03
1
captions for than one figure
Hi, I would like to have four plots plotted in the one figure and under each plot the caption (a) ... (d). Using mtext I can get so far: > plot(1:10, exp(1:10), log = "y", xlab = "xlab") > mtext("(a)",side=1,line=4.5) > plot(1:10, exp(1:10), log = "y", xlab = "xlab") > mtext("(b)",side=1,line=4.5) > plot(1:10, exp(1:10), log = "y", xlab = "xlab") > mtext("(c)",side=1,line=4.5...
2013 Feb 25
2
lattice: column titles using xlab.top in multipanel xyplot
Hi, I created a xyplot with a three-column layout. As suggested by Deepayan I tried to put titles to each column by using xlab.top. Unfortunately, as my y-axis scale relation = "free", the column titles are not centered at the three x axes anymore. Any idea how to center the titles? #Example: require(lattice) #require(latticeExtra) e <- data.frame(a = c(1:30), b = c(1:10, 20:29, 990:999), d =...
2011 Feb 08
5
Removing X and Y labels in graph error
Hello, had a quick search on the site but no luck. Heres my problem, when attempting to xlab = NULL and ylab = NULL it displays x[[1L]] and X[[2L]] as labels on the axis. plot(USSenate[,1:2],col=c("blue","grey","red")[unclass(USSenate$Senate)],pch=unclass(USSenate$Senate), type="n",xaxt="n", yaxt="n",main = NULL, sub = NULL, xl...
2011 Oct 07
1
modify "..." (optional args)
...onal arguments (...) passed to a function, so that these can be passed in modified form to a subsequent function call? I checked "Programming with Data" but could not find a solution there. What I'd like is something along these lines: test <- function(x,y,...) { if(!hasArg(xlab)) { ___add xlab to ...___ } if(hasArg(xlab)) { ___remove xlab from ...___ } # alternative plot(x,y,...) } Of course, I could use separate calls, like if(hasArg(xlab)) plot(x,y,...) else plot(x,y,xlab="label",...) but this gets complicated if there is more than one such case to...
2004 Jul 10
3
bug in xyplot xlab, etc (PR#7076)
...his looks to me like a bug in xyplot and friends. I anticipated that all three of these xyplot statements would work. This is based on the documentation line > The 'label' tag can be omitted if it is the first element of the list. > x <- 1:10 > y <- 1:10 > xyplot(y ~ x, xlab=list("abcd", cex=2)) ## works as intended > xyplot(y ~ x, xlab=list(label="abcd")) ## works as intended > xyplot(y ~ x, xlab=list("abcd")) ## error message Error in if (is.list(label) && names(label)[1] == "") label[[1]] else default....
2008 Apr 22
1
plot(x) in 2.7.0 (with y=NULL) proposed code correction
...Please voice your opinions whether the following fix for plot.default could be reasonable? I include the full function and the diff. Thanks, Oleg plot.default <- function(x, y = NULL, type = "p", xlim = NULL, ylim = NULL, 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, ...) { ## These col, bg, pch, cex can be vectors, so exclude them ## Also, axis and box accept some of these localAxis <- functi...
2005 Jul 02
3
plot question
dear list: in the following plot: plot(rnorm(10),rnorm(10),xlab="year",ylab=expression (paste('M x'*10^{3},)),font.lab=2) font.lab=2, but xlab and ylab are different. I want both labels in the same way. help? a.d. ------------------------------------------------- Email Enviado utilizando o servi佺o MegaMail
2012 Jun 08
3
Resolution issue with exporting plots from R and write tables in Latex code for producing pdf document
...SumLax[[i]]<-xtable(SumTab1[[i]],label=as.character(StationsInDir[i]),caption=as.character(StationsInDir[i])) par(mfrow=c(4,4),oma=c(4,0,2,0)) plot(1:length(SortedDataInList1[[i]][,1]),SortedDataInList1[[i]][,4],xlim=c(1,length(SortedDataInList1[[i]][,1])),ylab="Voltage 1 (v)",xlab="Date/Time ind.(10 min. int.)",type="p",cex=.001) plot(1:length(SortedDataInList1[[i]][,1]),SortedDataInList1[[i]][,5],xlim=c(1,length(SortedDataInList1[[i]][,1])),ylab="Voltage 2 (v)",xlab="Date/Time ind.(10 min. int.)",type="p",cex=.001) plot(1:...
2005 Jan 24
2
parameter couldn't be set in high-level plot() function
Dear R users, I am using function bandplot from the gplots package. To my understanding (viewing the source of bandplot) it calls function plot (add = FALSE) with the same parameters (except for a few removed). I would like to give extra parameters 'xlab' and 'ylab' to function bandplot, but, as can be seen below, that raises warnings (and the labels do not show up at the end). It does work to call title(... xlab="blah", ylab="foo") after bandplot (), but then I have two labels on top of each other, which is even mo...
2004 Aug 02
4
How to add a common title (or xlab, ylab) for multi-plots in the same window?
Dear R people, I am using par(mfrow=c()) to plot multi-figures in the same window. And I like to put a common title (and xlab, ylab) for all of plots. I have already left some margin by resetting omi values in par() and hided all (xlab, ylab) for each sub-plot. Could anyone tell me how to do that? Thanks a lot, Frank