Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the theme functions of ggplot2

Shulou Source: shulou.com Published: 2022-06-01 04:56:16 10月04日 Update

Most people do not understand the knowledge points of this article "what are the theme functions of ggplot2?", so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "what are the theme functions of ggplot2" article.

Dat type Sample Num1 A sample1 902 B sample1 343 C sample1 564 D sample1 995 E sample1 156 A sample2 507 B sample2 208 C sample2 249 D sample2 7010 E sample2 14

Basic drawing, if you do not set the specific parameters of theme:

P = ggplot (dat, aes (x = type,y = Num,fill = Sample) + geom_bar (stat = "identity", width = 0.6 position = "dodge") + scale_fill_manual (values = c ("red", "blue") + labs (x = "", y = ", title =" test ") + geom_text (label = dat$Num), position=position_dodge (width = 0.5) Size = 5pm vjust =-0.25p

Apply theme_bw ():

P1=p+theme_bw () p1

Apply theme_classic ():

P2=p+theme_classic () p2

Apply theme_void ():

P3=p+theme_void () p3

Others include a variety of:

Theme_dark () theme_grey () theme_gray () theme_light () theme_get () theme_linedraw ().... Wait

The above is about the content of this article on "what are the theme functions of ggplot2". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.

Tags: Content theme function article knowledge article value parameter foundation variety most that is more steps knowledge points industry information information channels channels help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux OPPO Reno vpn Microsoft Shulou Information