Error in plotly express scatter with continuous_color_scale and marginal_x
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
Hello
i am logging this as i think this might be a bug. I found while building a Dash app but the same issue arises in a a jupyter notebook.
import plotly.express as px
df = px.data.iris()
below, it works as expected:
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="sepal_length",color_continuous_scale='Viridis')
fig
so is the following
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="sepal_length",marginal_x='box')
fig
But the following expression breaks down
fig = px.scatter(df, x="sepal_width", y="sepal_length", color="sepal_length",marginal_x='box',color_continuous_scale='Viridis')
fig

it looks like box marker is using 'V' of Viridis in the color_continuous_scale.
Thanks
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 Jupyter notebook 中运行提供的 Python 示例,并将可正常工作的情况与 marginal_x='box' 和 color_continuous_scale='Viridis' 的组合进行比较。跟踪该组合如何构建 scatter 和 marginal box traces;完成标准是图表能够渲染,且不会使用连续色阶中的错误颜色显示 box marker。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- jupyter-notebook, python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100