[R-SIG-Finance] quantmod - chart object (chob)

Jeffrey Ryan jeffrey.ryan at lemnica.com
Sun Jun 19 17:59:13 CEST 2011


One item to note - they are built with a custom tool built for
quantmod called 'replot'.  Essentially is a layout tool to align the x
(time) axis, but using base graphics (not grid).

Mixing traditional graphics and grid is really not easy - and grid is
really, really slow (see ggplot2) - so you probably will have a hard
time with the approach you are thinking of.  Luckily nothing is
impossible - so if you have success, please share your results!!

Best,
Jeff

On Sun, Jun 19, 2011 at 10:49 AM, Stanley Chu <chd850 at gmail.com> wrote:
> Hi Jeff & Brian,
>
> Thanks for the reply.
>
> The idea is to be able to save the plot object for future reference, with minimal work to reproduce it, and to be able to use them freely in a document. For example, one may be able to use a viewport function to specify the layout.
> e.g. vplayout <- function(x, y) viewport(layout.pos.row = x, layout.pos.col = y), and use print(plot.list, vp = vplayout(x, y)) to place them in a document. Given a list of plot objects and defined "position" for each plot, the function should be able to render them accordingly in a document.
>
> I can probably use dev.copy2pdf and manually tile them, so no biggie. Thanks Jeff for your wonderful package(s).
>
>
> Thanks,
> Stanley
>
> On Jun 19, 2011, at 6:48 PM, Jeffrey Ryan wrote:
>
>> Stanley,
>>
>> As Brian replied - you _can_ - but the trick is to use the new version
>> "chart_Series".  This creates single drawings with multiple 'panes'
>> all within what R *thinks* is a single graphic - whereas the old code
>> relied on layout internally - so was very difficult to use layout with
>> an existing layout.
>>
>> It isn't very easy to build up a list to be plotted later though,
>> should be workable I suppose - I just haven't tried or needed I guess.
>>
>> Best,
>> Jeff
>>
>> On Fri, Jun 17, 2011 at 12:38 PM, Hungte (Stanley) Chu <chd850 at gmail.com> wrote:
>>> Hi everyone,
>>>
>>> I am curious that if I can collect a list of chob objects and later tile these plots in a pdf file. I have a function to handle this for r plot objects, but I am having trouble with chob. In simple words, print(chob) does not work. Can anyone point me a direction?
>>>
>>> Thanks,
>>> Stanley
>>>
>>> _______________________________________________
>>> R-SIG-Finance at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>>> -- Subscriber-posting only. If you want to post, subscribe first.
>>> -- Also note that this is not the r-help list where general R questions should go.
>>>
>>
>>
>>
>> --
>> Jeffrey Ryan
>> jeffrey.ryan at lemnica.com
>>
>> www.lemnica.com
>> www.esotericR.com
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
>



-- 
Jeffrey Ryan
jeffrey.ryan at lemnica.com

www.lemnica.com
www.esotericR.com



More information about the R-SIG-Finance mailing list