亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用美學和geom_text時,從圖例中刪除“a”

使用美學和geom_text時,從圖例中刪除“a”

慕哥9229398 2019-09-02 09:10:43
如何從此代碼生成的圖例中刪除字母“a”?如果我刪除了geom_text,那么'a'字母將不會顯示在圖例中。不過我想保留geom_text。ggplot(data = iris, aes(x = Sepal.Length, y=Sepal.Width, shape = Species, colour = Species)) +    geom_point() +    geom_text(aes(label = Species))
查看完整描述

3 回答

?
呼啦一陣風

TA貢獻1802條經驗 獲得超6個贊

設置show.legend = FALSE為geom_text:


ggplot(data = iris,

       aes(x = Sepal.Length, y = Sepal.Width, colour = Species, shape = Species, label = Species)) + 

    geom_point() +

    geom_text(show.legend = FALSE)

該參數show_guide將名稱更改為show.legendin ggplot2 2.0.0(請參閱發布新聞)。


預ggplot2 2.0.0:


有了show_guide = FALSE這樣的...


ggplot( data=iris, aes(x=Sepal.Length, y=Sepal.Width , colour = Species , shape = Species, label = Species ) , size=20 ) + 

geom_point()+

geom_text( show_guide  = F )


查看完整回答
反對 回復 2019-09-02
  • 3 回答
  • 0 關注
  • 3053 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號