[R-SIG-Finance] how to save the quantstrat performance chart

Jim Green student.northwestern at gmail.com
Wed Mar 28 03:57:06 CEST 2012

On 27 March 2012 21:34, Brian G. Peterson <brian at braverock.com> wrote:
> On Tue, 2012-03-27 at 21:20 -0400, Jim Green wrote:
>> Good Evening!
>> in maCross.R in the demo folder of quantstrat,
>> chart.Posn(Portfolio='macross',Symbol=stock.str) is called to generate
>> the performance chart. internally it calls chart_Series in quantmod.
>> the chart it produced is very nice, the only thing that bothers me is
>> the font of the label is too small and looks like there is no easy way
>> to zoom in an out interactively.
>> Could anyone advise how to save that chart to some image format on the
>> hard drive so I can zoom in and out without much loss of definition? I
>> tried quantmod documentation and came across saveChart command but
>> still don't know how to integrate to maCross.R for example.
> After it has already been created, see
> ?dev.copy2pdf

it worked beautifully. Thanks Brian!


> otherwise, see
> ?pdf
> I tend to not spend too much time messing about with font sizes and
> such, preferring rather to see the information and move on, but patches
> are always welcome.
> Regards,
>  - Brian
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock

More information about the R-SIG-Finance mailing list