PairedSmoothHistogram[{x1,x2,…},{y1,y2,…}]
値 xiと yiのペアの平滑化ヒストグラムをプロットする.
PairedSmoothHistogram[{x1,x2,…},{y1,y2,…},espec]
推定器指定 espec でペアの平滑化ヒストグラムをプロットする.
PairedSmoothHistogram[{x1,x2,…},{y1,y2,…},espec,dfun]
分布関数 dfun でペアの平滑化ヒストグラムをプロットする.
PairedSmoothHistogram[{data11,…},{data21,…},…]
複数のデータ集合 data1iと data2jについてペアの平滑化ヒストグラムをプロットする.
PairedSmoothHistogram
PairedSmoothHistogram[{x1,x2,…},{y1,y2,…}]
値 xiと yiのペアの平滑化ヒストグラムをプロットする.
PairedSmoothHistogram[{x1,x2,…},{y1,y2,…},espec]
推定器指定 espec でペアの平滑化ヒストグラムをプロットする.
PairedSmoothHistogram[{x1,x2,…},{y1,y2,…},espec,dfun]
分布関数 dfun でペアの平滑化ヒストグラムをプロットする.
PairedSmoothHistogram[{data11,…},{data21,…},…]
複数のデータ集合 data1iと data2jについてペアの平滑化ヒストグラムをプロットする.
詳細とオプション
- PairedSmoothHistogram[data1,data2]は,デフォルトで,平滑化カーネル密度推定を使って,data1と data2の確率密度関数のペアになった平滑化ヒストグラムをプロットする.
- 推定器指定 espec には bw あるいは{bw,kernel}の形が使える.
- 帯域幅 bw と kernel の指定はSmoothKernelDistributionのものと同じでよい.
- 使用可能な分布関数 dfun
-
"PDF" 確率密度関数 "Intensity" 計数密度関数 "CDF" 累積分布関数 "SF" 生存関数 "HF" ハザード関数 "CHF" 累積ハザード関数 - w[data]の形で,結果のグラフィックスプリミティブに適用するラッパー w が与えられる.
- 使用可能なラッパー
-
Annotation[e,label] 注釈を与える Button[e,action] 要素がクリックされたときに実行されるアクションを定義 EventHandler[e,…] 要素の一般的なイベントハンドラを定義 Hyperlink[e,uri] 要素をハイパーリンクにする PopupWindow[e,cont] 要素にポップアップウィンドウを付加 StatusArea[e,label] 要素上にマウスが置かれたときにステータスエリアに表示 Style[e,opts] 指定のスタイルで要素を表示 Tooltip[e,label] 要素に任意のツールチップを付加 - PairedSmoothHistogram[Tabular[…]cspec, …]は,列指定 cspec を使って表形式データの値を抽出し,これをプロットする.
- 次は,表形式データのプロットに使用可能な列指定 cspec の形式である.
-
col 列 col からの値をプロットする {col1,col2,…,coln} 列{col1, …, coln}を値の集合としてプロットする - PairedSmoothHistogramにはGraphicsと同じオブションに以下の追加・変更を加えたものが使える. [全オプションのリスト]
-
AspectRatio 1/GoldenRatio 縦横比 Axes True 軸を描くかどうか ClippingStyle None 曲線が切り取られたところに何を描くか ColorFunction Automatic 曲線の色付けをどのように決めるか ColorFunctionScaling True ColorFunctionの引数をスケールするかどうか Filling None 各曲線の下をどのように塗り潰すか FillingStyle Automatic 塗り潰しに使うスタイル MaxRecursion Automatic 許容する反復的下位区分の最大値 Mesh None 各曲線にメッシュ点をいくつ描くか MeshFunctions {#1&} メッシュ点の置き方をどのように決めるか MeshShading None メッシュ点の間の部分の陰影の付け方 MeshStyle Automatic メッシュ点のスタイル Method Automatic 使用するメソッド PerformanceGoal $PerformanceGoal パフォーマンスのどの面について最適化するか PlotPoints Automatic サンプル点の初期数 PlotRange Automatic 含める値の範囲 PlotRangeClipping True プロット範囲で切り取るかどうか PlotStyle Automatic 各オブジェクトのスタイルを指定するグラフィックス指示子 PlotTheme $PlotTheme プロットの全体的なテーマ RegionFunction (True&) 点を含めるかどうかをどのように決めるか ScalingFunctions None 個々の座標をどのようにスケールするか Spacings Automatic プロットの軸の間のスペース WorkingPrecision MachinePrecision 記号分布の内部計算に使う精度 - PlotOriginの可能な設定値には"XAxis"と"YAxis"がある.
- Spacingsの設定値は絶対座標で設定される.Scaled[s]形式の設定では割合 s のグラフィックスの間隔が使われる.
- RegionFunction,MeshFunctions,ColorFunctionに渡される引数は x と f である.ただし,f は分布の関数のPDF,CDF等である.
- ScalingFunctions->{sx,sy}のとき,
座標は sxを使って,
座標は syを使ってスケールされる.
全オプションのリスト
例題
すべて開く すべて閉じる例 (2)
PairedSmoothHistogram[RandomVariate[NormalDistribution[0, 1], 100], RandomVariate[NormalDistribution[1, 1 / 2], 100]]data1 = RandomVariate[NormalDistribution[1, 2], 500];
data2 = RandomVariate[WeibullDistribution[1, 2], 500];PairedSmoothHistogram[data1, data2, Automatic, "PDF"]PairedSmoothHistogram[data1, data2, Automatic, "CDF"]PairedSmoothHistogram[data1, data2, Automatic, "SF"]PairedSmoothHistogram[data1, data2, Automatic, "HF"]PairedSmoothHistogram[data1, data2, Automatic, "CHF"]スコープ (17)
データ (7)
Table[PairedSmoothHistogram[RandomVariate[NormalDistribution[], 1000], RandomVariate[NormalDistribution[], 1000], Automatic, dfun, Filling -> Axis, PlotLabel -> dfun], {dfun, {"PDF", "CDF", "SF", "HF", "CHF"}}]PlotRangeが自動的に選ばれる:
data1 = RandomVariate[WeibullDistribution[2, 1], 10 ^ 3];
data2 = RandomVariate[WeibullDistribution[2, 1], 10 ^ 3];PairedSmoothHistogram[data1, data2]PlotRangeを使って関心領域に焦点を当てる:
PairedSmoothHistogram[data1, data2, PlotRange -> {{0, 2}, {0, .5}}, Filling -> Axis]data1 = {2.0, 1.9, 1.0, 1.1, 0.4, 1.3, 1.2, 0. + 0.5 I, 1., 0. + 0.9 I};
data2 = {2.0, 1.9, 1.0, 1.1, 0.4, 1.3, 1.2, 0. + 0.5 I, 1., 0. + 0.9 I};{PairedSmoothHistogram[data1, data2], PairedSmoothHistogram[Cases[data1, _Real], Cases[data2, _Real]]}PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], MaxRecursion -> 0]data1 = RandomVariate[NormalDistribution[2, 1], 10];
data2 = RandomVariate[NormalDistribution[2, 1], 10];PairedSmoothHistogram[Style[data1, Dashed, Thick, RGBColor[0.93, 0.27, 0.27]], Style[data2, Dashed, Thick]]data1 = RandomVariate[NormalDistribution[2, 1], 10 ^ 3];
data2 = RandomVariate[NormalDistribution[2, 1], 10 ^ 3];PairedSmoothHistogram[Tooltip[data1, "normal distribution"], Tooltip[data2, "normal distribution"]]PairedSmoothHistogram[Tooltip[data1, BoxWhiskerChart[data1]], Tooltip[data2, BoxWhiskerChart[data2]]]PopupWindowを使って追加的なドリルダウンの情報を与える:
data1 = RandomVariate[NormalDistribution[2, 1], 10 ^ 3];
data2 = RandomVariate[NormalDistribution[2, 1], 10 ^ 3];PairedSmoothHistogram[PopupWindow[data1, Histogram[data1]], PopupWindow[data1, Histogram[data2]]]表形式データ (2)
cars = ResourceData["Sample Tabular Data: Fuel Economy"]市街地と高速道路における自動車の燃費(mpg)の分布を比較する:
PairedSmoothHistogram[cars -> "city", cars -> "hwy"]データをピボットして列で気筒数が異なる車の燃費が区別できるようにする:
pivot = PivotToColumns[cars, "cyl" -> {"city", "hwy"}]PairedSmoothHistogram[pivot -> {ExtendedKey["city", 4], ExtendedKey["city", 6]}, pivot -> {ExtendedKey["hwy", 4], ExtendedKey["hwy", 6]}, PlotLegends -> {"4 cyl", "6 cyl"}]プレゼンテーション (8)
data = Table[RandomVariate[NormalDistribution[c, 1], 500], {c, 4}];PairedSmoothHistogram[data, data]data = Table[RandomVariate[NormalDistribution[c, 1], 500], {c, 4}];PairedSmoothHistogram[data, data, PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.98, 0.56, 0.17], RGBColor[0.4, 0.6, 1], RGBColor[0.8, 0.3, 0.8]}]PairedSmoothHistogram[RandomVariate[WeibullDistribution[2, 1], 10 ^ 4], RandomVariate[WeibullDistribution[2, 1], 10 ^ 4], AxesLabel -> {"x", "pdf"}, PlotLabel -> "Weibull Distribution", PlotStyle -> Directive[Thick, RGBColor[0.8, 0.3, 0.8]], Filling -> Axis]data1 = RandomVariate[NormalDistribution[2, 1], 500];
data2 = RandomVariate[WeibullDistribution[2, 1], 500];PairedSmoothHistogram[Tooltip[data1], Tooltip[data2]]data1 = RandomVariate[NormalDistribution[2, 1], 500];
data2 = RandomVariate[WeibullDistribution[2, 1], 500];PairedSmoothHistogram[Tooltip[data1, BoxWhiskerChart[data1]], Tooltip[data2, BoxWhiskerChart[data2]]]data1 = RandomVariate[NormalDistribution[2, 1], 500];
data2 = RandomVariate[WeibullDistribution[2, 1], 500];PairedSmoothHistogram[{data1, data2}, {data1, data2}, Filling -> {1 -> {{2}, {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}}}]PairedSmoothHistogram[RandomVariate[NormalDistribution[0, 1], 100], RandomVariate[NormalDistribution[0, 1], 100], Mesh -> 10, Frame -> True, Axes -> False]PairedSmoothHistogram[RandomVariate[NormalDistribution[0, 1], 100], RandomVariate[NormalDistribution[0, 1], 100], Mesh -> 10, MeshShading -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}, Frame -> True, Axes -> False]オプション (66)
AspectRatio (2)
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> Automatic]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> 1]Axes (3)
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100]]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Axes -> False]{PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Axes -> {False, True}], PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Axes -> {True, False}]}AxesStyle (4)
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AxesStyle -> RGBColor[0.93, 0.27, 0.27]]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AxesStyle -> {{Thick, RGBColor[0.93, 0.27, 0.27]}, {Thick, RGBColor[0.14, 0.8, 0.14]}}]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AxesStyle -> RGBColor[0.14, 0.8, 0.14], TicksStyle -> RGBColor[0.95, 0.43, 0.96]]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AxesStyle -> RGBColor[0.14, 0.8, 0.14], LabelStyle -> RGBColor[0.95, 0.43, 0.96]]ClippingStyle (4)
PairedSmoothHistogram[Range[0, 1, 0.01], Range[0, 1, 0.01], Automatic, "HF"]PairedSmoothHistogram[Range[0, 1, 0.01], Range[0, 1, 0.01], Automatic, "HF", ClippingStyle -> Automatic, PlotStyle -> Thick]PairedSmoothHistogram[Range[0, 1, 0.01], Range[0, 1, 0.01], Automatic, "HF", ClippingStyle -> RGBColor[0.93, 0.27, 0.27]]PairedSmoothHistogram[Range[0, 1, 0.01], Range[0, 1, 0.01], Automatic, "HF", ClippingStyle -> Directive[RGBColor[0.93, 0.27, 0.27], Thick]]ColorFunction (5)
Table[PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ColorFunction -> f, PlotLabel -> f, PlotStyle -> Thick], {f, {Function[{x, y}, Hue[x]], Function[{x, y}, Hue[y]]}}]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ColorFunction -> "DarkRainbow"]PairedSmoothHistogram[RandomVariate[NormalDistribution[1, 2], 100], RandomVariate[NormalDistribution[1, 2], 100], ColorFunction -> Function[{x, y}, Hue[x]], Filling -> Axis]ColorFunctionは,曲線の色付けに関してはPlotStyleよりも優先順位が高い:
PairedSmoothHistogram[RandomVariate[NormalDistribution[1, 2], 100], RandomVariate[NormalDistribution[1, 3], 100], ColorFunction -> "DarkRainbow", PlotStyle -> Directive[Red, Thick]]MeshShadingをAutomaticにしてColorFunctionとともに使う:
PairedSmoothHistogram[RandomVariate[NormalDistribution[1, 2], 100], RandomVariate[NormalDistribution[1, 4], 100], ColorFunction -> "Rainbow", PlotStyle -> Directive[RGBColor[1, 0, 0], Thick], Mesh -> 9, MeshShading -> {Automatic, GrayLevel[0.62]}, MeshStyle -> None]ColorFunctionScaling (2)
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ColorFunction -> Function[{x, y}, Hue[y]], PlotStyle -> Thick, ColorFunctionScaling -> True]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ColorFunction -> Function[{x, y}, Hue[y]], PlotStyle -> Thick, ColorFunctionScaling -> False]Filling (6)
Table[PairedSmoothHistogram[Range[-2, 2, 0.05], Range[-2, 2, 0.05], Filling -> c, PlotLabel -> c], {c, {Top, Bottom, Axis, 0.1}}]デフォルトで,重なり合った部分は不透明度を使って組み合される:
PairedSmoothHistogram[{RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, {RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, Filling -> Axis]PairedSmoothHistogram[{RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, {RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, Filling -> {1 -> Axis}]PairedSmoothHistogram[{RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, {RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, Filling -> {1 -> {2}}]PairedSmoothHistogram[{RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, {RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, Filling -> {1 -> {{2}, Directive[RGBColor[0.98, 0.56, 0.17], Opacity[.6]]}}]PairedSmoothHistogram[{RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, {RandomVariate[NormalDistribution[], 14], RandomVariate[PoissonDistribution[1], 10]}, Filling -> {1 -> {{2}, {Yellow, Red}}}]FillingStyle (4)
Table[PairedSmoothHistogram[RandomReal[NormalDistribution[1, 10], 100], RandomReal[NormalDistribution[1, 10], 100], Filling -> Bottom, FillingStyle -> c], {c, {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1], RGBColor[1, 0.75, 0]}}]PairedSmoothHistogram[Sequence@@Table[{RandomVariate[NormalDistribution[x, 2x], 100], RandomVariate[NormalDistribution[x, 2x], 100]}, {x, 1, 2}], Filling -> Bottom, FillingStyle -> Directive[Opacity[0.5], RGBColor[0.98, 0.56, 0.17]]]第1曲線が第2曲線の下のところは赤で,その逆のところは青で塗り潰す:
PairedSmoothHistogram[Sequence@@Table[{RandomVariate[NormalDistribution[x, 2x], 100], RandomVariate[NormalDistribution[x, 2x], 100]}, {x, 1, 2}], Filling -> {1 -> {2}}, FillingStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}]ColorFunctionで得られた変数の塗潰しスタイルを使う:
PairedSmoothHistogram[RandomReal[NormalDistribution[1, 10], 100], RandomReal[NormalDistribution[1, 10], 100], ColorFunction -> Function[{x, y}, Hue[y]], Filling -> Axis, FillingStyle -> Automatic]ImageSize (7)
Tiny,Small,Medium,Largeのような名前付きのサイズを使う:
{PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> Tiny], PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> Small]}{PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> 150], PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> 1.5, ImageSize -> 150]}{PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> {Automatic, 150}], PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> 2, ImageSize -> {Automatic, 150}]}{PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> UpTo[200]], PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> 2, ImageSize -> UpTo[200]]}グラフィックスの幅と高さを指定して,必要な場合はスペースで充填する:
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> {200, 200}, Background -> RGBColor[1, 0.75, 0]]AspectRatioFullと設定すると,使用可能なスペースが塗り潰される:
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> Full, ImageSize -> {200, 200}, Background -> RGBColor[1, 0.75, 0]]{PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> {UpTo[150], UpTo[100]}], PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> 2, ImageSize -> {UpTo[150], UpTo[100]}]}ImageSizeFullを使ってオブジェクト内の使用可能なスペースを塗り潰す:
Framed[Pane[PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], ImageSize -> Full, Background -> RGBColor[1, 0.75, 0]], {200, 100}]]Framed[Pane[PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], AspectRatio -> Full, ImageSize -> {Scaled[0.5], Scaled[0.5]}, Background -> RGBColor[1, 0.75, 0]], {200, 200}]]MaxRecursion (2)
PairedSmoothHistogram[RandomVariate[NormalDistribution[1, 10], 100], RandomVariate[NormalDistribution[1, 10], 100], Mesh -> All, MeshStyle -> PointSize[Small]]MaxRecursionの各レベルが最初のメッシュをより細かいメッシュに分け直す:
Table[PairedSmoothHistogram[RandomVariate[NormalDistribution[1, 10], 100], RandomVariate[NormalDistribution[1, 10], 100], MaxRecursion -> i, Mesh -> All, Ticks -> None, MeshStyle -> PointSize[Small]], {i, {0, 3, 6}}]Mesh (3)
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 20, MeshStyle -> PointSize[Medium]]data = RandomVariate[UniformDistribution[{1, 10}], 100];PairedSmoothHistogram[data, data, Mesh -> {Range[0, 12, 2]}, MeshStyle -> PointSize[Medium]]data = RandomVariate[UniformDistribution[{1, 10}], 100];PairedSmoothHistogram[data, data, Mesh -> {Table[{x, Hue[x / (2)]}, {x, 0., 12, .5}]}]MeshFunctions (2)
Table[PairedSmoothHistogram[RandomVariate[NormalDistribution[1, 10], 100], RandomVariate[NormalDistribution[1, 10], 100], MeshFunctions -> {Function[{x, y}, Evaluate[f]]}, Mesh -> 9, PlotLabel -> f, MeshStyle -> PointSize[Medium]], {f, {x, y}}]
方向に赤で5個のメッシュレベルを,
方向に青で10個のメッシュレベルを示す:
PairedSmoothHistogram[RandomVariate[NormalDistribution[1, 10], 100], RandomVariate[NormalDistribution[1, 10], 100], Mesh -> {5, 10}, MeshFunctions -> {#1&, #2&}, MeshStyle -> {Directive[PointSize[Medium], RGBColor[0.93, 0.27, 0.27]], RGBColor[0.4, 0.6, 1]}]MeshShading (6)
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 10, MeshShading -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}, MeshStyle -> PointSize[Medium]]Noneを使って線分を除く:
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 10, MeshShading -> {RGBColor[0.93, 0.27, 0.27], None}, MeshStyle -> PointSize[Medium]]MeshShadingはPlotStyleと一緒に使うことができる:
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 10, PlotStyle -> Thick, MeshFunctions -> {#1&}, MeshShading -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}, MeshStyle -> PointSize[Medium]]MeshShadingは,曲線のスタイル付けではPlotStyleより優先順位が高い:
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 10, PlotStyle -> RGBColor[0.14, 0.8, 0.14], MeshFunctions -> {#1&}, MeshShading -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}, MeshStyle -> PointSize[Medium]]MeshShadingをAutomaticに設定して,PlotStyleをいくつかの線分に使う:
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 10, PlotStyle -> Directive[Thick, RGBColor[1, 0.75, 0]], MeshFunctions -> {#1&}, MeshShading -> {RGBColor[0.93, 0.27, 0.27], Automatic}]MeshShadingはColorFunctionと一緒に使うことができる:
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 10, PlotStyle -> Thick, MeshFunctions -> {#1&}, MeshShading -> {GrayLevel[0.62], Automatic},
ColorFunction -> Function[{x, y}, Hue[x]], MeshStyle -> PointSize[Medium]]MeshStyle (4)
PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 9, MeshStyle -> PointSize[Medium]]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 9, MeshStyle -> Directive[RGBColor[0.93, 0.27, 0.27], PointSize[Medium]]]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 9, MeshStyle -> {Directive[RGBColor[0.93, 0.27, 0.27], PointSize[Medium]], Directive[RGBColor[0.4, 0.6, 1], PointSize[Medium]]}, MeshFunctions -> {#1&, #2&}]PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], Mesh -> 10, MeshStyle -> Directive[PointSize[Large], RGBColor[0.93, 0.27, 0.27]]]PerformanceGoal (2)
Timing[PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], PerformanceGoal -> "Quality"]]Timing[PairedSmoothHistogram[RandomVariate[NormalDistribution[], 100], RandomVariate[NormalDistribution[], 100], PerformanceGoal -> "Speed"]]PlotPoints (1)
PlotRange (2)
PlotRangeは自動的に計算される:
data = RandomVariate[WeibullDistribution[2, 4], 100];PairedSmoothHistogram[data, data, Automatic, "HF"]PairedSmoothHistogram[data, data, Automatic, "HF", PlotRange -> All]SmoothHistogramはプロット領域を自動的に選択する:
data = RandomVariate[ExponentialDistribution[1], 500];PairedSmoothHistogram[data, data]PairedSmoothHistogram[data, data, PlotRange -> {Quantile[data, {0.05, 0.95}], All}]PlotStyle (6)
Table[PairedSmoothHistogram[RandomVariate[ExponentialDistribution[1 / 2], 500], RandomVariate[ExponentialDistribution[1 / 2], 500], PlotStyle -> ps], {ps, {RGBColor[0.93, 0.27, 0.27], Thick, Dashed, Directive[RGBColor[0.93, 0.27, 0.27], Thick]}}]デフォルトで曲線が複数ある場合はそれぞれに異なるスタイルが選ばれる:
PairedSmoothHistogram[Table[RandomVariate[ExponentialDistribution[x], 100], {x, 1, 4, 1}], Table[RandomVariate[ExponentialDistribution[x], 100], {x, 1, 4, 1}]]PairedSmoothHistogram[Table[RandomVariate[ExponentialDistribution[x], 100], {x, 1, 4, 1}], Table[RandomVariate[ExponentialDistribution[x], 100], {x, 1, 4, 1}], PlotStyle -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[0.4, 0.6, 1], RGBColor[0.67, 0.54, 0.42]}]PlotStyleはColorFunctionと組み合せることができる:
PairedSmoothHistogram[RandomVariate[ExponentialDistribution[1 / 2], 500], RandomVariate[ExponentialDistribution[1 / 2], 500], PlotStyle -> Thick, ColorFunction -> Function[{x, y}, Hue[y]]]PlotStyleはMeshShadingと組み合せることができる:
PairedSmoothHistogram[RandomVariate[ExponentialDistribution[1 / 2], 500], RandomVariate[ExponentialDistribution[1 / 2], 500], PlotStyle -> Directive[Opacity[0.5], Thick], Mesh -> 10, MeshFunctions -> {#1&}, MeshShading -> {RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}]MeshStyleは,デフォルトで,PlotStyleと同じスタイルを使う:
PairedSmoothHistogram[RandomVariate[ExponentialDistribution[1 / 2], 500], RandomVariate[ExponentialDistribution[1 / 2], 500], PlotStyle -> RGBColor[0.93, 0.27, 0.27], Mesh -> All]アプリケーション (2)
{data1, data2} = {RandomVariate[WienerProcess[][1], 10 ^ 3], RandomVariate[WienerProcess[][10], 10 ^ 3]};PairedSmoothHistogram[data1, data2, Filling -> Axis]TemporalDataの2つのタイムスライスを比較する:
td = RandomFunction[WienerProcess[], {0, 1, .01}, 10 ^ 3]PairedSmoothHistogram[td["SliceData", .3], td["SliceData", .6], Filling -> Axis]特性と関係 (1)
PairedSmoothHistogramは,TimeSeriesとEventSeriesのタイムスタンプを無視する:
data1 = TemporalData[EventSeries, {{{0.20242479245467548, 0.2704846026026855, -1.6385644709860396,
-1.269562930257016, -0.6100833227170088, -0.3098890335697966, 0.5452140701120742,
0.33739124140964166, 0.6108178119757203, -0.8185766713897115, -0. ... 6778892896903, 1.3176959856031774, 0.03477397109856467, 0.6980573801933982,
0.7782710526039773, 0.16449547627605665}}, {{0, 100, 1}}, 1, {"Continuous", 1},
{"Discrete", 1}, 1, {ResamplingMethod -> None, ValueDimensions -> 1}}, False, 10.1];data2 = TemporalData[TimeSeries, {{{0.9979943072760531, 0.39944401634462684, -0.8370629804097509,
-0.8601512257464574, 0.6418925883943911, -0.254757753949575, 1.0216002938860733,
0.5729923442123097, -0.2201437893681994, 0.05117351007328737, 2.085 ... 5288584762, 1.3955322599855737, -0.5177183168166122, -0.0662513207420091,
-0.22682713030227636, -0.3354522176887315}}, {{0, 100, 1}}, 1, {"Continuous", 1},
{"Discrete", 1}, 1, {ValueDimensions -> 1, ResamplingMethod -> None}}, False, 10.1];PairedSmoothHistogram[data1, data2]PairedSmoothHistogram[data1["Values"], data2["Values"]]関連するガイド
-
▪
- 統計の可視化
テキスト
Wolfram Research (2012), PairedSmoothHistogram, Wolfram言語関数, https://reference.wolfram.com/language/ref/PairedSmoothHistogram.html (2025年に更新).
CMS
Wolfram Language. 2012. "PairedSmoothHistogram." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/PairedSmoothHistogram.html.
APA
Wolfram Language. (2012). PairedSmoothHistogram. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PairedSmoothHistogram.html
BibTeX
@misc{reference.wolfram_2026_pairedsmoothhistogram, author="Wolfram Research", title="{PairedSmoothHistogram}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/PairedSmoothHistogram.html}", note=[Accessed: 16-November-2026]}
BibLaTeX
@online{reference.wolfram_2026_pairedsmoothhistogram, organization={Wolfram Research}, title={PairedSmoothHistogram}, year={2025}, url={https://reference.wolfram.com/language/ref/PairedSmoothHistogram.html}, note=[Accessed: 16-November-2026]}