Does chart_Series () function work with a logarithmic axis?
Is there a way to create a log y-axis with chart_Series()
? I am using experimental chart_Series()
, not method chartSeries()
in quantmod
, because it is more convenient when adding additional lines to the graph.
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()
With a quick look at the code, it is not possible with existing methods chart_pars()
or chart_theme()
for customization.
Thanks a lot for any help.
If you don't need an OHLC chart, and all you do is, you can use a feature chart.TimeSeries
from the PerformanceAnalytics suite where you have many options for customizing the chart.
chart.TimeSeries(cumprod(1+ ROC(POWR, type = "discrete")[-1,6]),ylog = TRUE,minor.ticks =FALSE)
Your extra arguments don't work because they are not expected to pass through (through ...
) parameters to any function inside chart_Series
. If you just want to use candles try chart_Series(log(POWR))