Displaying 20 results from an estimated 2000 matches similar to: "R-beta: Splus incompatibility in axis() and image()"
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 =
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),
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:
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
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",
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)
2006 Mar 13
1
Newbie error or bug?
Hi
I used R for the first time yesterday. I wanted to plot the aliasing
effect of sampling a 5.5KHz sinusoid at only 8KHz (below the Nyquist
limit). So I wrote a small R script that a) plots 1msec worth of a
5.5KHz sin wave b) plots 1msec of the resulting 2.5KHz alias and c)
plots the 8 sampling points on the 5.5KHz source wave. I think I have
found a bug. The script is as follows:
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")
2003 Aug 25
1
setting xlim and ylim with asp=1
In plot(), when using option asp=1 the xlim and ylim have no effect because
they are changed
changed in order to fill the whole plot region. Is there a way to
automatically set
xlim and ylim when asp has been set to 1?
For example:
#This is a box of the plot ranges I want:
boxxy=rbind(c(-1,2),c(-1,-1),c(1,-1),c(1,2),c(-1,2))
#Without asp=1 I get what I want (i.e. I can't see the box because it
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)
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 May 14
2
How to do a pretty panel plot?
The pretty picture that I saw at:
http://chartsgraphs.wordpress.com/2009/02/09/r-panel-chart-beats-excel-chart/#more-1096
inspired me to try something similar. The code that I wrote is:
------snipsnip---------------------------------------------------------------------
M <- structure(list(date = structure(c(13634, 13665, 13695, 13726,
13757, 13787, 13818, 13848, 13879, 13910, 13939, 13970,
2017 Jul 06
1
Convert date to continuous variable in R
Thanks it worked for me. I wanted to plot days since planting on
x-axis 1 and years on x-axis 3.
LAI_simulation$Date <- as.Date( LAI_simulation$Date, '%Y/%m/%d')
LAI_simulation$Date <- as.integer(LAI_simulation$Date - as.Date("2009-10-07"))
plot(LAI~Date,data=LAI_simulation,xlab="Days since Oct, 7,
2007 Oct 24
1
Adding a second y axis and specifying yaxs="i"
Hello All,
I have plotted a barplot and placed a line plot over top using
par(new=TRUE).
In the first plot I have specified that yaxs="i" and xaxs="i". However
when I add a new axis to side 4 (right) and try to specify yaxs="i" it
does nothing and the axis line begins above the x axis when I want the
two points to meet. Can anyone tell me how to specify the
2001 Sep 08
0
barplot forces xpd=TRUE (PR#1088)
<<insert bug report here>>
barplot hardcodes xpd as "TRUE" causing the bars to go outside of the
plot region. True can be the default, but it shouldn't be the only
option.
*** barplot.R Sat Sep 8 10:15:16 2001
--- barplot.R.orig Sat Sep 8 10:03:39 2001
***************
*** 5,11 ****
legend.text = NULL, beside = FALSE, horiz = FALSE,
col =
2004 Jun 26
0
Re: plot.new() warning from coplot()'s par(*, new=FALSE)
{diverted from the R-SIG-gui list}
>>>>> "PD" == Peter Dalgaard <p.dalgaard@biostat.ku.dk>
>>>>> on 26 Jun 2004 11:51:02 +0200 writes:
PD> James Wettenhall <wettenhall@wehi.edu.au> writes:
>> Hi,
>>
>> Does anyone know a good way to get rid of warnings like:
>> Warning message: calling
2009 Apr 23
1
how to control significant digits(?) on axis labels
Dear R mailing list
I would like some help on how to get R to display the same number of significant digits (?) for *all* tick marks on axis labels (yet be flexible enough to handle different data sets that vary by 10-1000X).
Consider this simple example:
#---------------------------#
x <- seq(0,2,by=0.5)
xlim <- range(pretty(x,n=5))
ylim <- xlim