[R] Reproducing a 3d yield curve plot from New York Times
David Winsemius
dwinsemius at comcast.net
Thu Jun 4 22:39:11 CEST 2015
At the bottom you asked for package recs:
Karline Soetaert's (excuse any misspelling) plot3D package should be examined.
I didn't find the fine-grained example that I remember seeing but this is an example in RGL code:
http://markmail.org/message/wgetbk5h3f7zrfd4
--
David.
On Jun 4, 2015, at 1:16 PM, matt at considine.net wrote:
> I am trying to closely reproduce the 3d yield curve chart that showed up in the New York Times in March, as seen here
> http://www.nytimes.com/interactive/2015/03/19/upshot/3d-yield-curve-economic-growth.html?ref=economy&abt=0002&abg=0
>
> Working with chartSeries3d0 gets me close, but not quite there :
>
> library(xts)
>
> chartSeries3d0 <-
> function(Z, theta=30, r=10, col=c("yellow","red"), smoother=1, border=NA, shade=.3,
> phi=10,scale=FALSE,expand=1,lphi=20,box=FALSE, #mattc
> ltheta=20, x.cex=.75, srt=0,...) {
snipped code and data
>
> Can anyone suggest a different package to work with to get closer to the above-mentioned output? I'm interested in figuring out how to smooth the color transitions, add the grid/gridlines and use a different set of color gradients when the values are negative. Also, I realize that my colors transition along the wrong axis (1m, 3m, etc) rather than along y.
>
> Thanks in advance. I've tried to find a reference to this in the archives and have come up empty. As well, I've tried to make this reproducible.
> Matt
>
I'm reasonably sure that MatLab has a function for this sort of dispaly and requests for duplicating it with R facilities have been satisfied.
--
David Winsemius
Alameda, CA, USA
More information about the R-help
mailing list