尝试在ggplot中加粗y轴

时间:2018-10-19 00:09:25

标签: r ggplot2

我正在尝试加粗我的y轴。轴的标题为粗体,但我似乎无法弄清楚如何将数字本身加粗。到目前为止,这是我的代码,

combine.df %>% filter(site== "indian_creek") %>%
ggplot(aes(x = percent_corn, y = flow_concentration)) +
geom_smooth(method = "lm", color="black") +
geom_point(color=dark_umber, size=5) + 
scale_y_continuous(label=scientific_10, bold) +
scale_x_continuous(breaks = seq(46, 58, by=2)) +
theme(plot.subtitle = element_text(vjust = 1), 
plot.caption = element_text(vjust = 1)) +labs(title = "Indian Creek", 
face="bold", x = "Cultivated Crop as Corn (%)",
y = expression(bold(Weighted~Flow~NO[3]-N~(kg/m^{3}))))  +
theme(
# LABLES APPEARANCE
plot.title = element_text(size=14, face= "bold", colour= "black" ),
axis.title.x = element_text(size=14, face="bold", colour = "black"),    
axis.title.y = element_text(size=14, face="bold", colour = "black"),    
axis.text.x = element_text(size=12, face="bold", colour = "black"), 
axis.text.y = element_text(size=12, face="bold", colour = "black"),
strip.text.x = element_text(size = 10, face="bold", colour = "black" ),
strip.text.y = element_text(size = 10, face="bold", colour = "black"),
axis.line.x = element_line(color="black", size = 0.3),
axis.line.y = element_line(color="black", size = 0.3),
panel.border = element_rect(colour = "black", fill=NA, size=0.3)
)

我见过类似的问题,但没有为我的问题找到正确的答案。谢谢

1 个答案:

答案 0 :(得分:0)

看起来像是粗体。也许很难用您的字体或所有已加粗的字体看到?

.text

bold version

unbold version