Skip to content

Makie recipes demo#139

Open
gaelforget wants to merge 11 commits into
JuliaOcean:mainfrom
gaelforget:MakieRecipes_dev1
Open

Makie recipes demo#139
gaelforget wants to merge 11 commits into
JuliaOcean:mainfrom
gaelforget:MakieRecipes_dev1

Conversation

@gaelforget

Copy link
Copy Markdown
Member

See

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 54.32%. Comparing base (6ae4b5a) to head (d0fe121).

Files with missing lines Patch % Lines
ext/AIBECSMakieExt.jl 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
+ Coverage   52.71%   54.32%   +1.61%     
==========================================
  Files          34       36       +2     
  Lines        1125     1167      +42     
==========================================
+ Hits          593      634      +41     
- Misses        532      533       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gaelforget gaelforget changed the title start Makie recipes [WIP] Makie recipes May 28, 2026
@gaelforget

Copy link
Copy Markdown
Member Author

We could do something like I did in OceanRobots.jl + use keyword arguments to select between section or map.

This way plot(M,depth=2000) vs plot(M,lon=-160) would be the plotting API with Makie and maybe we can also have the same with Plots.jl.

To achieve this degree of simplicity, via dispatch, the solve operation could output a data structure (OceanMatrixSolution?) that includes the grid.

@gaelforget

gaelforget commented May 30, 2026

Copy link
Copy Markdown
Member Author

On this branch, this should work :

using AIBECS, GLMakie, JLD2
results=AIBECS.demo.demo1()
plot(results,depth=2000)

@gaelforget

gaelforget commented May 30, 2026

Copy link
Copy Markdown
Member Author

I just added tests for this : plot for zonal, meridional, horizontal heatmaps.

PR seems ready for review. Lots to improve (e.g. kwargs not used in plot) but maybe good enough for now?

@gaelforget gaelforget requested a review from briochemc May 30, 2026 16:21
@gaelforget gaelforget changed the title [WIP] Makie recipes Makie recipes demo May 30, 2026
@briochemc

Copy link
Copy Markdown
Member

I love this! To be honest I never tried implementing Makie recipes because I always assumed that they were too complicated and not as powerful as the Plots.jl ones... But then again I never even tried 😅

Do you think you can combine the recipes and the "plotting with Makie" tutorial so that (i) we get a much simpler tutorial and (ii) maybe some pieces from the tutorial are useful defaults and can be moved to the recipe side as well. Either way it would be great to "see it in action" in one of the tutorials.

Are these recipes composable BTW? E.g., can I use them to make the multi-panel plot at the end of that tutorial?

@briochemc

Copy link
Copy Markdown
Member

FYI I did not forget this but I have been working on a GeoMakie PR for contourf + projections and would like to finish that first :)

@gaelforget

gaelforget commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Are these recipes composable BTW? E.g., can I use them to make the multi-panel plot at the end of that tutorial?

yes, as now shown in PR (see plot! docstring)

Do you think you can combine the recipes and the "plotting with Makie" tutorial so that (i) we get a much simpler tutorial and (ii) maybe some pieces from the tutorial are useful defaults and can be moved to the recipe side as well. Either way it would be great to "see it in action" in one of the tutorials.

For now this is what I did :

  1. put the examples in docstring
  2. added demo1 (in src/demo.jl) to load up and solve example
  3. defined SteadyStateSolution in src/demo.jl too

A possible next step would be to migrate SteadyStateSolution to a more permanent location within the package, export it, feature it in the docs, and then it could also be used for the Plots.jl recipes (same principle as here, specializing plot). Updating the tutorials before this is done seems a bit premature to me.

For this PR, contenerizing everything into src/demo.jl seemed like a good way to start, low key, until more time is available to go further.

ps. get_axis(grd) could also be worth moving out the Makie ext, into src, since it does not involve Makie specifically

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.

2 participants