Displaying 20 results from an estimated 4000 matches similar to: "two labels on x-axis (year and month)"
2009 Jun 20
4
Customize axis labels in xyplot
Hello,
I'm plotting an xyplot where a continuous var recorded every min is plotted
on y, and time expressed as HH:MM:SS on x, as follows :
xaxis=list(tick.number=12,rot=90)
lst=list(x=xaxis)
xyplot(upt$LOAD_1 ~ upt$TIME, data=upt, type=c('g','p', 'r'), scales=lst)
On the x-axis, every time label is drawn and the label quickly become
unreadable as they overlap on each
2007 Aug 22
1
Time conversion problems
Hi there
I have precipitation data from 2004 to 2006 in varying resolutions (10 to 20min intervals) with time in seconds from beginnig of the year (summation) and a second variable as year.
I applied follwing code to convert the time into a date:
times<-strptime("2004-01-01", "%Y-%m-%d", tz="GMT") + precipitation$time1
everytihng went well, except that every
2007 Aug 22
1
plot in for loop with "i" indexed variables does not work
Hi there
Does anyone know, why this is not working?:
par(mfrow = c(5, 5))
for (i in 1:10){
plot(x=time, y=Var.i)
}
(x-variable is time
y-variable is Var out of matrix with columns Var.1 Var.2 Var.3 etc...)
even
for (i in 1:10){
plot(x=time, y=paste("Var", i, sep=".")
}
does not work
Thanks
marc
2007 Aug 23
1
Conversion of zoo object (with POSIXct-attributes) to dataframe
i'm trying to convert a zoo object of the following specifications:
> str(z)
atomic [1:15642] 0 0 0 0 0 0 0 0 0 0 ...
- attr(*, "index")='POSIXct', format: chr [1:15642] "2004-09-01 02:00:00" "2004-09-01 03:00:00" "2004-09-01 04:00:00" "2004-09-01 05:00:00" ...
- attr(*, "frequency")= num 0.000278
to convert into a
2003 Feb 21
1
how to turn axis labels for trellis/dotplot
hi,
it occurs quite naturally that groupnames have so many characters that
they overlap as horizontally printed labels for the xaxis in a
dotplot. is it possible to turn ('par(las=1)') the (x)axis-labels in a
dotplot? in general, is it possible to add new customization themes to
trellis.get()?
any solution is very welcome!
tomy
--
no signature
2011 Feb 07
2
Confused
Hi
Im confused by one thing, and if someone can explain it I would be a happy
> rev(strsplit("hej",NULL))
[[1]]
[1] "h" "e" "j"
> lapply(strsplit("hej",NULL),rev)
[[1]]
[1] "j" "e" "h"
Why dossent the first one work? What is it in R that "fails" so to say that
you need to use lapply for it to get
2001 Nov 22
4
changing the magnification of axis annotation
Hi all,
how do I change the magnification of xaxis annotation? I need a smaller
axis text size in some of my plots. I tried cex.axix=0.5 in plot(), but
this doesn't work.
Thanks, Sven
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or
2005 Oct 03
2
grob questions
If I run the following example from:
http://www.stat.auckland.ac.nz/~paul/grid/doc/grobs.pdf
> grid.newpage()
> pushViewport(viewport(w = 0.5, h = 0.5))
> myplot <- gTree(name = "myplot", children = gList(rectGrob(name = "box",
+ gp = gpar(col = "grey")), xaxisGrob(name = "xaxis")))
> grid.draw(myplot)
>
2005 Dec 28
3
Axis/Ticks/Scale
Dear All,
Apologies for this simple question and thanks in advance for any help given.
Suppose I wanted to plot 1 million observations and produce the command
plot(rnorm(1000000))
The labels of the xaxis are 0, e+00 2 e+05 etc. These are clearly not very
attractive (The plots are for a PhD. thesis).
I would like the axes to be 0,2,4,6,8,10 with a *10^5 on the right hand
side.
Is there a
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
2006 Oct 11
4
Help on direction of axis in R needed
Hi!
I'd like to plot things with axes going from the
highest to the lowest value, so that e.g. high values
on the xaxis are plotted to the left and low values to
the right.
Could anyone tell me how this is done? I couldn't find
anything in the documentation.
Thanks a lot!
Silli
2011 Aug 18
1
Where are the ticks on grid.xaxis?
Hi R list,
I like the default ticks that are set up using grid.xaxis() or grid.yaxis()
with no arguments. Finding good values for the 'at' argument is usually not
a trivial task; the default behavior of these functions seems to work well.
The problem with this strategy is that I cannot figure out how to "recover"
the positions of these ticks when you do NOT specify the
2008 Jul 09
1
childNames for xaxis grob (grid package)
Dear list,
Can someone explain why the childNames below
gives
character(0)
instead of the (canonical) names of the children grobs
of the xaxis gTree ?
[1] "major" "ticks" "labels"
Many thanks in advance,
Tobias
### minimal example code ###
library(grid)
pushViewport(plotViewport(c(5,4,4,2)))
pushViewport(dataViewport(1:5, 1:5))
grid.points(1:5, 1:5)
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,
2008 Mar 03
1
Barplot with grouping x axis and count data
Hello,
I am trying to make a barplot with nested count data which is build like
this: first there are several birds (n)laying 3 clutches composed of 2 eggs
half of the second and third clutch received treatment and this treatment
was tested to influence sex of offspring. I want a barplot showing counts
for male and female for every egg of every clutch. can someone tell me what
to do? I drew a
2012 Mar 14
1
How to extend a slot of a class?
Hej hej,
is there a way to extend the SpatialPointsDataFrame data slot?This is the structure of an object of it:> str(coord)
Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
..@ data :'data.frame': 214 obs. of 2 variables:
.. ..$ location.long: num [1:214] -79.8 -79.8 -79.8 -79.8 -79.8 ...
.. ..$ location.lat : num [1:214] 9.16 9.16 9.16
2010 Apr 14
1
Problems getting symbols() to show table data
Hello,
I am trying to create a graphic to help me visualise data. A (very
simplified) sample of the data is
http://n4.nabble.com/file/n1839676/circle_data.txt circle_data.txt :
Aug-07 Nov-07 Feb-08
data1 1 1.5 -1
data2 1 1.2 1.6
data3 1.3 1.4 1.8
data4 1.3
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
2007 Dec 03
1
Plotting monthly timeseries with an x-axis in "time format"
I have the following timeseries "tab"
=====================================
> str(tab)
mts [1:23, 1:2] 79.5 89.1 84.9 75.7 72.8 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:2] "Ipex...I" "Omel...E"
- attr(*, "tsp")= num [1:3] 2006 2008 12
- attr(*, "class")= chr [1:2] "mts" "ts"
> tab
2008 Mar 31
1
Reorder the x-axis using lattice
Dear list,
Is there a way to reorder the xaxis using lattice. Using the following data, the x-axis is ordered as BP GH MH PF RE RP SF VT but I would like the x-axis to be ordered as PF RP BP GH VT SF RE MH.
Kön Skalor Tillfälle Medelvärde
1 Kvinnor BP 1-inskrivning 36.45283
2 Kvinnor GH 1-inskrivning 38.62255
3 Kvinnor MH 1-inskrivning 62.88889
4