Displaying 20 results from an estimated 30000 matches similar to: "ylim with only one value specified"
2012 Apr 16
3
I wish xlim=c(0, NA) would work. How about I send you a patch?
I'm looking for an R mentor. I want to propose a change in management
of plot options xlim and ylim.
Did you ever want to change one coordinate in xlim or ylim? It happens
to me all the time.
x <- rnorm(100, m=5, s=1)
y <- rnorm(100, m=6, s=1)
plot(x,y)
## Oh, I want the "y axis" to show above x=0.
plot(x,y, xlim=c(0, ))
##Output: Error in c(0, ) : argument 2 is empty
2003 Nov 12
2
wishlist item: changing origin of plot (PR#5045)
[This is an edited version of an email that I sent to Paul Murrell.
He was in favour of the idea (although he noted the obstacles that: it
could make par() longer; somebody has to implement it) and
suggested I submit this as a wishlist item.]
Do you think it would be worth adding options to plot commands to
reverse axes?
Here is a simple example:
> x <- 1:12
> plot(x)
Whereas if I
2010 Aug 31
1
"pairs" with same xlim and ylim scale
Hi list,
I have a function which basically is a wrapper of pairs with some useful panel
functions. However, I'm having trouble to pass the "xlim" and "ylim" into the
function so the x and y axes are in the same scale and 45 degree lines are
exactly diagonal. I've looked at some old posts, they didn't help much. I
think this is b/c I have multiple panel
2003 Mar 10
1
Problem with example(medpolish) in R-devel
Today's R-devel has a problem in `example(medpolish)'. It appears that
the `plot.medpolish' method is not available. Here is the output and
traceback() after starting `R --vanilla':
> library(eda)
> example(medpolish)
mdplsh> deaths <- rbind(c(14, 15, 14), c(7, 4, 7), c(8, 2,
10), c(15, 9, 10), c(0, 2, 0))
mdplsh> dimnames(deaths) <-
2008 Apr 22
1
plot(x) in 2.7.0 (with y=NULL) proposed code correction
Hi all:
following the previous discussion, it looks like plot(x) with y=NULL
still does not work correctly. If one tries for example plot(1:5) it
works, but already for plot(runif(100)) it does not. I posted the
proposed correction for plot.POSIXct and plot.POSIXlt before. Please
voice your opinions whether the following fix for plot.default could be
reasonable? I include the full function and
2008 Sep 04
1
Building a time series.
I have a need to build a time series and there are a couple of aspects about the time series object that are confusing me. First it seems that ts.union is not doing what I would expect. For example:
x0 <- rep(0,10)
x1 <- rep(1,10)
xt0 <- ts(x0, frequency=10)
xt1 <- ts(x1, frequency=10)
st2 <- ts.union(xt0, xt1)
> xt2
Time Series:
Start = c(1, 1)
End = c(1, 10)
Frequency = 10
2010 Mar 31
3
creating a variable using concatenation
A general problem i run into, i know there must be a simple solution.
I like to create a variable by appending a 1 for example, (i need to
loop later on from 1 to X, thus the reason for this). So i assign the
variable vplot with this value, however it has quotes and when i use it
in a barplot, it throws an error. but the tcenter$X1 does exist, its an
element of a data frame. So if i type
2010 Jun 13
1
ERROR need finite 'ylim' values
Hello:
I use R with MAC
I have a simple data table, numeric and text columns, named dt. The table is
imported through read.csv from a csv file. Row numbers are automatically
assigned, header is set to TRUE. there are 599 rows and several columns.
I am trying to plot using the stripchart command: one numeric variable (say
dt$fnatg) vs a text column (say dt$pat). dt$pat contains one of 3 values:
2001 Feb 05
1
clipped lines have wrong slope in log plot (PR#839)
Hi,
I'm using R version 1.2.0 (2000-12-15), on RedHat Linux 6.2 (kernel 2.2.14).
The following command ought to plot a straight-line on a log-log
graph but instead plots two line segments, both with the wrong
slope:
plot(c(1,10,100),c(100,10,1),type="l",xlim=c(1,20),ylim=c(1,20),log="xy")
Only clipped lines seem to have this problem. Changing to type "b"
or
2004 Jan 15
2
Legend text -- discrepancy between X11 and postscript
Hi,
When I place a legend on a plot it looks exactly as I intended
on the screen. However, almost always, when I export this to
postscript file, the legend's text protrudes through the legend's
frame (the latter being placed correctly).
See the appended example code. I can send the EPS file as well
for those that are interested (<4 kb; <200 lines).
I found nothing in the FAQS,
2005 May 24
3
Reversing axis in a log plot (PR#7894)
Full_Name: Christian Marquardt
Version: 2.1.0
OS: Linux (Redhat 9)
Submission from: (NULL) (151.170.240.10)
Following the advice of a reader of R-help, I would now like to submit this as a
bug report:
Say we have
x = seq(1,3, by = 0.01)
y = exp(x)
Plotting and reversing linear axis is fine
plot(x,y)
plot(x,y, ylim = c(30,1))
as is a usual log-plot:
plot(x,y, log =
2011 Aug 15
1
2 matrix scatter x [a lot]
Hello,
I'm pretty new to R. Basically, how do I speed up the for loop below. Or
better yet, get rid of the for loop all together.
objective: plot two data sets column against column by index. These data
sets have alot NA's. Some columns are all NA's. I need the plots to overlay.
I don't like the plots in matplot(). Needs to be much faster than the code
below...
#simple sample
2012 Nov 16
2
Dealing with factors ???
I have a data frame x that came from read.csv. It seemed to read in ok but
then I tried doing some plotting of the values and ran into difficulties.
The plot command seems to be plotting factors instead of the values. How do
I get rid of these factors ? The plot command I use is : plot (x$dat, x$TX,
type='l'). I also tried ...plot(x$dat, levels(x$TX), type='l) but got an
error :
2011 Jan 03
3
optimize
Hi all,
I'm trying to get the value of y when x=203 by using the intersect of
three curves. The horizontal curve does not meet with the
other two. How can I rectify the code below?
Thanks
Muhammad
ts <- 1:10
dd <- 10:1
ts <- seq(200,209,1)
dd <- c(NA,NA,NA,NA,1.87,1.83,1.86,NA,1.95,1.96)
plot(ts,dd,ylim=c(1.5,2))
abline(lm(dd~ts),col="blue",lty=2)
2009 Feb 17
1
plot.lm: "Cook's distance" label can overplot point labels
The following code demonstrates an annoyance with plot.lm():
library(DAAGxtras)
x11(width=3.75, height=4)
nihills.lm <- lm(log(time) ~ log(dist) + log(climb), data = nihills)
plot(nihills.lm, which=5)
OR try the following
xy <- data.frame(x=c(3,1:5), y=c(-2, 1:5))
plot(lm(y ~ x, data=xy), which=5)
The "Cook's distance" text overplots the label for the point with the
2011 Jun 16
1
Scatter plot produces "'x' and 'y' lengths differ"
Hello,
I am working on a project to create some scatter plots. I have syntax
for 26 plots, and 22 of them display as they should. But here, for
example, is a sample of the command syntax I am using:
good <- complete.cases(affect1,adh1scr)
plot
(jitter(affect1,2.0),jitter(adh1scr,1.0),xlim=c(1,35),ylim=c(1,35),pch=1
6,
main='Adherence Score by Affectiveness Level - Visit 1',
2007 Jan 11
1
zero margin / marginless plots
Hi,
I'd like to produce a marginless or zero margin plot so that the pixel
coordinates represent the mathematics.
xy<-data.frame(x=c(0,1,1,0,0),y=c(0,1,0,0,1))
png('junk.png',width=300,height=300)
par(mar=c(0,0,0,0))
plot(xy$x,xy$y,xlim=c(0,1),ylim=c(,1))
dev.off()
The resultant file has about a 10 pixel margin around these lines, and I'm
not sure what parameter or function
2008 May 28
1
Unnecssary warnings in plot function (PR#11530)
Full_Name: Joseph Amuah
Version: 2.7.0 (2008-04-22)
OS: Windows
Submission from: (NULL) (205.207.78.4)
I used the plot function to create some graphs but wanted to add soem
restrictions. A set of warning were produced even though the plot worked fine.
Can these warnings be cleaned up? Here is an example:
***************************************
> plot(xx$month, xx$log10RR, xlab="",
2006 Mar 17
1
Adding axis limit to log-log plot
Dear All,
I've tried to add axis limit ( e.g. ylim=c(0,50)) to the log-log plot, but it turn out to be error (see below). Any solution is much appreciated.
> plot(maxsd$tph,maxsd$qdbh,log="xy",xlab="Stand density(trees per ha)",ylab="Quadratic mean dbh (cm)",ylim=c(0,50))
Error in plot.window(xlim, ylim, log, asp, ...) :
Infinite axis extents
2007 Jan 17
1
sp: proj4string has no impact
Hi all,
I'm faced with a problem applying the sp package: The projection argument in
readShapePoly(Shapefile,proj4string="CRS class argument")
e.g.: CRS("+proj=aea +lat_1=46 +lat_2=73 +lat_0=60 +lon_0=84 +x_0=0
+y_0=0 +ellps=clrk66 +units=m +no_defs")
doesn't have any impact on the plotted object. I also tested the simple
example:
xy = cbind(x = 2 * runif(100) -