Specify axis ordering for specific facet in multi-facet plot

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
pandas, python

调研方向

从 facet_grid 入口开始,复现提供的 geom_area 示例,以检查连续分面轴的排序方式。确定是否可以独立指定每个分面的反转,并将完成定义为:在一个绘图中支持左窗格和右窗格所要求的相反排序,同时为该行为提供覆盖。

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

描述

Documentation Question

Correct me if I am wrong, but it is not possible(?) to create a multi-facet plot with continuous facets where one of the facets reverses the x (y) axis in a particular facet. For example if I have:

df = pd.concat([
    pd.DataFrame({'x': [1, 2, 3, 4, 5, 6, 7, 8], 'level': [2, 4, 9, 25, 36, 49, 64], 'pane': 'left'}),
    pd.DataFrame({'x': [1, 2, 3, 4, 5, 6, 7, 8], 'level': [1, 3, 8, 24, 30, 40, 55], 'pane': 'right'})
])

(ggplot() + 
    geom_area(aes(x='x', y='level', fill='pane'), data=df) +
    facet_grid(". ~ pane"))

Supposing that I want the 'left' pane to be ordered from 8 downto 1 and the 'right' ordered from 1 to 8, is it possible to accomplish this in the same ggplot()?

主要语言
Python
星标
4.8k
派生
260
平均合并
2 天 12 小时
30 天内合并 PR
4

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

has2k1/plotnine 的其他 Issue

查看 has2k1/plotnine 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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