plotly / plotly/plotly.py

.full_figure_for_development() doesn't show all computed data for go.Carpet

未关闭
#3,806 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug P3
主要语言
Python
星标
18.8k
派生
2.8k
平均合并
16 小时 26 分钟
30 天内合并 PR
21

描述

I want to set text ticktext along the baxis of a go.Carpet but couldn't figure out how to format ticktext and tickvals in the Carpet constructor. I tried to use .full_figure_for_development() to inspect what is set by default but these key-values pairs are missing from

A simple example:

import plotly.graph_objects as go

fig = go.Figure()

a = [0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3]
b = [4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6]
b2 = ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c']
y = [1, 1.4, 1.6, 1.75, 2, 2.5, 2.7, 2.75, 3, 3.5, 3.7, 3.75]

fig.add_trace(go.Carpet(
    a = a,
    b = b,  # b2,
    y = y,
    aaxis = dict(
        tickprefix = 'a = ',
    ),
    baxis = dict(
        tickprefix = 'b = ',
        smoothing = 0,
        # tickmode = 'array',
        # ticktext = b2,  # ['a', 'b', 'c'],
        # tickvals = b,  # [4, 5, 6]
    )
))

fig.show()

full_fig = fig.full_figure_for_development()
print(full_fig.data[0]['baxis'])  # ticktext and tickvals missing!

i.e. I want to figure out how to set b = 4 to b = 6 to a, b, and c
image

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从提供的 go.Carpet 示例开始,运行 full_figure_for_development() 以复现缺失的 baxis ticktext 和 tickvals。跟踪 Carpet 默认值的计算和表示方式,然后验证生成的 baxis 包含预期的计算数据,同时不破坏现有的 figure 输出。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
data-visualization
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。