[英]ggplot2's geom_bar() not showing default x axis ticks
作為一個簡單的例子,我將使用鑽石數據:
data(diamonds)
ggplot(diamonds, aes(x = clarity, y = carat, fill = cut)) +
geom_bar(stat = "identity")
這將為我提供以下 output,其中 x 軸未注釋:
如何使 x 軸和 y 軸的值出現? 我一直在廣泛搜索,但還沒有找到解決方案......
對於我的真實數據集,我的 x 軸值是離散的,使用 scale_x_discrete() 不會改變結果。
預先感謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.