タグ

ggplot2に関するma_koのブックマーク (4)

  • ggplot2再入門(2015年バージョン)

    The document describes various probability distributions that can arise from combining Bernoulli random variables. It shows how a binomial distribution emerges from summing Bernoulli random variables, and how Poisson, normal, chi-squared, exponential, gamma, and inverse gamma distributions can approximate the binomial as the number of Bernoulli trials increases. Code examples in R are provided to

    ggplot2再入門(2015年バージョン)
  • Cookbook for R » Colors (ggplot2)

    Problem You want to use colors in a graph with ggplot2. Solution The default colors in ggplot2 can be difficult to distinguish from one another because they have equal luminance. They are also not friendly for colorblind viewers. A good general-purpose solution is to just use the colorblind-friendly palette below. Sample data These two data sets will be used to generate the graphs below. # Two va

  • ggplot2の概要 - ぬいぐるみライフ?

    Tsukuba.R#9での発表に向けてggplot2の勉強を始めた.これまで調べたことを軽くまとめてみる. ggplot2とは 高度な2Dグラフィックの描画について統一的な操作を提供してくれるライブラリ.「The Grammar of Graphics」という思想に基づいていて,ユーザがデータのどの部分に注目したいかを記述していくだけで簡単にきれいなグラフを得られるようになっている. http://had.co.nz/ggplot2/ ggplot2のインストール いつも通り. > install.packages("ggplot2") ggplot2で図を描画する ggplot2で図を描画する方法は主に以下の2通り. qplot関数を使う 自分が得たいグラフに合わせてレイヤーオブジェクトを組み合わせる ここでは以下のggplot2パッケージ付属のdiamondsサンプルデータを使い,それ

    ggplot2の概要 - ぬいぐるみライフ?
  • ggplot2 の自分用メモ集を作ろう - Triad sou.

    プロットの作製 基プロットを作る Geoms Aesthetics 違う種類のグラフを重ねる 参照線の追加 グループ分け 層別プロット スケールと軸 Scales 軸ラベルやタイトルの変更 軸の表示範囲を変更する 軸の左右の余白を削除する 軸表示の修飾 日時の軸スケール 軸区切り値の変更 軸スケールの変更 (変数変換) プロットのソート (離散型変数の水準をソートしてプロット) 座標系の反転:横向き箱ひげ図 極座標への変換:円グラフ 座標系のアスペクト比の指定 色セットの変更 ggplot2 のデフォルト色セットの定義 任意の色セットの利用 凡例 凡例位置の変更 凡例ラベルの変更 凡例の一部を削除する テーマ (グラフ背景・グリッドの色, マージン, フォント) Themes 定義済み theme の適用と編集 theme 要素と theme() の併用時の注意点 フォント変更 保存 g

    ggplot2 の自分用メモ集を作ろう - Triad sou.
    ma_ko
    ma_ko 2010/06/15
    自分でやってみないとだよなぁ…
  • 1