Displaying 20 results from an estimated 10000 matches similar to: "setting xlim and ylim with asp=1"
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
2009 Sep 25
1
xaxs disactivated when asp=1 in plots (PR#13971)
Full_Name: Fran?ois Birgand
Version: 2.9.0
OS: windows xp
Submission from: (NULL) (152.1.16.161)
When I type this sequence:
x11()
Ylim<-c(0,14)
Xlim<-c(0,14)
plot(0,0,xlim=Xlim,ylim=Ylim,col="white",main="",xlab="",ylab="",bty="n",xaxt="n",yaxt="n",xaxs="i",yaxs="i",asp=1)
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
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:
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)
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
2008 Oct 19
1
convert lines to inches
Hi,
how can I convert the unit "lines" of par("mar") into inches?
par("mai") could help, but does not (see code below).
I want to plot a curve in a predefined size in pdf (I add some margin
space to the plot width&height, everything is in cm):
pdf("test.pdf",width=(20+2+4)/2.54,height=(10+3+1)/2.54)
plot(10:30,
2006 May 25
3
missed ylim from plot.default
? stato filtrato un testo allegato il cui set di caratteri non era
indicato...
Nome: non disponibile
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060525/ef972e9f/attachment.pl
2007 Jul 10
2
Plot SpatialLinesDataFrame with xlim & ylim
I'm running windows xp, R 2.3.1 with maptools 0.6-6, I guess.
When plotting from a large SpatialLinesDataFrame and using xlim & ylim to reduce the area, the plot axes automatically have the same scale size, even if xlim and ylim ranges differ.
E.g.:
tmp <- readShapeLines(filepath)
plot(tmp,xlim=c(-126,-119),ylim=c(50,51))
The y-axis range is actually 47-54, same range as the x-axis.
2010 Nov 22
1
plot start at origin
Hi r-users,
I would like my axes to intersect at (0,0). I tried xaxs="i",yaxs="i" but it
does not change anything. I hope anybody can help me with this problem. Here
is my code.
hist(datobs, prob=TRUE, main ="PDF of the sum of two
stations",col="yellowgreen", cex.axis=1.2,
xlab="Rainfall (mm)", ylab="Relative frequency", ylim=
2010 Nov 25
1
overlap cdf plots and add colors and etc
Hi r-users,
I would like to overlap 2 ecdf plots.
I tried this below and it gives me two plots of ecdf but just both just in
black.
par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i")
plot(ecdf(datobs))
lines(ecdf(gam_sum_gen))
Then I try to add colors etc and also the legend but fail.
par(mar=c(4,4,2,1.2),oma=c(0,0,0,0),xaxs="i", yaxs="i")
2010 May 26
2
xlim/ylim and actual axis length
Dear plotting wizards,
when plotting in R, the actual lengths of the axes are slightly
greater than the ranges of the x/y variables or xlim/ylim values.
how do I control the amount by which the axes are enlarged? Is
there a way to enforce that the lengths of the axes equal
xlim/ylim?
example:
plot(0:100,0:100,pch="+")
it can be observed, that the x- and y-axis join at approx.
2006 Apr 19
1
scatterplot3d: fractionary xrange
Dear all,
I'm plotting this and I need x range = (-2.5, 2.5).
require(scatterplot3d)
scatterplot3d(1,1,1, pch=19, xlim=c(-2.5, 2.5), zlim=c(0,2),
ylim=c(0,3), xaxs="i", yaxs="i")
In any case, it seems that in the drawing range for x is (-3,3).
I guessed I could have this kind of behaviour for ranges:
plot(1,1, pch=19, xlim=c(-2.5, 2.5), ylim=c(0,3),
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 Jan 01
4
Help with filled.contour()
The following plot is a first approximation to what I need:
***********************************
mu1 <- 0
mu2 <- 5
s <- 1
x <- seq(-2.5, 7.5, length = 41)
y <- seq(-2.5, 2.5, length = 41)
f <- function(x,y){
term1 <- 1/(2*pi*sqrt(s*s))
term2 <- -1/2
term3 <- (x - mu1)^2/s
term4 <- (y - mu1)^2/s
term5 <- (x - mu2)^2/s
term1*(.5 * exp(term2*(term3 + term4)) + .5 *
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",
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
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
2004 Jun 08
3
fighting with ps.options and xlim/ylim
sorry to impose again.
At the default point size, R seems very good in selecting nice xlim/ylim
parameters, and leaving a little bit of space at the edges of its
xlim/ylim. alas, I now need to create ps graphics that can only occupy
a quarter of a page, so I need to blow up the text for readability.
Easy, I thought: make ps.options(pointsize=24). Alas, this turns out to
be trickier than