Displaying 20 results from an estimated 10000 matches similar to: "Ploting in for() loop"
2002 Sep 23
4
Overall Title in par(mfrow)
Hi,
Say I did something like:
par(mfrow = c(1, 2))
plot(1:10)
plot(1:10)
and I'd like to have an overall title, i.e. a title that would appear,
centered, on the top of both plots, rather than the top of the last plot.
I tried:
title("FOO", outer = T)
but it doesn't appear right. Half of the FOO is outside the figure region
and can't be seen...
Is there another
2002 Apr 15
1
Re: Writting R Function
Hi,
I think I found the problem. It lies in my Fortran program. Is there a
way, after a DO loop, to make sure it does NOT return anything?
Cheers,
Kevin
On Mon, 15 Apr 2002, Ko-Kang Kevin Wang wrote:
> Date: Mon, 15 Apr 2002 17:27:20 +1200 (NZST)
> From: Ko-Kang Kevin Wang <kwan022 at stat1.stat.auckland.ac.nz>
> To: R Help <r-help at stat.math.ethz.ch>
> Subject:
2008 Oct 17
1
use of empty space in split graph device
Hi all,
I divide the graphical device into 4 ---mfrow=c(2,2)--- to plot 3 boxplots
graph.
Thus I get an empty space for the fourth graph. I d'like to place a legend
in this space.
legend(xxxx) creates a legend in the last graph (the 3rd) I'd like a legend
in the empty space.
How may I do it?
#graph parameter
par( fin=c(6,6), #dim graph
mai=c(1,1,0.5,0.5) #marges graph
2008 Jun 06
1
boxplot changes fontsize of labels
Hi all!
So far I learned some R but finilizing my plots so they look
publishable seems not to be possible.
I set up some boxplots. Everything works well but when I put more then
two of them in one plot the labels of the axes appear smaller than the
normal font size.
> x <- rnorm(30)
> y <- rnorm(30)
> par(mfrow=c(1,4))
> boxplot(x,y, names=c("horray",
2013 Mar 21
2
Displaying median value over the horizontal(median)line in the boxplot
Hi,
set.seed(45)
test1<-data.frame(columnA=rnorm(7,45),columnB=rnorm(7,10)) #used an example probably similar to your actual data
apply(test1,2,function(x) sprintf("%.1f",median(x)))
#columnA columnB
# "44.5"? "10.2"
par(mfrow=c(1,2))
lapply(test1,function(x) {b<-
2005 Apr 19
1
controlling the x axis of boxplots
v 2.0.1 (sooooh old!) on Win2k
I think I know the answer to this but I can hope ...
I have data for continuous variables (measures of residents) by a
categorical variable in range (1,22), the units in which they live.
I want to plot these data with a pair of boxplots one above another
with same x-axis (1,22) using par(mfrow=c(2,1)) and then plotting
first for the women then for the men.
2011 Nov 17
1
Small inconsistency with boxplot
Dear R-core team,
I think I found a small inconsistency in the boxplot function. I don't want to post it as a bug since I'm not sure this might be considered as one according to the FAQ --- and this is not a major problem. Don't hesitate to tell me if I'm wrong.
If you try to do a boxplot on a matrix and set the "at" argument to some vector different from 1:n, n is the
2002 Sep 23
2
Change page in postscript()
Hi,
Another question about graphics...
Suppose I have:
par(mfrow = c(4, 6))
which will set up a figure region for 24 plots. But, I actually only need
23 plots. In fact I wrote a little function, foo.plot, which will draw
all the 23 plots at once with:
foo.plot(x)
where x is a data frame.
Now, suppose I want to draw several set of these 23 plots, but want to put
them all in one postscript
2011 Aug 16
3
Newbie question - struggling with boxplots
Hopefully I will not be flamed for this on the list, but I am starting out
with R and having some trouble with combining plots.
I am playing with the famous iris dataset (checking out example dataset in R
while reading through Introduction to datamining)
What I would like to do is create three graphs (combined boxplots) besides
each other for each of the three species (Setosa, Versicolour and
2012 Feb 20
2
overlay of two sets of boxplots
Hello,
I am new to R and currently have the following problem:
I have successfully loaded my data in R which consists of two numeric columns (LI_F and female) and one character column (Strain). So far I can plot two different set of boxplots for each of the numeric columns plotted by the groups of the character column and the commands look like that:
boxplot(LI_F~Strain, ylab="LI_F",
2012 Mar 12
2
How to create interrupted boxplot
Hello,
I have created two boxplots with following R code. There is one outlier in
B group.
The outlier is 33. But the all other data are between 0 to 4.
How can I skip y-axis around 5 to 25, and expand 0-4 for this case. Also I
want keep the outlier in my boxplot.
I want my boxplot look like the second one, keep the outlier, and make an
interrupt of y-axis from 5 to 25.
Thanks,
Jianghong
2005 Oct 28
1
multiple boxplots
Hello,
I want to plot 3 boxplots [ par(mfrow=c(3,1)) ] but the first one has 8
groups, the 2nd has 7 and the third has 6. But I the groups to line up:
1 2 3 4 5 6 7 8
2 3 4 5 6 7 8
3 4 5 6 7 8
where the numbers actually refer to years. I suspect I have to manipulate
the function bxp(). Is there a relatively simple way to do this? Thanks for
any help.
Jeff Breiwick
NMFS, Seattle
2008 Nov 13
1
Boxplots with different variables and different ranges in R
Dear all,
I am trying to make boxplots in one diagram but it is not working. Actually I have a large dataset, around 35 water quality variables with different units and of course in different ranges (some are orders of magnitude bigger than others). I want to produce one diagram with all the boxplots of the variables of my dataset.
I tried these series of commands:
>oldpar <-
2002 Oct 01
1
Cleveland's Cut-and-Stack Plot
Hi,
Is there a function in R that does Cleveland's Cut-and-Stack plot (Page
190 -- 191, The Elements of Graphing Data, William S. Cleveland)?
Or do I need to do it the hard way, i.e. set par(mfrow = c(m, n)) then do
it one-by-one?
(I have a time series data set that is almost identical to the description
in Cleveland's book, hence I'm interested in trying the Cut-and-Stack
plot)
2002 May 10
1
barplot()
Hi,
Is it possible to draw barplot with x-axis being shown? I looked up the
help file and I couldn't seem to find it.
For example, I tried to do
x <- 1:9
p <- log10(1 + 1/x)
barplot(p, xlab = "Digit d", ylab = "Probability",
ylim = c(0, 0.35), axes = F,
main = "Benford's Law Probability")
axis(1, 1:9)
axis(2, seq(0, 0.35, by = 0.05),
2011 Mar 13
3
how to change the margins of a plot area
Dear all,
I am ploting two boxplot of two chemical variables using the format
boxplot(Alkalinity, logAlkalinity, log="y", col=c("lightblue"), lwd=0.6, boxwex=0.3)
However when I plot like this, the distance between the two boxplots is very big and as well the distance of each boxplot from the plot area, left and right. How can I minimise that distance between the boxplots and
2002 May 06
4
Subtitle?
Hi,
Is it possible to add a subtitle that appears directly below the main
title?
I tried the "sub" parameter, but it adds sub-title to the bottom of the
plot.
Cheers,
Kevin
------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Postgraduate PGDipSci Student
Department of Statistics
University of Auckland
New Zealand
Homepage:
2004 Sep 12
2
boxplot() from list
I have a list containing 48 objects (each with 30 rows and 4 columns, all
numeric), and wish to produce 4 boxplot series (with 48 plots in each) ,
one for each column of each object.
Basically I want a boxplot from boxplot(mylist[[]][,i])
for i in 1:4. It seems that I can create a boxplot of length 48 from the
entire list, but I don't seem able to subscript to return 4 boxplots from
the list
2002 Apr 09
1
Fortran (77) in R
Hi,
I'm learning Fortran and trying to load a Fortran subroutine into R.
I've done:
R SHLIB Fibonacci.f
and it compiled fine.
Then I went into R and done:
> dyn.load("Fibonacci.so")
> Fib <- function(n) {
+ .Fortran("Fibonacci",
+ as.integer(n))[[1]]
+ }
> Fib(5)
Error in .Fortran("Fibonacci", as.integer(n)) :
2002 Jul 03
0
R Guide for Windows Users
I've just completed(?) an R Guide for Windows users. It was extended from
my "Compile R for Windows" that I put up a few months ago. To get it go
to http://www.stat.auckland.ac.nz/~kwan022/rinfo.php
Here is the table of contents:
1 Introduction
2 Installation
2.1 Installing R Base
2.2 Installing packages
3 Running R
3.1 Rgui
3.2 Rcmd
3.3 Rterm
4 Comile