Displaying 20 results from an estimated 10000 matches similar to: "size of graphs when using multiple figures by row"
2012 Oct 23
2
multi-panel figure: overall title for each row
Dear all,
I have a 3x2 plot and in addition to the title of the individual plots I
would like to have an overall title
for each row. I managed to get an overall title for the whole plot matrix
with mtext:
par(mfrow=(c(3,2)), mar=c(6.4,4.5,4.2, 1.8), oma=c(0,0,3,0))
for (i in 1:6)
barplot(sample(1:10,5), main=paste("Plot #",i))
mtext("Overall Title Row 1", outer=TRUE)
but I
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 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
2011 Nov 15
1
Plot alignment with mtext
I would like the text plotted with 'mtext' to be alighned like it is for
printing on the console. Here is what I have:
> print(emt)
ME RMSE MAE
MPE MAPE MASE
original -1.034568e+07 1.097695e+08 2.433160e+07 -31.30554 37.47713
1.5100050
xreg 1.561235e+01 2.008599e+03 9.089473e+02 267.05490 280.66734
2007 Sep 02
2
Different behavior of mtext
Dear R Users,
I am quite surprised to see that mtext gives different results when it
is used with 'pairs' and with "plot'. In the two following codes, it
seems that the 'at' argument in mtext doesn't consider the same unit system.
I would appreciate your comments on this issue.
Sebastien
##### Pairs
mydata<-data.frame(x=1:10,y=1:10)
par(cex.main=1,
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,
2007 Apr 27
1
Write text in the
Hey Felix,
So basically what you want is a figure containing a block of four plots, with a main title for the figure? If that's the case then something like this should work:
# BEGIN CODE #
par(oma=c(0,0,1,0), mfrow=c(2,2))
for(i in 1:4){
plot(NA,xlim=range(0,10),ylim=range(-5,5))
title(paste("Plot ",i,sep=""))
}
par(mfrow=c(1,1), oma=c(0,0,1,0))
mtext("Main
2007 Jun 19
1
: create a PDF file (text (print list) and grafics)
Dear helpers,
I need help to create a PDF file like the example
-----------------------------------
| Title |
-----------------------------------
| |
| Text (print a list) |
| |
-----------------------------------
| | |
| | |
| image | image |
| | |
| | |
-----------------------------------
2009 Oct 12
3
help with the use of mtext to create main title over multiple plots
I'm trying to use mtext to create a main title over multiple plots. Below is
a simple self-contained example and my sessionInfo (I should note I've also
tried this with R-2.8.1 with the same results). When I execute the code
chunk below, I get the plots, but no title. I've tried this using the screen
driver, pdf, and postscript. I've used different sizes of paper. I suspect I
am
2007 Oct 24
2
Graphics - plotting two graphs
Hi,
I wanted to plot 2 lines on a single graph. Each graph has one axis that can be common. The code that I'm using is:
-------------------------------------------------------
par(mfrow=c(1, 1))
x1 <- c(2, 4, 6, 8, 10, 12)
x2 <- c(10, 20, 30, 40, 50, 60)
y1 <- c(10,12,15,22,34,21)
y2 <- c(40, 130, 150, 145, 40, 30)
par(las=1, mar=c(4, 4, 2, 4))
plot.new()
2012 Feb 07
1
Problem with plotting a square 1 x 3 plot and placement of outer margin text
Dear R-helpers,
Please see the attached plot.
The problem is that I have too much space between the x-axis label
(which is mtext in an outer margin) and the plots.
My par settings for this plot are:
>par(mfrow=c(1,3),oma=c(2,2,2,2),mar=c(5.1,4.1,4.1,2.1),pty="s")
>#here is the code that produces the three plots, which I have deleted for simplicity
>mtext("Log Wetland
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
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) {
2012 Apr 24
2
Positioning main title
Hello,
I have a barplot where each row has quite long texts and I have used "par"
to make some room in the left:
par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0))
barplot2(prueba, main = l, col=colores, horiz=TRUE,las=1, cex.names=.7)
My problem is that main text appears justified to the plot. I want to put it
in the middle of the image, and find a way to sort it out with mtex
par(mar=c(0,
2012 Mar 18
1
problem saving gplot.hexbin using file save as pdf - "Error: invalid graphics state
I can save to png, TIFF and jpg but get an error "Error: invalid graphics
state" when trying to save as pdf and I have to restart R.
This happens when I add mtext lines.
There are a few other questions e.g. I want to move the mtext on side 1 to
the left, but that is the main issue for now.
I'm not using the ylab inside gplot.hexbin because it writes over the
numbers on the axis.
2003 Jan 17
2
Re: Universal legend in plot
Dear R-users:
I asked a question on how I can have a universal legend in a plot and
received the following result. I tried using "layout" but I can't seem to
work on the "empty" plot (where I have to have the legend). I tried "oma"
but I couldn't improve the quality of the plot, and that I didn't know how
to specify all the line types using the
2006 Oct 23
3
Plotting Text on a graph
Hi,
I plotted 12 graphs on a page and output to a png file. I wanted to
have an overall title for all 12 graphs. What command can I use to do
this? Below is the code that plotted the 12 graphs in one page.
# FM10 by Month/ Export the plot to Wash2005FM10.png
png(file="Wash2005FM10.png",bg="white")
par(mfrow = c(3,4))
# Plot 12 Month of OFM10, FFM10
for(i in
2008 Jun 12
1
controlling location of labels in axis()
Here's a naive question about axis()
How do you control the location of the labels with the axis() command?
In the following example:
foo <- data.frame(plot.x=seq(1:3), plot.y=seq(4:6))
plot(foo$plot.x, foo$plot.y, type='n', axes=FALSE)
points(foo$plot.x, foo$plot.y)
axis(1, at=foo$plot.x, labels=foo$plot.x)
I'd like to be able the control the y location of the labels (i.e.
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 Apr 02
2
plot area: secondary y-axis does not display well
Dear useRs,
I'm having a slight problem with plotting on 2 axes. While the following
code works alright on screen, the saved output does not turn out as
desired i.e. the secondary y-axis does not display fully.
Just run the code and look at image output. Suggestions please...
thanks,
Muhammad
---
rm(list=ls())
x <- 1:100
y <- 200:300
par(mar=c(5,5,5,7)+0.1) # inner margin