Displaying 20 results from an estimated 10000 matches similar to: "problem with axis alignment when plotting 2 time series on same graph"
2009 May 28
1
plotting time series with data gap using type line- but do not want to connect gap with line
I have a time series of about 1500 measurements. There are sporadic data
gaps. I would like to plot the time series with type "line". I only want
a line to connect the periods with data; I don't want a line to connect
the points across a data gap. Is there a function or recommended method
to deal with this?
For example
there are 2000 days
days 1:1000 each have one
2010 Sep 01
3
how to represent error bar in a plot legend?
I have a simple barplot of 4 mean values, each mean value has an
associated 95% confidence interval drawn on the plot as an error bar.
I want to make a legend on the plot that uses the error bar symbol, and
explains "95% C.I."
How do I show the error bar symbol in the legend? I could not find any
"pch" values that are appropriate
Thanks
[[alternative HTML version
2010 Aug 07
4
basic question about t-test with adjusted p value
I have read the R manual and help archives, sorry but I'm still stuck.
How would I do a t-test with an adjusted p-value?
Suppose that I use t.test ( ) , with the function argument alternative =
"two.sided", and data such that degrees of freedom = 20. The function
calculates a t-statistic of 2.086, and p-value =0.05
How do I then adjust the p-value? My thought is to do
2009 May 29
1
Problem loading rJava
I am running R on Windows XP
I first tried to install rJava and got this message
utils:::menuInstallLocal()
package 'rJava' successfully unpacked and MD5 sums checked
updating HTML package descriptions
then i tried this
require(rJava)
Loading required package: rJava
Error in if (!nchar(javahome)) stop("JAVA_HOME is not set and could not be
determined from the registry") :
2013 Apr 12
1
support for POSIXct classes in image.default axes
Hello, I would like to suggest the following change to image.default in
src\library\graphics\R\image.R:
98c98
< plot(NA, NA, xlim = xlim, ylim = ylim, type = "n", xaxs = xaxs,
---
> plot(x[1], y[1], xlim = xlim, ylim = ylim, type = "n", xaxs = xaxs,
This provides all the support of axis.POSIXt that plot.default gives,
currently the default new plot in
2010 Apr 29
1
any feedback on XL Solutions Courses for R?
About a week ago, XL Solutions Corporation posted to this list with a
solicitation for course offerings in R. I looked at their site, and many
courses do look interesting. Can anyone provide feedback on the quality
of their courses?
[[alternative HTML version deleted]]
2010 Jun 14
2
how to make a barplot similar to Excel’s “clustered column chart”.
I have a matrix with 12 rows (one for each month), 2 columns (baseflow,
runoff). I would like to make a barplot similar to Excel’s “clustered
column chart”.
Here is my matrix ‘x’
8.258754 13.300710
10.180953 10.760465
11.012184 13.954887
10.910870 13.839839
9.023519 11.511129
7.189241 12.519830
5.925576 17.101491
5.211613 13.585175
2002 Nov 12
4
R: Error in plot.new() : axis style "d" not implemented
Hi there!
Both on windows and Solaris platforms I run into troubles when trying to
draw two plots on top of each other. Here a short code example:
> x1 <- c(2,3,4,5,6,7,8)
> y1 <- sin(x1)
> x2 <- c(1,2,3,4,5,6,7,8,9,10)
> y2 <- cos(x2)
> d1 <- cbind(x1,y1)
> d2 <- cbind(x2,y2)
> plot(d1)
> par(new=T, xaxs="d")
> plot(d2)
Error in plot.new()
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)
2010 Dec 16
2
moving average with gaps in time series
I have a time series with interval of 2.5 minutes, or 24 observations per
hour. I am trying to find a 1 hr moving average, looking backward, so
that moving average at n = mean(n-23 : n)
The time series has about 1.5 million rows, with occasional gaps due to
poor data quality. I only want to take a 1 hour moving average for those
periods that are complete, i.e. have 24 observations in the
2011 Dec 24
5
need help with a time series plotting problem
Dear R Users,
I am a beginner in R programming and need some help
with a simple plotting problem that i am having. My dataset consist of three
columns: first one has data_id, second is the date and third is the actual
data itself corresponding to each date. The date ranges from
1/1/2000-12/31/2009. I am trying to plot my data versus the dates as a long
term time series but
2007 Mar 22
1
Labelling a second y-axis
Hi,
I am using the following code as an example function to create
multiple y-axes on one plot. I have it working fine however, I can't
seem to add a label on the second (right) axis. I have tried adding
ylab="y2" in the axis call but, that didn't work; any ideas?
Thanks,
Jesse
Code:
function() {
par(las=1,xaxs="r",mai=c(1,0.75,1,1))
x<-1:10
y1<-x
2010 Apr 19
1
How to make a boxplot with exclusion of certain groups
This seems like a simple thing, but I have been stuck for some time. My
data has 2 columns. Column 1 is the value, and column 2 is the Site where
data was collected. Column 2 contains 7 different Sites (i.e. groups). I
am only interested in showing 3 groups on a single boxplot.
I have tried various methods of subsetting the data, in order to only have
the 3 groups in my subset. However
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:
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)
2003 Sep 18
2
hist will not use parameter xaxs (PR#4219)
Full_Name: Mark Wall
Version: 1.6.0
OS: linux
Submission from: (NULL) (63.251.119.254)
I want to plot a histogram of a *subset* of some data:
>t = c(0:9)
>hist(t,right=FALSE,breaks=10,xlim=c(0,5),xaxs="i")
This means I should plot a histogram from 0 to 5 with breaks at 1,2,3,4. This
should produce exactly 5 bars of frequency=1. Instead I get 5 and 1/4 bars. I
do not want the
2008 Mar 09
1
Calling plot with a formula, from within a function, using ..., and xlim
I ran into a weird, to me at least, problem, and hoping someone can
shed some light into it. In a nutshell, there seems to be some
problem when one calls plot with a formula, from within another
function, using ... to pass arguments, and one of those arguments
being xlim (and only xlim shows this problem). Here is an example:
> plotw <- function(obj,...) {
+ plot(k~j,
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 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