Is there a way to produce logarithmic y-axis with chart_Series()
? I am using the experimental chart_Series()
rather than the chartSeries()
method in quantmod
, because it is more convenient when adding additional lines to the plot.
library(quantmod)
POWR <- getSymbols("POWR", auto.assign=FALSE)
# the following attempts did not produce logarithmic axis for y
chart_Series(POWR, log.scale=TRUE) # like in chartSeries()
chart_Series(POWR, log="y") # like in plot.default()
From a quick look into the code, it does not seem to be possible using existing chart_pars()
or chart_theme()
methods for customization, too.
Thank you very much for any help.
Your extra arguments don't work because they aren't expected as passthrough parameters (via
...
) to any function insidechart_Series
. If you simply want log candles, trychart_Series(log(POWR))
If you don't need an OHLC chart and the Close is all you need you can use the
chart.TimeSeries
function from the 'PerformanceAnalytics' - package, where you have lots of options to customize the chart.