ggplot2主題可能會(huì)用到的操作有哪些,針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。
我們提供的服務(wù)有:成都做網(wǎng)站、成都網(wǎng)站設(shè)計(jì)、微信公眾號(hào)開(kāi)發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、霍州ssl等。為上千企事業(yè)單位解決了網(wǎng)站和推廣的問(wèn)題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的霍州網(wǎng)站制作公司
df <- data.frame(x = 1:10, y = (1:10)^2)
ggplot(df, aes(x = x, y = y)) +
geom_point()
參考 Remove elements from ggplot
ggplot(df, aes(x = x, y = y)) +
geom_point()+
theme(panel.background = element_blank())
https://ggplot2.tidyverse.org/reference/theme.html
ggplot(df, aes(x = x, y = y)) +
geom_point()+
theme(panel.background = element_blank(),
axis.line.y = element_line(color="red",size=5))
參考 https://ggplot2.tidyverse.org/reference/sec_axis.html
這個(gè)鏈接還有如何操作第二個(gè)坐標(biāo)軸的一些其他例子
ggplot(df, aes(x = x, y = y)) +
geom_point()+
theme(panel.background = element_blank(),
axis.line.y = element_line(color="red",size=5))+
scale_y_continuous(sec.axis = dup_axis())
ggplot(df, aes(x = x, y = y)) +
geom_point()+
theme(panel.background = element_blank(),
axis.line.y = element_line(color="red",size=5),
axis.text.x = element_blank())+
scale_y_continuous(sec.axis = dup_axis())
ggplot(df, aes(x = x, y = y)) +
geom_point()+
theme(panel.background = element_blank(),
axis.line.y = element_line(color="red",size=5),
axis.text.x = element_blank(),
axis.ticks.x = element_blank())+
scale_y_continuous(sec.axis = dup_axis())
ggplot(df, aes(x = x, y = y)) +
geom_point()+
theme(panel.background = element_blank(),
axis.line.y = element_line(color="red",size=5),
axis.text.x = element_blank(),
axis.ticks.x = element_blank(),
axis.title.x = element_blank())+
scale_y_continuous(sec.axis = dup_axis())
關(guān)于ggplot2主題可能會(huì)用到的操作有哪些問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開(kāi),可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識(shí)。