Displaying 20 results from an estimated 10000 matches similar to: "Custom axis with months name"
2007 Aug 23
1
two labels on x-axis (year and month)
hej
i'm plotting time-series and label the x-axis as follows:
r <- as.POSIXct(round(range(p1$time), "month"))
to define the time range for labeling the xaxis
plot(p1$time,p1$ p1, type="l", xaxt="n")
plots p1 against time
axis.POSIXct(1, at=seq(r[1], r[2], by="month"), format="%m")
labels the axis in mothly steps.
what I want do do
2009 Mar 04
2
patch for axis.POSIXct (related to timezones)
I am finding that axis.POSIXct uses the local timezone for deciding where to
put tic marks, even if the data being plotted are in another time zone. The
solution is to use attr() to copy from the 'x' (provided as an argument) to
the 'z' (used for the 'at' locations).
I have pasted my proposed solution in section 1 below (as a diff). Then, in
section 2, I'll put some
2010 Nov 24
3
Custom ticks on x axis when dates are involved
Hi,
I have a set of irregular time series and i want to produce a simple plot, with dates on x axis and attribute value of y axis. This is simple enough but my x axis is divided automatically by ticks every 5 years. I would like to have a tick every year at January 1st. I am not sure how i can do that - i end up with something very close to what i want, but it is clunky and not very correct. I
2009 May 11
1
inconsistent results for axis.POSIXct
Some time ago, I posted a note about what I considered to be a bug in
axis.POSIXt() for R 2.8.x, relating to whether timezones in the data are
obeyed on the axes. A link to that note, and to a quick and helpful
response, is at the following URL
http://www.nabble.com/patch-for-axis.POSIXct-%28related-to-timezones%29-td22338700.html#a22338700
Note that R 2.9.0 has been adjusted to help with
2004 May 27
2
axis.POSIXct: Datetime data and plotting
I've run into a problem with the datetime axis generated by axis.POSIXct. It appears a similar issue was discussed in October 2003 under the subject line "datetime data and plotting" (see https://stat.ethz.ch/pipermail/r-help/2003-October/039071.html), but I wasn't able to determine whether there is a straightforward solution.
The code below produces a graph with apparently
2007 Sep 11
1
POSIXct dates on x-axis using xyplot
I am using 'xyplot' in lattice to plot some data where the x-axis is a
POSIXct date. I have data which spans a 6 month period, but when I
plot it, only the last month is printed on the right hand side of the
axis. I would have expected that at least I would have a beginning
and an ending point so that I have a point of reference as to the time
that the data spans. Here is some test
2008 Sep 03
1
ggplot2: line plot with gaps in time axis
Hello, I'm trying to plot data that has gaps in the timeline because my data
only has the business day in it. When I do a line plot I get the data and
then a blank area where a line goes the tail of the last data point to the
head of the next data point. Is there a way I can do a line plot where the
gaps are not plotted?
Thanks in advance,
Brian
> names(utildf)
[1]
2009 Dec 21
1
proposal for new axis.Date/axis.POSIXct
Hi R-devel.
I've noticed a couple of quirks in the current time/date axis
functions (axis.Date, axis.POSIXct, and the equivalents in lattice).
Looking at the code, it seems like a fairly ad-hoc approach, often
using pretty() on components of the time. This is not always ideal -
for example a one-hour interval gets cut into 10-minute chunks rather
than the more natural 15-minute chunks (since
2009 Nov 05
2
annotating time axis by axis.POSIXct
Dear all
I try to format labels on axis as standard ones does not look well, but I
am not able to make axis.POSIXct to work. here is an example
x<-seq(as.Date("2008-1-1"), as.Date("2009-9-6"), by="2 months")
y<-rnorm(11)
plot(x,y) #not very sophisticated axis
plot(x,y, axes=F)
axis(2)
axis.POSIXct(1, at=x, format="%m/%Y") # no axis
The same is on
2009 Oct 19
2
Possible bug in plot.POSIXct regarding x axis
I believe I have found a bug (or at least a misfeature) in plot.POSIXct.
See the following example code.
set.seed(1)
x=seq(1,1e8,length=100)+round(runif(100)*1e8)
y=as.POSIXct(x,origin="2001-01-01")
plot(y)
This plots some random (date)times against their indices. The y axis
correctly shows appropriate values (years), but the x axis contains the
single number '59:58' in the
2012 Nov 23
3
daily maximum temperature
Hello,
I want to filter the daily maximum temperature. For this i made this
skript, but it come out wrong results. Can anybody help me?
Thanks for your help!
Best regards
datos$X <- as.POSIXct(strptime(datos$X, "%d/%m/%Y %H:%M:%S"))
z <- aggregate(zoo(datos$Ta), as.POSIXct(datos$X), max)
> str(datos)
'data.frame': 17137 obs. of 5 variables:
$ X : Factor w/
2012 Aug 09
1
POSIXct to ts
Hi,
I have a dataframe (try.1) with date/time and temperature columns, and the date/time is in POSIXct fomat. Sample included below.
I would like to to try decompose () or stl() to look at the trends and seasonality in my data, eventually so that I can look at autocorrelation. The series is 3 years of water temperature with clearly visible seasonal periods.
Right now, if I try decompose,
2001 Sep 19
1
X-axis with POSIXct dates
I have a series of datasets, each containing pH measurements and
manufacturing dates, and each dataset pertains to a different manufactured
product. I'm trying to create a series of plots of pH measurements by
date, but the default X-axis labeling behavior is not giving adequate
results in this particular case, and I can't figure out how to persuade R
to come up with something more
2010 Nov 16
1
format secondary axis for dates
Dear List,
this may be a Newbi question and may have been asked several times, but i am too stupid to find the posts.
I have a plot of values against POSIXct time steps. If I want to add a second x axis to the top margin of the plot, only numbers are at the tickmarks. Is there a straightforward way to specify the format to convert them to character representations (similar to the labels at the
2007 Oct 25
1
Strange behavior with time-series x-axis
I recently called plot(x,y) where x was an array of POSIXct timestamps,
and was pleasantly surprised that it produced a nice plot right out of
the box:
z <- as.POSIXct(c("2006-10-26 08:00:00 EDT","2007-10-25 12:00:00 EDT"))
x <- seq(z[1],z[2],len=100)
y <- 1:100
plot(x,y,type="l")
The X axis had nice labels, one tick mark every other month. (Plotting
on
2004 Jun 16
3
Aggregating on Water Year Rather Than Calendar Year
The US water year extends from 01 October yyyy-1 through 30 September yyyy
and is referenced by the year starting on the included 01 January yyyy.
I'd like to be able to find the annual means for the water year. To do so
I've taken the input date-time, which is in the usual format
"1991-10-07 10:35:00"
changed it by:
w$d<-as.POSIXct(w$date.time)
Now I can add an
2012 Jan 20
3
break an axis.POSIXct
Hi
I like to use "axis.POSIXct" to plot days from 2006 till 2008. But I
only have datas for the summer months. Is it possible to get two axis
breaks, to have not so long distances without points?
thx
Christof
2005 Sep 23
2
Strange behaviour of as.Date function
Dear All,
I'm happily extracting data of temperature from an oracle db
under R via RODBC. After manipulating the extracted data I put them
into a data.frame 'dati' which is as follows:
> dati
DATA tm.
UDINE/RIVOLTO tm.TORINO/CASELLE
1 2005-07-01
22.35 23.80
2 2005-07-02 22.70
22.85
3 2005-07-03 23.80
2010 Feb 05
2
lattice barchart using a time scale in x axis
I'm trying to produce a barchart plot with groups, in which each group is placed in a particular
time scale in x-axis. If I use barchart directly it does not take the time scale. I've tried with
xyplot and adding a panel.barchart, I have the bars in the right place, but not the three groups I'm
trying to produce. I've tried defining panel and panel.group, but can't get it to
2011 May 14
1
Using dates on axis with Grid plots
Hi,
I'm trying to use Grid plots and would like to have an X axis that
represents dates. I have several years of data so I would like to be able to
have labeled tick marks only intermittently (not one per date). I can
transform the initial data from a date time string into POSIXlt or POSIXct,
or Date objects.
The issue is that when I try to layout the plot using:
dev.off()
pushViewport(