BubbleHistogram[{{x1,y1},{x2,y2},…}]
{xi,yi}の値のバブルヒストグラムをプロットする.
BubbleHistogram[{{x1,y1},{x2,y2},…},bspec]
bspec で指定されたビンを用いてバブルヒストグラムをプロットする.
BubbleHistogram[{{x1,y1},{x2,y2},…},bspec,hspec]
バブルのサイズを指定 hspec に従って算出してバブルヒストグラムをプロットする.
BubbleHistogram
BubbleHistogram[{{x1,y1},{x2,y2},…}]
{xi,yi}の値のバブルヒストグラムをプロットする.
BubbleHistogram[{{x1,y1},{x2,y2},…},bspec]
bspec で指定されたビンを用いてバブルヒストグラムをプロットする.
BubbleHistogram[{{x1,y1},{x2,y2},…},bspec,hspec]
バブルのサイズを指定 hspec に従って算出してバブルヒストグラムをプロットする.
詳細
- BubbleHistogramは,各ビン内の要素数に比例して大きさおよび色が調整されたバブルを使って離散ビンにおけるデータの密度を示す.
- BubbleHistogram[data]は,デフォルトでは,値{xi,yi}の背後にあると仮定される滑らかな分布を近似するように選択された等しいビンを用いたヒストグラムをプロットする.
- 各ビンの
幅は値 xiに従って計算される.
幅は,値 yiに従って計算される. - BubbleHistogram[Tabular[…]cspec]は,表形式オブジェクトから列指定 cspec を用いて値を抽出し,プロットする.
- 表形式データのプロットには,次の形式の列指定 cspec を使用することができる.
-
{colx,coly} 列 colxおよび列 colyから得られるヒストグラム値{x,y} - 以下のビン指定 bspec を与えることができる.
-
n n 個のビンを使用する {w} 幅が w のビンを使用する {min,max,w} 幅が w のビンを min から max まで使用する {{b1,b2,…}} ビン[b1,b2),[b2,b3),…を使用する Automatic ビン幅を自動的に決定する "name" 名前付きビニングメソッドを使用する {"Log",bspec} ビニング bspec を対数変換データに適用する fb fb を適用して明示的なビン指定{b1,b2,…}を得る {xspec,yspec} 異なる x および y の指定方法を与える - ビニング指定"Log"は,もとになるビニングメソッドとしてAutomaticを使用するとみなされる.
- 考えられる名前付きのビニングメソッドとして,以下が挙げられる.
-
"Sturges" データの長さに基づいてビン数を算出する "Scott" 平均二乗誤差を漸近的に最小化する "FreedmanDiaconis" サンプルサイズの立方根で四分位範囲の2倍を割った値 "Knuth" 区分的な一様モデルの尤度と事前確率を調和させる "Wand" 1段階の再帰的近似Wandビニング - BubbleHistogram[data,fb]の関数 fb は,すべての{xi,yi}のリストに適用され,明示的なビンのリスト {{bx1,bx2,…},{by1,by2,…}}を返す.BubbleHistogram[data,{fx,fy}]では,fx は xiのリストに適用され,fy は yiのリストに適用される.
- 異なるビンバブル指定 hspec をBubbleHistogram[data,bspec,hspec]に与えることで,バブルヒストグラムのさまざまな形式を得ることができる.以下は利用可能な形式である.
-
"Count" 各ビン内の要素数 "CumulativeCount" 累積カウント数 "SurvivalCount" 生存カウント数 "Probability" 各ビン内に存在する値の割合 "Intensity" カウント数をビンの面積で割った値 "PDF" 確率密度関数 "CDF" 累積分布関数 "SF" 生存関数 "HF" ハザード関数 "CHF" 累積ハザード関数 {"Log",hspec} 対数変換された高さの指定 fh ビンおよびカウントにfhを適用することによって得られる高さ - BubbleHistogram[data,bspec,fh]の関数 fh は,3つの引数,すなわち
ビンのリスト{{bx1,bx2},{bx2,…},…},
ビンのリスト{{by1,by2},{by2,…},…},および対応する2次元の個数配列 {{c11,c12,…},{c21,…},…}に適用される.関数は,それぞれの cijに利用される密度配列を返さなければならない. - 実数から成る値{xi,yi}のみがビンへ割り当てられ,それ以外は欠損値として扱われる.
- BubbleHistogramにはGraphicsと同じオプションに以下の追加および変更を加えたものが使える. [全オプションのリスト]
-
AspectRatio 1 縦横比 ChartBaseStyle Automatic タイルの全体的なスタイル ChartElementFunction Automatic タイルのための生のグラフィックスの生成方法 ChartLegends None データ要素およびデータ集合の凡例 ClippingStyle None PlotRangeによって切り取られた値の描画方法 ColorFunction Automatic プロットの彩色方法 ColorFunctionScaling True ColorFunctionへの引数をスケーリングするかどうか Frame True プロットの周囲に枠線を描画するかどうか FrameTicks Automatic 枠線上の目盛 LabelingFunction Automatic 要素へのラベルの付け方 Method Automatic プロットを精緻化するためのメソッド PerformanceGoal $PerformanceGoal 最適化するパフォーマンスの局面 PlotInteractivity $PlotInteractivity インタラクティブ要素を許可するかどうか PlotRange Automatic 含める f あるいはその他の値の範囲 PlotRangeClipping True プロット範囲で切り取るかどうか PlotRangePadding Automatic 値の範囲をどの程度充填するか PlotTheme $PlotTheme プロットの全体的なテーマ ScalingFunctions None 個々の座標をどのようにスケーリングするか - ChartElementFunctionに与えられる引数は,ビン領域{{xmin,xmax},{ymin,ymax}},ビン値 lists,およびメタデータ{m1,m2,…}である.
- ColorFunctionに与えられる引数は,各ビンに対する密度である.
- ScalingFunctions->{sx,sy,sz}とすると,
座標は sxによりスケーリングされ,他も同様である. - スタイルその他のオプションは,実質的にChartBaseStyle,ColorFunction,およびChartElementFunctionの順で適用され,後から指定されたものが先に指定されたものを上書きする仕組みである.
全オプションのリスト
例題
すべて開く すべて閉じる例 (3)
BubbleHistogram[RandomVariate[BinormalDistribution[.5], 500]]BubbleHistogram[RandomVariate[BinormalDistribution[.5], 500], PlotLegends -> Automatic]data = RandomVariate[BinormalDistribution[.5], 100];BubbleHistogram[data, Automatic, "PDF"]BubbleHistogram[data, Automatic, "CDF"]BubbleHistogram[data, Automatic, "SF"]BubbleHistogram[data, Automatic, "HF"]BubbleHistogram[data, Automatic, "CHF"]スコープ (14)
データ (8)
data = RandomReal[NormalDistribution[0, 1], {200, 2}];BubbleHistogram[data, 5]BubbleHistogram[data, {3, 5}, Mesh -> True]data = RandomReal[NormalDistribution[0, 1], {200, 2}];BubbleHistogram[data, {.5}]BubbleHistogram[data, {{.5}, {2}}]data = RandomReal[NormalDistribution[0, 1], {200, 2}];BubbleHistogram[data, {-2, 2, 0.5}]BubbleHistogram[data, {{-2, 2, 0.5}, {-3, 3, 1.5}}]data = RandomReal[NormalDistribution[0, 1], {500, 2}];BubbleHistogram[data, {{-3, -1, 0, 1, 3}}, Mesh -> All]BubbleHistogram[data, {{{-3, -1, 0, 1, 3}}, {{-1, 0, 2, 3}}}, Mesh -> All]data = RandomReal[NormalDistribution[0, 1], {500, 2}];Table[BubbleHistogram[data, b, PlotLabel -> b], {b, {"Sturges", "Scott", "FreedmanDiaconis", "Wand", "Knuth"}}]Table[BubbleHistogram[data, {"Log", b}, PlotLabel -> "Log" <> b], {b, {"Sturges", "Scott", "FreedmanDiaconis", "Wand", "Knuth"}}]data = RandomReal[NormalDistribution[0, 1], {200, 2}];Table[BubbleHistogram[data, Automatic, h, PlotLabel -> h], {h, {"Count", "PDF", "CDF", "SF", "HF", "CHF"}}]Table[BubbleHistogram[data, Automatic, {"Log", h}, PlotLabel -> "Log" <> h], {h, {"Count", "PDF", "CDF", "SF", "HF", "CHF"}}]accumulatedCount[xBins_, yBins_, counts_] := Block[{newCounts, heights}, newCounts = Flatten[Transpose[counts]];heights = 100 Accumulate[newCounts] / Total[newCounts];Transpose[Partition[heights, {Length[xBins]}]]];BubbleHistogram[RandomReal[NormalDistribution[0, 1], {100, 2}], Automatic, accumulatedCount, ColorFunction -> "FallColors"]BubbleHistogram[{{1, 1}, {2, 2}, {3, 3}, None, {3, 3}, {5, 5}, Missing[], {2, 2}, {1, 1}, foo, {2, 2}, {3, 3}}]表形式データ (1)
異なるワインのpHとアルコールの値からバブルヒストグラムを作成する:
tab = Tabular[ResourceData["Sample Data: Wine Quality"]]BubbleHistogram[tab -> {"PH", "Alcohol"},
FrameLabel -> {"pH", "alcohol content"},
PlotLegends -> Automatic]BubbleHistogram[tab -> {"PH", "Alcohol"}, 15, BubbleSizes -> {0.25, 1},
FrameLabel -> {"pH", "alcohol content"},
PlotLegends -> Automatic]プレゼンテーション (5)
data = RandomReal[NormalDistribution[0, 1], {200, 2}];BubbleHistogram[data, PlotLabel -> "plot label", FrameLabel -> {"xlabel", "ylabel"}]デフォルトで,BubbleHistogramは個数を表すのに色とサイズの両方を使う:
data = RandomReal[NormalDistribution[0, 1], {200, 2}];BubbleHistogram[data]BubbleHistogram[data, BubbleSizes -> {1, 1}, ColorFunction -> "BlueGreenYellow"]BubbleHistogram[data, ColorFunction -> None, BubbleSizes -> {0.1, 1}]data = RandomReal[NormalDistribution[0, 1], {200, 2}];BubbleHistogram[data, Mesh -> All]data = RandomReal[NormalDistribution[0, 1], {1000, 2}];BubbleHistogram[data, PlotLegends -> Automatic]BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], PlotTheme -> "Detailed"]BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], PlotTheme -> "Minimal"]オプション (62)
AspectRatio (3)
デフォルトで,BubbleHistogramは同じ幅と高さを使う:
BubbleHistogram[IconizedObject[«data»]]BubbleHistogram[IconizedObject[«data»], AspectRatio -> 1 / 2]Automaticを使って値から比を決定する:
BubbleHistogram[IconizedObject[«data»], AspectRatio -> Automatic]Axes (4)
デフォルトで,BubbleHistogramは軸の代りに枠を使う:
BubbleHistogram[IconizedObject[«data»]]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True]AxesOriginを使って軸の交点を指定する:
BubbleHistogram[IconizedObject[«data»], Axes -> True, Frame -> False, AxesOrigin -> {0, 0}]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> {True, False}]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> {False, True}]AxesLabel (4)
BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, AxesLabel -> y]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, AxesLabel -> {x, y}]BubbleHistogram[QuantityArray[IconizedObject[«data»], "Meters"], Frame -> False, Axes -> True, AxesLabel -> Automatic]AxesOrigin (2)
AxesStyle (4)
BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> RGBColor[0.93, 0.27, 0.27]]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> {{Thick, RGBColor[0.93, 0.27, 0.27]}, {Thick, RGBColor[0.4, 0.6, 1]}}]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> RGBColor[0.14, 0.8, 0.14], TicksStyle -> RGBColor[0.93, 0.27, 0.27]]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, AxesStyle -> RGBColor[0.14, 0.8, 0.14], LabelStyle -> RGBColor[0.93, 0.27, 0.27]]BubbleScale (2)
BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], BubbleSizes -> {0.1, 1}, BubbleScale -> "Diameter"]data = RandomVariate[BinormalDistribution[.5], 100];Table[BubbleHistogram[data, BubbleSizes -> {0.1, 1}, BubbleScale -> scale, PlotLabel -> scale], {scale, {"Area", "Diameter"}}]BubbleSizes (2)
デフォルトで,最小のバブルはそれ自身のビンサイズの20%に,最大のバブルは100%に再スケールされる:
data = RandomVariate[BinormalDistribution[.5], 100];BubbleHistogram[data, Mesh -> All]最小および最大のバブルの相対サイズをそれ自身のビンのサイズに変更する:
BubbleHistogram[data, BubbleSizes -> {0.1, 0.8}, Mesh -> All]data = RandomVariate[BinormalDistribution[.5], 100];BubbleHistogram[data, BubbleSizes -> {1, 0.2}, Mesh -> All]ChartElementFunction (3)
ChartElementFunctionの組込み設定のリストを入手する:
ChartElementData["BubbleHistogram"]詳細設定については,パレット ▶ チャートエレメントスキームを使うとよい:
Table[BubbleHistogram[RandomVariate[NormalDistribution[], {100, 2}], ChartElementFunction -> cf, PlotLabel -> cf], {cf, {"Bubble", "FadingBubble"}}]Table[BubbleHistogram[RandomVariate[NormalDistribution[], {100, 2}], {1}, ChartElementFunction -> cf, PlotLabel -> cf], {cf, {"GradientBubble", "MarkerBubble", "NoiseBubble", "OscillatingBubble"}}]Table[BubbleHistogram[RandomVariate[NormalDistribution[], {100, 2}], {1}, ChartElementFunction -> cf, PlotLabel -> cf], {cf, {"SphereBubble", "SquareWaveBubble", "TriangleWaveBubble"}}]カスタムのChartElementFunctionを書く:
f[{{xmin_, xmax_}, {ymin_, ymax_}}, _, _] := Rectangle[{xmin, ymin}, {xmax, ymax}, RoundingRadius -> 0.2]BubbleHistogram[RandomVariate[NormalDistribution[], {100, 2}], {1}, ChartElementFunction -> f]ColorFunction (5)
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], ColorFunction -> Function[{count}, ColorData["Rainbow"][count]]]BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {500, 2}], ColorFunction -> "SolarColors"]BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {500, 2}], ColorFunction -> (Hue[2 / 5, 2 / 3, #]&)]ColorFunctionScaling->Falseを使ってスケールされていない高さの値を取得する:
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {500, 2}], ColorFunction -> (Which[# < 5, RGBColor[1, 0.51, 0.51], 5 ≤ # < 15, RGBColor[0.4, 0.6, 1], True, RGBColor[0.93, 0.27, 0.27]]&), ColorFunctionScaling -> False]ColorFunctionを使って異なるスタイル効果を組み合せる:
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {500, 2}], ColorFunction -> Function[{count}, Directive[ColorData["FuchsiaTones"][1 - count], EdgeForm[Opacity[count]]]]]ColorFunctionScaling (2)
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], ColorFunction -> Function[{height}, ColorData["Rainbow"][height]]]ColorFunctionScaling->Falseを使ってスケールされていない高さの値を入手する:
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {500, 2}], ColorFunction -> (Which[# < 5, RGBColor[1, 0.51, 0.51], 5 ≤ # < 15, RGBColor[0.4, 0.6, 1], True, RGBColor[0.93, 0.27, 0.27]]&), ColorFunctionScaling -> False]ImageSize (6)
Tiny,Small,Medium,Largeのような名前付きのサイズを使う:
{BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", ImageSize -> Tiny], BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", ImageSize -> Small]}{BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", ImageSize -> 150], BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", AspectRatio -> 1.5, ImageSize -> 150]}{BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", ImageSize -> {Automatic, 150}], BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", AspectRatio -> 2, ImageSize -> {Automatic, 150}]}{BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", ImageSize -> UpTo[200]], BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", AspectRatio -> 2, ImageSize -> UpTo[200]]}グラフィックスの幅と高さを指定して,必要があればスペースで充填する:
BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", ImageSize -> {200, 300}, Background -> RGBColor[0.4, 0.6, 1]]{BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", ImageSize -> {UpTo[150], UpTo[100]}], BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", AspectRatio -> 2, ImageSize -> {UpTo[150], UpTo[100]}]}Framed[Pane[BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Automatic, "PDF", AspectRatio -> 1 / 3, ImageSize -> {Scaled[0.5], Scaled[0.5]}, Background -> RGBColor[0.4, 0.6, 1]], {200, 100}]]LabelingFunction (3)
TooltipとStatusAreaを介して値による自動ラベル付けを使う:
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], 5, LabelingFunction -> Automatic]BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], 5, LabelingFunction -> None]Placedを使ってラベル配置を制御する:
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], 5, LabelingFunction -> (Placed[#1, StatusArea]&)]Mesh (5)
BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Mesh -> Automatic]BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Mesh -> {15, 5}]BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], Mesh -> {None, Range[0, 10]}]BubbleHistogram[RandomVariate[BinormalDistribution[.5], 100], {1 / 2}, Mesh -> {None, Table[{i / 2 - 3, Hue[i / 12]}, {i, 0, 12}]}]MeshAutomaticを使ってビンの間にメッシュを描く:
BubbleHistogram[RandomReal[NormalDistribution[0, 1], {200, 2}], {{{-3, -1, 0, 1, 3}}, {{-1, 0, 2, 3}}}, Mesh -> Automatic]MeshStyle (2)
Method (4)
BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], Method -> {"DistributionAxes" -> True}]BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], Method -> {"DistributionAxes" -> "BoxWhisker"}]BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], Method -> {"DistributionAxes" -> "Histogram"}]BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], Method -> {"DistributionAxes" -> "BoxWhisker"}, ColorFunction -> "RustTones"]BubbleHistogram[RandomVariate[NormalDistribution[0, 1], {200, 2}], Method -> {"DistributionAxes" -> "Histogram"}, ColorFunction -> "DeepSeaColors"]PerformanceGoal (1)
data = RandomReal[NormalDistribution[0, 1], {100, 2}];BubbleHistogram[data, PerformanceGoal -> "Quality"]インタラクティブ動作を無効にしてパフォーマンスを向上させる:
BubbleHistogram[data, PerformanceGoal -> "Speed"]一般に,インタラクティブではないグラフの方が必要なメモリが少なくなる:
Table[ByteCount@BubbleHistogram[data, PerformanceGoal -> p], {p, {"Quality", "Speed"}}]PlotInteractivity (2)
Ticks (4)
BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> None]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{-2, 0, 3}, {-2, 0, 2}}]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{{-2, -a}, {0, 0}, {3, b}}, {{-2, -a}, {0, b}, {2, a}}}]TicksStyle (4)
BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, TicksStyle -> Directive[RGBColor[0.93, 0.27, 0.27], Bold]]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, TicksStyle -> {Directive[RGBColor[0.93, 0.27, 0.27], Bold], Directive[RGBColor[0.4, 0.6, 1]]}]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{{-2, -a, .1}, {0, 0, .2}, {3, b, .45}}, {{-2, -a, .1}, {0, b, .2}, {2, a, .5}}}]BubbleHistogram[IconizedObject[«data»], Frame -> False, Axes -> True, Ticks -> {{{-2, -a, .1, Directive[RGBColor[0.93, 0.27, 0.27]]}, {0, 0, .2, Directive[Thick, RGBColor[0.93, 0.27, 0.27]]}, {3, b, .45, Directive[Thick, Dashed, RGBColor[0.93, 0.27, 0.27]]}}, {{-2, -a, .1, Directive[RGBColor[0.4, 0.6, 1]]}, {0, b, .2, Directive[Thick, RGBColor[0.4, 0.6, 1]]}, {2, a, .5, Directive[Thick, Dashed, RGBColor[0.4, 0.6, 1]]}}}]アプリケーション (4)
volcanoes = ExampleData[{"Statistics", "UgandaVolcanoes"}];
border = Graphics[{EdgeForm[Thick], Opacity[0], Polygon[ExampleData[{"Statistics", "WesternUgandaBorder"}]]}];Show[ListPlot[volcanoes], border, AspectRatio -> 1]cfs[data_, bspec_, hspec_ : Automatic] := With[{cnts = Union[Flatten@Last[HistogramList[data, bspec, hspec]]]}, N@Transpose[{Rescale[cnts], cnts}]
]Show[BubbleHistogram[volcanoes, 10, ColorFunction -> "SolarColors", PlotLegends -> Automatic], border]ランダム過程の多変量時間スライスに対するバブルヒストグラム:
data = RandomVariate[WienerProcess[3, 4][{7, 10}], 10 ^ 4];BubbleHistogram[data, 20, "PDF"]二次元時間スライスに対してバブルヒストグラムをプロットすることで,TemporalDataを分析する:
data = TemporalData[«4»];Table[BubbleHistogram[data["SliceData", {.1, y}], Automatic, "PDF"], {y, .2, 1, .1}]data = WeatherData["Champaign", "Temperature", {DateObject[{2022, 1, 1}], DateObject[{2024, 1, 1}]}];datetime = Transpose[{AbsoluteTime /@ data["Times"], Normal[data["Values"]]}];x方向およびy方向のビン幅として,1か月と摂氏5度を用いる:
bins = {{Table[AbsoluteTime@DateObject[{2022, i, 1}], {i, 24}]}, {Quantity[5, "DegreesCelsius"]}};BubbleHistogramを日付尺度およびビニング情報とともに用いてデータを可視化する:
BubbleHistogram[datetime, bins, ScalingFunctions -> {"Date", None}, AspectRatio -> 1 / 2, PlotLabel -> "Temperature variations across the year in Champaign"
]frameticks = {{Transpose[{Range[-20, 40, 5], Quantity[Range[-20, 40, 5], "DegreesCelsius"]}], None},
{Table[{AbsoluteTime@DateObject[{2022, 2i - 1}], Rotate[DateObject[{2022, 2i - 1}], 90Degree]}, {i, 12}], None}};
mesh = {Transpose[{Range[-25, 40, 5], Reverse@Table[Blend[{RGBColor[0.93, 0.27, 0.27], RGBColor[0.4, 0.6, 1]}, i / 10], {i, 14}]}], Automatic} ;
meshstyle = {Directive[{Opacity[0.9]}], Directive[{GrayLevel[0.7], Opacity[0.4]}]};BubbleHistogram[datetime, bins,
AspectRatio -> 1 / 2,
FrameTicks -> frameticks,
Mesh -> mesh,
MeshStyle -> meshstyle,
PlotStyle -> EdgeForm[GrayLevel[0.62]],
PlotLabel -> "Temperature variations across the year in Champaign"
]特性と関係 (4)
BubbleHistogramは,データに基づいて使用するビンを自動的に決定する:
BubbleHistogram[RandomVariate[NormalDistribution[], {100, 2}]]BubbleHistogramは,ColorFunctionに従って高さに彩色する:
BubbleHistogram[RandomVariate[NormalDistribution[], {100, 2}], Automatic, "CDF", ColorFunctionScaling -> False, PlotLegends -> Automatic]Histogram3Dを使ってデータを三次元で可視化する:
data = RandomVariate[NormalDistribution[], {100, 2}];{Histogram3D[data], BubbleHistogram[data], DensityHistogram[data]}推定された分布とデータを比較するために,DensityHistogram,SmoothDensityHistogramおよびSmoothHistogram3Dを使う:
data = RandomVariate[BinormalDistribution[{2, 2}, {1, 1}, 0.5], 100];{BubbleHistogram[data], DensityHistogram[data], SmoothDensityHistogram[data], SmoothHistogram3D[data]}考えられる問題 (1)
おもしろい例題 (1)
PlotGrid[Partition[Table[BubbleHistogram[RandomVariate[BinormalDistribution[ρ], 10 ^ 3], {-3, 3, .25}, ColorFunction -> "SolarColors", PlotLabel -> ρ, ImageSize -> 150, PlotRange -> {{-3, 3}, {-3, 3}}], {ρ, {-.95, -.75, -.5, -.25, 0, .25, .5, .75, .95 }}], 3], ItemSize -> 150]テキスト
Wolfram Research (2026), BubbleHistogram, Wolfram言語関数, https://reference.wolfram.com/language/ref/BubbleHistogram.html.
CMS
Wolfram Language. 2026. "BubbleHistogram." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BubbleHistogram.html.
APA
Wolfram Language. (2026). BubbleHistogram. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BubbleHistogram.html
BibTeX
@misc{reference.wolfram_2026_bubblehistogram, author="Wolfram Research", title="{BubbleHistogram}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/BubbleHistogram.html}", note=[Accessed: 25-August-2026]}
BibLaTeX
@online{reference.wolfram_2026_bubblehistogram, organization={Wolfram Research}, title={BubbleHistogram}, year={2026}, url={https://reference.wolfram.com/language/ref/BubbleHistogram.html}, note=[Accessed: 25-August-2026]}