[R-SIG-Finance] Multiple quantmod charts on one plot ?
jeff.a.ryan at gmail.com
Tue Apr 20 17:03:15 CEST 2010
One of the weaknesses to the original quantmod charts is the
difficulty in layout.
The (very dated) examples on the site are made by carefully managing
the layout (final expected layout) with the R function... 'layout'.
Search the list for some examples of how to do this, but suffice it to
say here that the answer revolves around 'layout' and passing
layout=NULL to the charting calls.
The newest R-forge version fixes all of this. The code you have below
is essentially how you would use the new version, though lineChart and
co. are not yet available as wrappers.
chart_Series and add_TA will get most of what you want done, and
feedback is appreciated as I hope to get this to CRAN now that the
R/Finance conference is over.
Eventually the names will move back to the old chartSeries etc
convention, but for now to keep some sanity in old code, I will
provide both old and new functionality.
On Tue, Apr 20, 2010 at 9:53 AM, Ulrich Staudinger
<ustaudinger at gmail.com> wrote:
> Hi there,
> I try to replicate the nice chart on http://www.quantmod.com/gallery/, but
> am stuck at putting several charts onto one plot.
> In traditional R, I would do:
> ... but with quantmod, when I:
> then I see only the line chart of data2.
> What do I have to use to put several line/candle/barcharts onto one plot
> Kind regards,
> Ulrich B. Staudinger
> [[alternative HTML version deleted]]
> R-SIG-Finance at stat.math.ethz.ch mailing list
> -- 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 at insightalgo.com
ia: insight algorithmics
More information about the R-SIG-Finance