`marker=None` on a 1-D plot draws nothing

未关闭 适合新手
#625 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
matplotlib, python

调研方向

首先追踪 pp.plot 如何处理 1D 数据的样式默认值和 marker=None 参数,然后检查附近有关线条和标记样式的测试。该 issue 建议在未设置线条和标记时绘制实线或发出警告;在选择之前,先确认项目预期的绘图行为。空白图按预期处理,并且有回归测试覆盖此情况后,工作即告完成。

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

描述

The default 1-D style is linestyle='None', marker='o'. Passing
marker=None to get rid of the markers leaves both unset, so the axes are
empty (no warning). The lines are there, with linestyle='None' and
marker='None'.

import numpy as np, plopp as pp, scipp as sc

da = sc.DataArray(sc.array(dims=['x'], values=np.sin(np.arange(30.0))),
                  coords={'x': sc.arange('x', 30.0)})
pp.plot(da, marker=None)  # blank axes

Suggestion: make marker=None mean a solid line, or warn when neither a
line nor a marker would be drawn.

Reproduced on plopp 26.11.0, scipp 26.9.0, matplotlib 3.11.2.

主要语言
Python
星标
12
派生
7
平均合并
16 小时 5 分钟
30 天内合并 PR
6

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

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

scipp/plopp 的其他 Issue

查看 scipp/plopp 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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