plotly / plotly/Plotly.NET

Multiple Y-Axes with Subplots positioning

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

还没有人认领这个 Issue。

Type: Bug
主要语言
F#
星标
860
派生
99
平均合并
22 分钟
30 天内合并 PR
1

描述


open Plotly.NET

let x = [for i in 0..10 -> i]
let y = [for i in x -> Math.Pow(float i,2.0)]
let y2 = [for i in x -> Math.Pow(float i,3.0)]

[
    [
        Chart.Point(x,y,Name="1,1") |> Chart.withAxisAnchor(Y=1) 
        Chart.Point(x,y2,Name="1,2") |> Chart.withAxisAnchor(Y=2) 
    ]|>
    Chart.combine
    |> Chart.withYAxisStyle("y1",Side=StyleParam.Side.Left,Id=StyleParam.SubPlotId.YAxis 1)    
    |> Chart.withYAxisStyle("y2", Side=StyleParam.Side.Right,Id=StyleParam.SubPlotId.YAxis 2)
    Chart.Invisible()

]
|> Chart.Grid(2,2)

image

How can I make y2 axis attached to the plot??

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

调研方向

首先运行 issue 中的 F# 复现,并检查 Chart.Grid 和两次 Chart.withYAxisStyle 调用如何定位 y2 轴。当 y2 轴附加到相应的 subplot,而不是出现在单独的位置时,该 issue 就得到解决。

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

评估

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

把新 issue 发到你的邮箱

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