Maria Lathouri
2023-Jul-16 22:57 UTC
[R] how to change the y-axis to logarithmic in a barplot ggplot
I will find the ggplot help.? But I have tried everything, including what you have suggested and nothing works. Kind regards, Maria ???? ??????? 16 ??????? 2023 ???? 11:22:36 ?.?. GMT+1, ? ??????? CALUM POLWART <polc1410 at gmail.com> ??????: Try adding scale_y_log10() This is a general R help list. It's not a ggplot list and you are likely to be chased off to ggplot's package maintainers nominated support pages. But really a Google search should surely have found this? On Sun, 16 Jul 2023, 22:51 Maria Lathouri via R-help, <r-help at r-project.org> wrote:> Dear all,? > > ggplot(fc, aes(x = Temp, y = mean, fill = Glass)) +? > geom_bar(stat = "identity", position = "dodge", aes(y=log(mean)))? > + theme_bw() + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) + theme(legend.position = c(0.45, 0.85), legend.title = element_blank())? > + scale_fill_brewer(palette = "Dark2") + scale_color_brewer(palette = "Dark2") + >scale_y_log10()
CALUM POLWART
2023-Jul-16 23:12 UTC
[R] how to change the y-axis to logarithmic in a barplot ggplot
The data snippet doesn't make sense for the code you provided Using the snippet I'd be doing ggplot2(fc, aes(x = ID, y= value)) + geom_col() + scale_y_log10() And adjusting... Not sure if that's what you are trying to do? On Sun, 16 Jul 2023, 23:57 Maria Lathouri, <mlathouri at yahoo.gr> wrote:> I will find the ggplot help. > > But I have tried everything, including what you have suggested and nothing > works. > > Kind regards, > Maria > > > > > > > ???? ??????? 16 ??????? 2023 ???? 11:22:36 ?.?. GMT+1, ? ??????? CALUM > POLWART <polc1410 at gmail.com> ??????: > > > > > > Try adding > > scale_y_log10() > > This is a general R help list. It's not a ggplot list and you are likely > to be chased off to ggplot's package maintainers nominated support pages. > > But really a Google search should surely have found this? > > > > On Sun, 16 Jul 2023, 22:51 Maria Lathouri via R-help, < > r-help at r-project.org> wrote: > > Dear all, > > > > ggplot(fc, aes(x = Temp, y = mean, fill = Glass)) + > > geom_bar(stat = "identity", position = "dodge", aes(y=log(mean))) > > + theme_bw() + theme(panel.grid.major = element_blank(), > panel.grid.minor = element_blank()) + theme(legend.position = c(0.45, > 0.85), legend.title = element_blank()) > > + scale_fill_brewer(palette = "Dark2") + scale_color_brewer(palette > "Dark2") + > > > scale_y_log10() > >[[alternative HTML version deleted]]
Bert Gunter
2023-Jul-16 23:20 UTC
[R] how to change the y-axis to logarithmic in a barplot ggplot
Maria, ggplot is part of the Posit -- formerly RStudio -- assortment of contributed packages. They have their own support site here <https://posit.co/support/> , which you *may* find useful for such questions, also. Though ggplot queries *are* frequently posted and answered on R-Help. Cheers, Bert On Sun, Jul 16, 2023 at 3:58?PM Maria Lathouri via R-help < r-help at r-project.org> wrote:> I will find the ggplot help. > > But I have tried everything, including what you have suggested and nothing > works. > > Kind regards, > Maria > > > > > > > ???? ??????? 16 ??????? 2023 ???? 11:22:36 ?.?. GMT+1, ? ??????? CALUM > POLWART <polc1410 at gmail.com> ??????: > > > > > > Try adding > > scale_y_log10() > > This is a general R help list. It's not a ggplot list and you are likely > to be chased off to ggplot's package maintainers nominated support pages. > > But really a Google search should surely have found this? > > > > On Sun, 16 Jul 2023, 22:51 Maria Lathouri via R-help, < > r-help at r-project.org> wrote: > > Dear all, > > > > ggplot(fc, aes(x = Temp, y = mean, fill = Glass)) + > > geom_bar(stat = "identity", position = "dodge", aes(y=log(mean))) > > + theme_bw() + theme(panel.grid.major = element_blank(), > panel.grid.minor = element_blank()) + theme(legend.position = c(0.45, > 0.85), legend.title = element_blank()) > > + scale_fill_brewer(palette = "Dark2") + scale_color_brewer(palette > "Dark2") + > > > scale_y_log10() > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Kimmo Elo
2023-Jul-17 11:21 UTC
[R] how to change the y-axis to logarithmic in a barplot ggplot
Hi, try: scale_y_continuous(trans='log10') HTH, Kimmo 17. hein?k. 2023, 1.58, Maria Lathouri via R-help <r-help at r-project.org<mailto:r-help at r-project.org>> kirjoitti: I will find the ggplot help. But I have tried everything, including what you have suggested and nothing works. Kind regards, Maria ???? ??????? 16 ??????? 2023 ???? 11:22:36 ?.?. GMT+1, ? ??????? CALUM POLWART <polc1410 at gmail.com> ??????: Try adding scale_y_log10() This is a general R help list. It's not a ggplot list and you are likely to be chased off to ggplot's package maintainers nominated support pages. But really a Google search should surely have found this? On Sun, 16 Jul 2023, 22:51 Maria Lathouri via R-help, <r-help at r-project.org> wrote: Dear all, ggplot(fc, aes(x = Temp, y = mean, fill = Glass)) + geom_bar(stat = "identity", position = "dodge", aes(y=log(mean))) + theme_bw() + theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank()) + theme(legend.position = c(0.45, 0.85), legend.title = element_blank()) + scale_fill_brewer(palette = "Dark2") + scale_color_brewer(palette = "Dark2") + scale_y_log10() ________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. [[alternative HTML version deleted]]