On 31.10.2017 00:56, Alex Restrepo wrote:
Hi,
I would like to rotate the x axis tick labels by 45 degrees. Using the code
below, could someone please provide an example? Many Thanks In Advance, Alex
45 degree rotation is not supported in base R graphics and scatterplot3d
uses that.
You can use par(las=2)
before your code and get them rrotated by 90 degrees, or you can add
them individually by
s3d <- scatterplot3d(....
Afterwards you could try along trhese lines:
par(xpd=TRUE)
text(s3d$xyz.convert(desired positions of labels in 3D coordinate
system), labels, angle=45)
(untested)
Best,
Uwe Ligges
library("scatterplot3d")
mydf=data.frame(rate=seq(158, 314)
,age=seq(1, 157)
,market_date=seq(as.Date("2000/1/1"), as.Date("2003/1/1"), by="7
days"))
mydf$market_date=as.Date(mydf$market_date, format="%Y-%m-%d")
scatterplot3d(mydf$market_date
,mydf$rate
,mydf$age
,x.ticklabs = seq(as.Date("2000/1/1"), as.Date("2003/1/1"), by="330
days"))
[[alternative HTML version deleted]]
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.