Skip to content

quantmod library chartSeries() function x-axis

1 message · Andre Luiz Tietbohl Ramos

#
Hello,

I'd like to have a custom x-axis label on a plot and cannot find how to do
it.  Suppose the below call to this function:

full.window.color.bg <- 'gray63'
x <- 'PETR4.SA'       ## available data previously downloaded
chartSeries(x,
            name = 'PETR4',
            type = "line",
            lwd = 2,
            theme = chartTheme("white",
                               up.col = 'darkgreen',
                               axis.text.x = element_text(size = 5, angle =
50, hjust = 1),
                               bg.col = full.window.color.bg,
                               area = full.window.color.bg
                               ),
            TA = NULL
            )

It does not work. Even adding the command below does work neither.

+ axis.text.x(size = 5, angle = 50, hjust = 1)

Any suggestion is highly appreciated.  TIA.

Regards,

--
Andr? Luiz Tietbohl Ramos, PhD