Skip to content

Commit

Permalink
replace Cairo with GLMakie for arrow plots
Browse files Browse the repository at this point in the history
  • Loading branch information
ctroupin committed Jan 30, 2025
1 parent c7845a3 commit 6674d56
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Manifest.toml
notebooks/figures/
notebooks/3-Analysis/Adriatic
notebooks/data/data_from_*
notebooks/*html
Expand Down
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
GRIB = "b16dfd50-4035-11e9-28d4-9dfe17e6779b"
GeoArrays = "2fb1d81b-e6a0-5fc5-82e6-8e06903437ab"
GeoDatasets = "ddc7317b-88db-5cb5-a849-8449e5df04f9"
Expand Down
25 changes: 7 additions & 18 deletions notebooks/1-Intro/1-05-plots-maps.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"- `Makie` can be used in combination with [`GeoMakie`](https://geo.makie.or), which allows one to manage different coordinate reference systems (CRS).\n",
"\n",
"<div class=\"alert alert-block alert-warning\"> \n",
" ⚠️ The use of `PyPlot` (+ <code>cartopy</code> or <code>Basemap</code>) can lead to installation errors which are not always easy to solve. <br> \n",
" ⚠️ The use of <code>PyPlot</code> (+ <code>cartopy</code> or <code>Basemap</code>) can lead to installation errors which are not always easy to solve. <br> \n",
"This is why we will focus more on the creation of figures with <code>Makie</code>.\n",
"</div>"
]
Expand All @@ -35,21 +35,10 @@
"execution_count": null,
"id": "d3ed3904",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling Makie [ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a] (cache misses: incompatible header (18))\n",
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling CairoMakie [13f3f980-e62b-5c42-98c6-ff1f3baf88f0] (cache misses: incompatible header (18))\n",
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling GeoMakie [db073c08-6b98-4ee5-b6a4-5efafb3259c6] (cache misses: wrong dep version loaded (2), incompatible header (18))\n",
"\u001b[36m\u001b[1m[ \u001b[22m\u001b[39m\u001b[36m\u001b[1mInfo: \u001b[22m\u001b[39mPrecompiling DIVAnd [efc8151c-67de-5a8f-9a35-d8f54746ae9d] (cache misses: incompatible header (18))\n"
]
}
],
"outputs": [],
"source": [
"using Dates\n",
"using Makie, CairoMakie, GeoMakie\n",
"using Makie, GLMakie, GeoMakie\n",
"using DIVAnd\n",
"using NCDatasets\n",
"using ColorSchemes\n",
Expand Down Expand Up @@ -457,9 +446,9 @@
"source": [
"fig = Figure();\n",
"r = 2;\n",
"ga = Axis(\n",
"ga = GeoAxis(\n",
" fig[1, 1];\n",
" # dest = \"+proj=merc\",\n",
" dest = \"+proj=merc\",\n",
" title = \"Velocity field\",\n",
" xticks = 8:4:20,\n",
" yticks = 38:2:46,\n",
Expand Down Expand Up @@ -522,9 +511,9 @@
"source": [
"fig = Figure();\n",
"r = 2;\n",
"ga = Axis(\n",
"ga = GeoAxis(\n",
" fig[1, 1];\n",
" # dest = \"+proj=merc\",\n",
" dest = \"+proj=merc\",\n",
" title = \"Velocity field\",\n",
" xticks = 8:4:20,\n",
" yticks = 38:2:46,\n",
Expand Down

0 comments on commit 6674d56

Please sign in to comment.