[R] Scatterplot3d :: Rotating x tick labels by x degrees
dwinsemius at comcast.net
Tue Oct 31 22:13:34 CET 2017
> On Oct 31, 2017, at 8:55 AM, Olivier Crouzet <olivier.crouzet at univ-nantes.fr> wrote:
> Hi Alex,
> this should be related to the "las" argument of "par()" but
> actually it does not seem to be parametered in scatterplot3d.
> Searching the net for "scatterplot3d las" provides a link to:
> You may try the solution that is provided in this link or consider using
> alternate packages (like rgl or the plotly packages which one may be
> more powerfull as far as I can judge). However I can't help more. It
> seems ggplot does not produce 3d plots (but it looks like it can
> interact with plotly when using 3d plots).
The cited SO solutions (mine being the first one) were addressing the request for rotated "axis"-labels rather than rotated "axtick"-labels, although the general strategy of looking at the code and using the `text`-function with xpd=TRUE (rather than the `mtext`-function where needed in the definitions of mytext and mytext2) should apply.
I'd encourage you to demonstrate more initiative rather than expecting us to be on-call code servants. I've decided to limit my gratis coding time to 15 minutes daily. I think this might take me an hour or more. I'm still available for on-list code review on this effort.
As a start, I'd suggest downloading the scatterplot3d package code and then open up scatterplot3d.R. Find the comment
## label tick marks
... and perhaps decide whether you need to use `text` rather than `mtext`. (`text` can rotate by any amount,
but may need "xpd" to be set TRUE. `mtext` is limited to 90 degree increments.) I've used up my time, so the next move is yours.
> On Mon, 30 Oct 2017
> 23:56:02 +0000 Alex Restrepo <alex.restrepo at outlook.com> wrote:
>> 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
>> 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")
>> ,x.ticklabs = seq(as.Date("2000/1/1"), as.Date
>> ("2003/1/1"), by="330 days"))
>> [[alternative HTML version deleted]]
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide
>> http://www.R-project.org/posting-guide.html and provide commented,
>> minimal, self-contained, reproducible code.
> Olivier Crouzet, PhD
> /Assistant Professor/
> @LLING - Laboratoire de Linguistique de Nantes
> UMR6310 CNRS / Université de Nantes
> /Guest Researcher/
> @UMCG (University Medical Center Groningen)
> ENT department
> Rijksuniversiteit Groningen
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Alameda, CA, USA
'Any technology distinguishable from magic is insufficiently advanced.' -Gehm's Corollary to Clarke's Third Law
More information about the R-help