Displaying 20 results from an estimated 20000 matches similar to: "plot, xlim to cut data set"
2005 Sep 28
1
boxplot and xlim confusion?
I have some code as shown below. Basically, I would like three
boxplots to be set next to each other with no ylabels on the two
"inner" plots, and I want the same x axis range on all three. However,
it seems like boxplot does not respect the xlim setting. I've tried
the various ways I thought would work (par, boxplot(...xlim=)) but
none of them seem to work. I then tried plot.window,
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)
2011 Jun 07
2
Line Graphs
Hello,
I want to plot 6 line graphs. I have 10 points 0.1, 0.2, 0.3, 0.4, 0.5, 0.6,
0.7, 0.8, 0.9 and 1.0.
At each point say 0.1, I have 6 variables A, B, C, D, E and F. The variables
all have values between 0 and 1 (and including 0 and 1). I also want to
label the x axis from 0.1 to 1.0 and the y axis from 0.1 to 1.0.
My goal is to plot a line graph representing the mean of the variables at
each
2009 Jul 15
3
abline(v= x) in plot with time formated xaxis not working
Hi,
I try to create a vertical line in my plot, which has a xaxis comprising
time formated data.
This is what I tried:
----------------
y<-152833
x<-strptime(y, format="%H%M%S")
abline(v=x, col="red")
----------------
for some reason, it doesn't work and no error msg is displayed...
I hope someone can tell me what I do wrong, or maybe an alternative.
Thanks
2010 Nov 22
2
xlim=c(min(x), max(x)) still produces extra margin on both sides of x axis in plot()
code:
op <-
par(bg='black',fg='gray',col='gray',col.axis='gray',col.lab='gray',col.main='gray',col.sub='gray',mai=c(0,0,0,0),
tck = 0.01, mgp = c(0, -1.4, 0), mar=c(0,0,0,0))
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(1,1,1,
0.5),yaxt="n", ann=FALSE)
abline(v=c(min(x),max(x)), lty=3,
2012 Sep 20
3
Line over Boxplot
Very much a rookie at R, and have only recently started using it again so
pardon the simple question. I am trying to produce a box plot from one data
set and then overlay a line plot from another data set. The box plot data
set is made up of 20 sets of 30 data points, or 600 total data points. The
line has only 30 total data points. The box plot is plotting fine, but for
some reason, the line plot
2012 Feb 21
3
Plot Many Data to same plot
Dear all,
I have a function that for a variable number of inputs plots them to the same plot
I am doing this quite simply by
plot(seq(from=start, to=stop, length.out=np), datalist[[1]]$dataset
xlim=c(start, stop), ylim=c(0, 1), type="l")
2012 Mar 10
2
Window on a vector
Dear all,
I have a large vector (lets call it myVector) and I want to plot its value with the logic below
yaxis<-myVector[1]
yaxis<-c(xaxis,mean(myvector[2:3])
yaxis<-c(xaxis,mean(myvector[4:8])
yaxis<c(xaxis,mean(myvector[9:16])
yaxis<c(xaxis,mean(myvector[17:32])
this has to stop when the new ..... yaxis<c(xaxis,mean(myvector[1024:2048]) will not find the correspondent number
2000 Apr 26
1
xaxp with dates
Dear friends.
As promised ver 1.01 solved the former problem and now dates plot OK in
windows. But.
In the following code, "cex.axis"=0.5 works OK but "xaxp"=c(14620,14680,4)
has seemingly no effect. The limits for xaxp was found from the default
plot and inspecting par(). I need to put the date marks at specific points.
Could I suppress them altogether and make a new xaxis
2006 Feb 09
2
nice log-log plots
Dear All,
I am trying to produce log-log plots in R and I was wondering if any of you have a 'template' for generating these with 'nice' labels and log-log grids?
I know I can set up axes individually and use the intervals I want, however, I will be producing a large number of these plots and would not like to do this manually for each of them + I am very new to R and at the
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
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:
2005 Dec 22
6
Plot problems: xlim
Hi,
Still fresh in R, tried to figure this out, now on my second day running with no luck (and a pile of hair on my desk) so
I have thrown in the towel and would like to ask for some help.
Here is what I am trying to do. I am trying to plot a distribution, I have 99 points, bound in the range
xlim.min: -0.0173
xlim.max: 0.02103
However, I have a value outside this range (0.2454959) which I
2011 Mar 29
1
plotting several ROC curves on the same graph
Hello
I am trying to make a graph of 10 different lines built each from 4
different
segments and to add a darker line that will represent the average of all
graphs
- all in the same plot.Actually each line is a ROC plot
The code I'm using for plotting one line is as follows:
logit.roc.plot <- function(r, title="ROC curve") {
old.par <- par(no.readonly = TRUE);
2010 Jun 04
2
horizontal and vertical line with arrow in a plot
Hi r-users,
I would like to add a plot of vertical line segment with arrow from (77,.6) to (77,0) and also a horizontal line segment with arrow from (0,0.6) to (77,.6) . So far this is what I have:
plot(sq, cdf, type="l", lwd=4,col="blue",xaxs="i",yaxs="i", xlab= "Rainfall (mm)", ylab= "Random no.",
main="Random number and
2009 Jun 20
1
modifying sound package function plot.Sample
Hi,
I'm trying to modify this function.I want to remove the existing xaxis(the
tick marks and the values below each tick) and make it dynamic so that i can
choose whether i want the xaxis at the top or bottom but i cant seem to
change that.can somebody help me?
plot.Sample <- function(x,xlab=NULL,ylab=NULL,...){
sampletest <- is.Sample(x,argname="'x' ")
if
2010 Oct 06
4
problem with abline
Hi All,
I am running a scatter plot and trying to add a best fit line. I use an abline function, but get no line drawn over the points. I also get no error. I arm using V 2.10.0 on Windows 7.
Here is my code, including the SAS transport file import:
require (foreign)
require (chron)
require (Hmisc)
require (lattice)
clin <- sasxport.get("y:\\temp\\subset.xpt")
attach(clin)
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
2020 Sep 29
5
2 KM curves on the same plot
Hello,
Can anyone suggest a simple way to generate a Kaplan-Meier plot with 2 survfit objects, just like this one:?
https://drive.google.com/file/d/1fEcpdIdE2xYtA6LBQN9ck3JkL6-goabX/view?usp=sharing
Suppose I have 2 survfit objects: fit1 is for the curve on the left (survtime has been truncated to the cutoff line: year 5), fit2 is for the curve on the right (minimum survival time is at the
2010 Nov 21
1
"negative alpha" or custom gradient colors of data dots in scatterplot ?
I know that by setting alpha to for example col = rgb(0, 0, 0, 0.1) it is
possible to see how many overlapping is in the plot. But disadvantage of it
is that single points are barely visible on the background. So I wonder if
there is possible to make setting that single points would be almost black,
but with more and more data on the same spot it would get more and more
whiteish. Or maybe it is