ユーザ用ツール

サイト用ツール


ggplot2でタイトルとx軸y軸の設定

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
ggplot2でタイトルとx軸y軸の設定 [2018/10/07] – 外部編集 127.0.0.1ggplot2でタイトルとx軸y軸の設定 [2020/08/12] – [ggplot2でグラフのタイトルを真ん中に] adash333
行 15: 行 15:
 ===== グラフタイトルをグラフ上部中央に記載する ===== ===== グラフタイトルをグラフ上部中央に記載する =====
  
 +
 +<code>
 +ggplot() +
 +  ggtitle("Use theme(plot.title = element_text(hjust = 0.5)) to center") +
 +  theme(plot.title = element_text(hjust = 0.5))
 +</code>
 +
 +参考:https://codeday.me/jp/qa/20190317/372133.html
  
 ===== x軸の値を変更する ===== ===== x軸の値を変更する =====
行 62: 行 70:
 </code> </code>
  
 +===== 軸のラベルの書き換え =====
 +
 +  # y軸のラベルの書き換え
 +  labs(y="Length")
 +
 +
  
 ===== グループによって少しだけx軸方向にずらす ===== ===== グループによって少しだけx軸方向にずらす =====
行 92: 行 106:
 <iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//rcm-fe.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=twosquirrel-22&language=ja_JP&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=487311814X&linkId=0c89d7378632a8fa2f9442eb6408bf53"></iframe> <iframe style="width:120px;height:240px;" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" src="//rcm-fe.amazon-adsystem.com/e/cm?lt1=_blank&bc1=000000&IS2=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=twosquirrel-22&language=ja_JP&o=9&p=8&l=as4&m=amazon&f=ifr&ref=as_ss_li_til&asins=487311814X&linkId=0c89d7378632a8fa2f9442eb6408bf53"></iframe>
 </html> </html>
 +
 +===== リンク =====
 +目次:[[初めての医療統計:index.html|初めての医療統計 目次]]
 +
 +
 +

ggplot2でタイトルとx軸y軸の設定.txt · 最終更新: 2020/08/12 by adash333

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki