[R] Working with quantmod chartSeries and plot.zoo

OTB olibirgis at gmail.com
Fri Jul 27 07:21:21 CEST 2012


Hi all,

I'm a newbie to R and it has been very helpful to use your website.
Unfortunately I've been struggling with my code now for two days so I wanted
to ask few questions. I've been trying to create nice graphs to put into a
pdf sheet but I'm having little problems with all the packages I've been
using. So what I want to accomplish is create one pdf sheet with three
graphs and one correlation table. Attached is an example I created which is
very similar to what I want to do but there are few things I would like to
change. I'm using chartSeries in quantmod for the graphs and for the table
I'm using textplot. Few questions:

1) Is it possible to remove the date in the upper right corner of the
graphs?
2) Instead of the text Last xxxx (the green series) I would like to get the
name of the series itself, e.g. Stock 1, is that doable? 
3) How can I give the axes names, e.g. Return, Date?
4) In the Cumulative Difference graph I'm using the addVo() and that
function gives this nice barPlot. In the other graphs I'm not using addVo()
just addTA and type='h' and you can see the difference of the bar/histogram
plots. Is it possible to get the same plot using addTA as in addVo?
5) What is the best way to fit the correlation table nicely in the file and
maybe also set the number of digits?


I've also been trying to use plot.zoo because it is easier to work with the
chart but it seems like impossible to get all the graphs into one page in
pdf similar to the attached file. The graphs always display on separate
pages. I've tried layout, which works for quantmod, and par(mfrow=), which
works for regular plots, but neither seem to work for plot.zoo. What is the
right way to do this?
http://r.789695.n4.nabble.com/file/n4638057/TestGraph.pdf TestGraph.pdf 

I appreciate your help.

Best,
OTB 



--
View this message in context: http://r.789695.n4.nabble.com/Working-with-quantmod-chartSeries-and-plot-zoo-tp4638057.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list