Skip to content

Improve Chart.Grid #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 30, 2021
Merged

Improve Chart.Grid #212

merged 4 commits into from
Sep 30, 2021

Conversation

kMutagene
Copy link
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
1 participant