Displaying 3 results from an estimated 3 matches for "brewer_p".
Did you mean:
brewer
2023 Nov 24
1
ggplot adjust two y-axis
Hi,
I don't know the axis mecanism well enough in ggplot but using the original
barplot function you can add an axis on the right using the axis function.
Here is an example:
test <- as.table(matrix(c(2,10,3,11), 2,2))
barplot(test, beside = TRUE, col = scales::brewer_pal(palette = 1)(2))
axis(4, at = c(0, 5, 10), labels = c(0,50,100))
-----Message d'origine-----
De?: sibylle.stoeckli at gmx.ch <sibylle.stoeckli at gmx.ch>
Envoy??: 24 novembre 2023 09:27
??: 'Charles-?douard Gigu?re' <ce.giguere at gmail.com>; r-help at r-project.org
Ob...
2023 Nov 24
1
ggplot adjust two y-axis
...ggplot adjust two y-axis
Hi,
I don't know the axis mecanism well enough in ggplot but using the original
barplot function you can add an axis on the right using the axis function.
Here is an example:
test <- as.table(matrix(c(2,10,3,11), 2,2)) barplot(test, beside = TRUE, col
= scales::brewer_pal(palette = 1)(2)) axis(4, at = c(0, 5, 10), labels =
c(0,50,100))
-----Message d'origine-----
De?: sibylle.stoeckli at gmx.ch <sibylle.stoeckli at gmx.ch> Envoy??: 24 novembre
2023 09:27 ??: 'Charles-?douard Gigu?re' <ce.giguere at gmail.com>;
r-help at r-project.org Obj...
2023 Nov 24
1
ggplot adjust two y-axis
...ggplot adjust two y-axis
Hi,
I don't know the axis mecanism well enough in ggplot but using the original
barplot function you can add an axis on the right using the axis function.
Here is an example:
test <- as.table(matrix(c(2,10,3,11), 2,2)) barplot(test, beside = TRUE, col
= scales::brewer_pal(palette = 1)(2)) axis(4, at = c(0, 5, 10), labels =
c(0,50,100))
-----Message d'origine-----
De?: sibylle.stoeckli at gmx.ch <sibylle.stoeckli at gmx.ch> Envoy??: 24 novembre
2023 09:27 ??: 'Charles-?douard Gigu?re' <ce.giguere at gmail.com>;
r-help at r-project.org Obj...