similar to: Problem with plotting a square 1 x 3 plot and placement of outer margin text

Displaying 20 results from an estimated 7000 matches similar to: "Problem with plotting a square 1 x 3 plot and placement of outer margin text"

2008 Jul 18
1
problem with putting text in outer margins (mtext outer=TRUE)
Hi there, I'm trying to get some text in the outer margins of my plots and am having trouble - the margin text is overlapping my plots, even though the outer margin I'm trying to put it in is very big. I've simplified my problem down to this: ------------------------- X11(width=7.5,height=10) par(mfrow=c(6,1),oma=c(20,0,20,0), mar=c(0,3.1,1,2.1)) for (i in 1:6) {
2013 Jan 07
1
Changing mtext direction, or using text for the margin?
Hi all, I have read through the archives, but can't find a solution to this problem. I need the text direction on "dependent B", plotted in margin 4, to go top to bottom (opposite what it is now). Here's some sample code: #plot with mtext example par(mgp = c(2,1,0), mfrow=c(2,2), las=1, mar=c(2,2,2,2), omi= c(0.5,0.2,0,0.2)) a<-1:10 b<-7:16 c<-21:30 plot(a~b,
2012 Mar 13
1
size of graphs when using multiple figures by row
Hi all, I have a basic question concerning graphs in R. I?m using the par() function and I?m working with multiple figures by row (mfrow) but my the hight of my figures become compressed. I have 4 rows and 2 columns (because I want to plot 8 histograms (freq = FALSE ) on it. I know I can adapt my margins with for example ?oma? and ?mai? but I don?t know how to choose the size of the figure? I
2009 Jun 30
1
How to wrap my (working) code in a loop or function? (loop/function newbie alert)
Dear R-helpers, I have split a dataframe into a list with five elements, with the following code: > datalist<-split(data,data$UNIT) I would now like to run some code (below) on each element of the list to extract rows from the list elements; then I would like to rbind the extracted rows into a new dataframe containing all of the extracted rows from all of the list elements. I don't
2000 Jan 10
1
'at' parameter in mtext(.., adj=0, outer=T) (PR#396)
Depending on the setting of par()$usr, the 'at' setting in mtext(.., adj=0, outer=T) may cause the text to appear in an anomalous position (e. g. in the first instance below, at the left of the plot region rather than at 'at=0' in the figure region), or the text may not appear at all. If one does not set the 'at' parameter the text appears (with 'adj=0') on the
2009 Mar 17
1
Need a little help setting the upper median using "layout"...
The code I'm using is shown below. I would like to have a larger median at the top of the plot so that I can show the entirity of "title_text". Several times I tried messing with "par(mar", but that seemed to make matters worse. By any chance can anyone provide any insight as to the best way to increase the top/upper/northern margin, so the entirity of the title is
2009 Feb 11
2
problem with 'which' and strings
I have written a function that goes through a database and calculates various metric scores and allocates them to a data set. For 400 of the 500 sites that I calculate these metrics for works fine and allocates the scores into the appropriate column. For some reason, some sites I run into the below problem: Here is what I am doing: > names(orig.metric) [1] "BenInsect"
2009 Nov 21
2
Fw: Re: title problem
It seems that there is a problem in displaying subtitle in general, independently from multi-plot display. when I do plot (c(1,2,3), c(9,8,7), type = "l") title(main = "Main title", sub ="Sub title",cex.main=2, cex.sub = 2) subtitle doesn't get displayed > --- On Sat, 11/21/09, David Winsemius <dwinsemius at comcast.net> > wrote: >
2010 Sep 25
1
margin control in lattice package
Hi all, I am difficulty with simple layout of plots in the lattice package I have created a series of levelplots and would like to plot them to a single device, but need to reduce the margin areas. This is easily accomplished with par(oma) and par(mar) in the base graphics package but I am having problems finding the equivalent features in the lattice package. Ideally, I would like to reduce
2009 Jul 15
1
Error in simulation R-code
Dear List, I have got error message when I run the R-code. Can anyone has a suggestion? v.code <- df.bm7[,c(10:31)]; v.code[1:3,] names(v.code) CM = v.code # variable binomial code sim.sp <- function(data,CM,n,N) { C <- matrix(rep(NA,N),ncol=1) for(i in 1:N) { j <- n xx <- which(colSums(CM[j,])==1) V <- names(xx) V <- paste(V,
2000 Feb 02
1
Outer margin (oma) settings for pairs()
I propose the following small changes to pairs.default. The point is to allow control of the outer margin settings, so that there is for example room for legends. [Note also the issue re the setting of par()$usr on exit] ---------------------------------------------------------------- (1) Replace function (x, labels, panel = points, main = NULL, font.main = par("font.main"),
2006 Apr 10
2
Legend in the outer margin
Dear Rs I have a 3x3 multiple plot. I would like to have a overall legend in the outer right margin. From the help archive, I found that it can be done by setting par(xpd=NA). However, I couldn't find the correct values for x and y co-ordinates for the legend. Please find the code snippet below: par(mfrow=c(3,3), mar=c(4,4,0.9,0.5), oma=c(1,2,2,4),cex.main=1.1)
2009 Sep 28
1
plot error -- figure margins too large
Hi, I am trying to plot my dataset, consisting of one column with numeric values and one column with group IDs. The set is similar to the following df. df <- NULL for ( i in 1:20) { tmp1 <- runif(1000,0,5) tmp2 <- cbind(tmp1,i) df <- rbind(df,tmp2) } Now I would like to plot the numeric column, stratified by the group IDs, in a single figure. First, I partitioned the frame
1999 Nov 23
1
"outer" argument in mtext (PR#340)
mtext(..., outer = TRUE) does not seem to center the text in the outer margins as it did previously. Reproduce with example(plot.profile.nls, package = "nls") On versions of the development sources before November 17 this produced main and subtitles that were centered horizontally on the page. After that the main title (from mtext("..", side = 3, outer = TRUE)) is centered
2003 Jul 22
1
Making a group membership matrix
Hi Helpers: I have a factor object that has 314k entries of 39 land cover types. (This object can be coerced to characters neatly should that be easier to work with.) > length(foo) [1] 314482 > foo[1:10] [1] Montane Chaparral Barren Red Fir Red Fir [5] Red Fir Red Fir Red Fir Red Fir [9] Red Fir Red Fir 39 Levels:
2007 Aug 30
1
Barplot2 using for loop, how to adjust margins?
Hi R-users, I inted to make multiple plots using for loop. The question is how can I adjust the left hand side margin of the plot according to the names.arg argument in barplot2. In every plot I have different annotations in the y axis and they vary in length. Now when I have fixed margins opar <- par(mar=c(3,15,0,2)... I get the same margins in all of the plots. That leaves lots of white
2008 Sep 16
1
plotting on the figure margin
Dear R-list members, I am trying to put a legend just outside the plotting area of a graph. 1. Is there some way to plot symbols on the figure margin, in the same way as function "mtext" can write on the margin? 2. Is there some way to use the "legend" function (or some equivalent function) to plot a legend on the figure margin? 3. Any other way to plot either symbols or a
2002 Nov 15
1
Plotting in the margin
Hi, I would like to place a line (tilted at an angle) in the margin of an R plot. Is there any way to place such an annotation outside the plotting area? As an alternative, being able to plot a rotated character (the pipe, |) in the margin would be sufficient. The problem is that mtext doesn't work with the srt option. As a further alternative, if I could put a legend in the margin, I
2010 Feb 16
3
margin text warning message NAs coercion
Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),"additional text",side=3,line=1) I receive the text that I want, but the command terminal shows the following response: Warning message: NAs introduced by coercion in: mtext(expression(A[1]~B[2]),"additional text", side = 3, What is my mistake
2007 May 22
4
Legend outside plotting area
Hi, I have been trying many of the suggested options to place a legend outside plotting area, including something like this: par(xpd=T, oma=par()$oma+c(4.5,0,1.5,0),mar=par()$mar+c(1,0,1,0) But the aspect of the four plots gets compromised when I change the margin settings. I cannot use mtext because I need to use colors for the text. I tried layout, but wouldn't let me include