Displaying 20 results from an estimated 8000 matches similar to: "margins within plotting region"
2002 Apr 26
3
different data series on one graph
Hello,
I'm looking for a way to plot different data series on one graph.
I have a series of hourly rainfall and quarterly flow
measurements (i.e. 4 times an hour) of a catchment. The rainfall
should be plotted in bars, the flow as a line. Both on the same X
axe (time) but with different Y axes.
The problem is the plot() function does not support add=TRUE...
Furthermore I'm not sure
2011 Dec 31
2
How to color a region in a contour plot with the contour being the boundary?
Dear expeRts,
I would like to color a certain region in a levelplot. The region for z <= 0.02 should have a dark gray color. Below is a minimal example. It almost does what I want, but The region between z=0.02 and z=1 is also colored in dark gray (instead of just the region for z <= 0.02).
How can I solve this?
Cheers,
Marius
## z values for given x and y
f <- function(x)
2010 Nov 15
1
plot.dendrogram() plot margins
Hello,
Is it possible to remove those extra margins on the "sample" axis from
plot.dendrogram:
par(oma=c(0,0,0,0),mar=c(0,0,0,0))
ddr<-as.dendrogram(hclust(dist(matrix(sample(1:1000,200),nrow=100))))
stats:::plot.dendrogram(ddr,horiz=F,axes=F,yaxs="i",leaflab="none")
vs.
stats:::plot.dendrogram(ddr,horiz=T,axes=F,yaxs="i",leaflab="none")
2004 Mar 19
5
asp=1 and aspect ratio
Hi everyone
I want a square scatterplot with abline(0,1) going exactly through the
SW and NE corners. By "square" I mean that the plotting region is
exactly square, and that the axis limits are identical.
x <- 1:20
y <- x+rep(c(-1,1),10)
lims <- range(c(x,y))
None of the following do this:
plot(x,y) ; abline(0,1) #not square
plot(x,y,asp=1);abline(0,1) #diagonal
2002 May 09
4
Rsquared in summary(lm)
Hello,
I'm doing some linear regression:
>lm<-lm(osas~alp,data)
>summary(lm)
However, the Rsquared in the output of summary() is not the same as the
"standard" Rsquared calculated by spreadsheets, and outlined in
statistical guidebooks, being SSR/SSTO. The output says "multiple
Rsquared", but it is no multiple regression...
What's the difference?
Thanks,
2000 Nov 27
4
Margin question
I am trying to produce a postscript plot consisting of rectangles and text
labels in R. It is going very well, but I have been unable to get small
margins on the page. I read the documentation on the 'mar' and 'oma'
options, but they claim that the margins should default to being 0.25in
wide, in fact on my plot they are more like 1in each! Here is the
smallest R script that
2002 Apr 23
1
column-plot of rainfall data
Hello,
I have some daily rainfall data from rain gages. E.g.:
date p1 p2 p3
20/04/2002 10.2 8.6 6.3
21/04/2002 0.4 1.6 1.4
22/04/2002 0.2 0.0 0.4
23/04/2002 5.2 1.0 0.2
I'd like to plot them in a column plot by day, to be able to
compare them. I made an example in exell, that I attached, but
can't find out how to do it in R. The data vector is a POSIXct.
Thanks,
Wouter
2012 Jan 08
2
need help with axis ticks
hi,
i am using par(mrow=c(6,6)) function to get 6x6 plots on one screen. the
problem that i am having is that the axis tick labels are far away from the
ticks and going into previous plots (see attached figure). i need to know
how can i reduce the distance between the ticks and their values (y axis
values).the part of the code that i am using (after reading in the data) to
create the top row is:
2009 Jan 05
1
adding a curve with xaxs="i"
I want the curve to touch the y axis like the curve touches the upper boundary.
How can I eliminate the margin between axis and curve on the left side?
x1 <- c(1,2,3,4,5)
x2 <- c(2,4,6,8,10)
mod <- lm (x2~x1)
hm <- function (x) (mod$coe[1]+x*mod$coe[2])
plot.new()
# ...
box()
curve (hm,lty=1,add=T,xaxs="i",yaxs="i")
(R 2.8.1)
--
Sensationsangebot verl?ngert: GMX
2007 Jun 26
4
boxplot and bxp do not respect xlim by default (PR#9754)
Full_Name: Steve Ellison
Version: 2.4.1
OS: Windows, Linux
Submission from: (NULL) (194.73.101.157)
bxp() allows specifcation of box locations with at=, but neither adjusts xlim=
to fit at nor does it respect xlim provided explicitly.
This is because bxp() now includes explicit xlim as c(0.5, n+0.5), without
checking for explicitly supplied xlim (or ylim if horizontal).
This also prevents
2009 Jul 26
2
moving text labels in plot
Hi R users
I need to specify some parameter input in plot code to move Y text label to
left.
plot(temp, develo_rate, xlab = expression(paste("Temperature (C"^o,")")),
ylab = expression(paste("Development rate (d"^-1,")")),las=1,pch=19,
xlim=c(0,32),ylim=c(0,0.03),xaxs = "i", yaxs = "i")
Plot result is added.
any help?
Ivan
2011 Feb 16
3
image() with a vector
Hi,
I have a vectors x and z, for example,
x <- 0:20
z <- round(runif(20,1,7))
y <- 0.5
and I want to display z as an image. However if I then call image() with a vector
image(x,y,t(z),zlim=c(1,7),col=heat.colors(7),xlab="Year",ylab="Action",yaxt="n",xaxs="r",yaxs="r")
then I get the error
Error in image.default(x, y, t(z), zlim =
2002 May 03
1
change default directory
hello,
maybe a silly question, but how do you set a default directory of
R, i.e. the place where R looks for source() files etc. at startup?
R 1.5.0 on Mandrake linux 8.2
BTW, it seems that my doc-directory is crippled (a lot of files
are lacking). A flaw of the mandrake 8.2-rpm's or a bad install?
thanks!
Wouter
---------------------------------------------------------------
2003 Apr 14
1
factor differences in anova
Hello,
(maybe a quite basic statistical question, but I'm just struggling with
it)
I'm doing an anova:
> Res1<-aov(H2O~location+topo+horizon+pF+Error(location:topo:horizon))
(water retention of soils)
which gives a significant difference at factor "location".
Which function should I use to now which locations (there are 3: A, B
and C) differ significantly and which do
2006 Dec 27
4
axis and times() problem
Dear R-Group,
the first example is working as expected, but I need the plot without
the box,
normally no problem, but I am not able to get the x-axis formatted as
times with the axis, command.
I tried a lot of things, nothing was working so I used the most easy
axis command in the second example here ....
# working
library(chron) # for times()
library(graphics)# for axis
2006 Dec 27
4
axis and times() problem
Dear R-Group,
the first example is working as expected, but I need the plot without
the box,
normally no problem, but I am not able to get the x-axis formatted as
times with the axis, command.
I tried a lot of things, nothing was working so I used the most easy
axis command in the second example here ....
# working
library(chron) # for times()
library(graphics)# for axis
2006 Aug 08
1
parameter yaxs / function hist (graphics)
Dear R users,
The parameters xaxs and yaxs (function par, package graphics)
seem not to work with the function hist (package graphics),
even when the parameters xlim and ylim are defined.
Is there any way to make yaxs="i" and xaxs="i" work properly
with the function hist, mainly to produce histograms that
"touch" the horizontal axis? The R documentation and the
R
2003 Apr 23
3
Changing the size of the bounding box
Greetings all:
I have to create a graph that has very specific dimensions for
publication purposes. The graph is a semilog scaled graph and the
axes must range from 1 to 1,000,000 on the y axis and 0 to 100 on the
x axis. The x axis should be exactly 8 inches and the y axis should
be exactly 5.25 inches. I've been able to set the plot area to 8 x
5.25 using the par(pin=c(8,5.25)). The
2010 Feb 19
1
color graph in multiple plots
Hi,
I would like to distinguish my plots using colors but I got error message. How do I correct that?
plot(ecdf(z), main ="CDF for observed and simulated weighted sum",type="l",lwd=2,col="blue",
xlab="Weighted sum (mm)", ylab="Cumulative Percent", xlim=c(0,15), xaxs ='i', yaxs ='i',ylim=c(0,1))
par(new=TRUE)
2003 Jan 16
1
graphics
Dear R community,
I need to plot the results of some simulations I did using QTL
Cartographer. I am plotting LOD scores over three chromosomes. The three
plot have to be one next to the other.
The procedure I am using is:
par(mfrow=c(1,3))
plot(x$x, x$y, ylim=c(0,35), type="l", col="blue", las=1, xaxs="i",
yaxs="i", xlab="X Chromosome",