plotly / plotly/plotly.py

Feature Request: Implement Bagplot (Bivariate Boxplot) for 2D and 3D Data Visualization

オープン
#5,382 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
18.8k
フォーク
2.8k
平均マージ
16時間 26分
マージ済み PR(30日)
21

説明

This proposal suggests adding support for Bagplots (also known as bivariate boxplots) as a new visualization type in Plotly.
Bagplots are a powerful extension of the traditional boxplot to two or more dimensions, providing a powerful vizualisation which shows statistical properties of 2-3 different variables.

While Plotly currently provides strong support for univariate distribution plots (box, violin, histogram), there is no direct tool to visualize bivariate distribution summaries in a similar “statistical boxplot” style.

The Bagplot, introduced by Rousseeuw, Ruts, and Tukey (1999), fills this gap by visualizing the data depth and outliers in 2D (and potentially 3D) space.
It provides an intuitive, robust alternative to kernel density estimates or convex hulls when exploring multivariate data.

Reference:
Rousseeuw, P. J., Ruts, I., & Tukey, J. W. (1999). The Bagplot: A Bivariate Boxplot. The American Statistician, 53(4), 382–387.
ResearchGate link

Image

Figure 1: Example of a 2D Bagplot showing data depth and outliers (adapted from Rousseeuw et al., 1999).

Proposed Functionality

Using the plotly api:

Express:

import plotly.express as px

# 2D Bagplot
fig2d = px.bagplot(df, x="feature1", y="feature2", depth_method="tukey", show_outliers=True)
fig2d.show()

# 3D Bagplot
fig3d = px.bagplot_3d(df, x="feature1", y="feature2", z="feature3",
                      depth_method="tukey", show_outliers=True)
fig3d.show()

Graph Objects:

import plotly.graph_objects as go

fig = go.Figure(data=go.Bagplot(
    x=df["feature1"],
    y=df["feature2"],
    show_outliers=True,
    depth_method="tukey"
))
fig.show()

fig = go.Figure(data=go.Bagplot3D(
    x=df["x"], y=df["y"], z=df["z"],
    show_outliers=True,
    depth_method="tukey"
))
fig.show()

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

実装ファイルやテストは指定されていません。まず、参照されているBagplot論文と併せてPlotlyのPython Expressおよびgraph_objects APIを確認し、そのうえで対象範囲に2D、3D、またはその両方が含まれるかを明確にしてください。完了とは、要求されたdata-depthおよび外れ値機能について、合意されたAPIとそれに対応する可視化の動作が定まっていることを意味します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
plotly, python
領域
data-visualization
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。