Skip to content

Improve Chart.Grid#212

Merged
kMutagene merged 4 commits intodevfrom
grid-new
Sep 30, 2021
Merged

Improve Chart.Grid#212
kMutagene merged 4 commits intodevfrom
grid-new

Conversation

@kMutagene
Copy link
Copy Markdown
Collaborator

@kMutagene kMutagene commented Sep 30, 2021

This PR drastically improves Chart.Grid, which previously only worked with 2D cartesian traces.

  • Make Chart.Grid work for all trace types
  • adapt docs
  • add tests

It now works with ALL trace types as well as nested composite charts as long as they have the same trace type. here is an example:

[
    Chart.Point([1,2; 2,3])
    Chart.PointTernary([1,2,3; 2,3,4])
    Chart.Heatmap([[1; 2];[3; 4]], Showscale=false)
    Chart.Point3d([1,3,2])
    Chart.PointMapbox([1,2]) |> Chart.withMapbox(Mapbox.init(Style = StyleParam.MapboxStyle.OpenStreetMap))
    [
        let y =  [2.; 1.5; 5.; 1.5; 2.; 2.5; 2.1; 2.5; 1.5; 1.;2.; 1.5; 5.; 1.5; 3.; 2.5; 2.5; 1.5; 3.5; 1.]
        Chart.BoxPlot("y" ,y,Name="bin1",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
        Chart.BoxPlot("y'",y,Name="bin2",Jitter=0.1,Boxpoints=StyleParam.Boxpoints.All);
    ]
    |> Chart.combine
]
|> Chart.Grid(2,3)
|> Chart.withSize(1000,1000)
|> Chart.show

image

closes #163
closes #149

@kMutagene kMutagene marked this pull request as ready for review September 30, 2021 12:05
@kMutagene kMutagene merged commit ea2e452 into dev Sep 30, 2021
@kMutagene kMutagene deleted the grid-new branch October 21, 2021 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Couldn't use Chart.withLayoutGridStyle to position subplots in a grid Could not reproduce 3Dchart in Chart.Grid

1 participant