Skip to content

Commit 8d965f7

Browse files
committed
do new scope
1 parent ad567e9 commit 8d965f7

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

docs/src/tutorials/plottingmaps.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ nothing # hide
2929
use lookup to get axis values
3030

3131
````@example plots
32-
lon = lookup(ct1_slice, :lon)
33-
lat = lookup(ct1_slice, :lat)
34-
data = ct1_slice.data[:,:];
32+
lon_d = lookup(ct1_slice, :lon)
33+
lat_d = lookup(ct1_slice, :lat)
34+
data_d = ct1_slice.data[:,:];
3535
nothing # hide
3636
````
3737

@@ -50,9 +50,9 @@ fig
5050
Some transformations
5151

5252
````@example plots
53-
δlon = (lon[2]-lon[1])/2
54-
nlon = lon .- 180 .+ δlon
55-
ndata = circshift(data, (192,1))
53+
δlon = (lon_d[2]-_lon_d[1])/2
54+
nlon = lon_d .- 180 .+ δlon
55+
ndata = circshift(data_d, (192,1))
5656
nothing # hide
5757
````
5858

@@ -61,7 +61,7 @@ and add Coastlines with `GeoMakie.coastlines()`,
6161
````@example plots
6262
fig = Figure(;size=(1200,600))
6363
ax = GeoAxis(fig[1,1])
64-
surface!(ax, nlon, lat, ndata; colormap = :seaborn_icefire_gradient, shading=false)
64+
surface!(ax, nlon, lat_d, ndata; colormap = :seaborn_icefire_gradient, shading=false)
6565
cl=lines!(ax, GeoMakie.coastlines(), color = :white, linewidth=0.85)
6666
translate!(cl, 0, 0, 1000)
6767
fig
@@ -71,7 +71,7 @@ fig
7171
````@example plots
7272
fig = Figure(; size=(1200,600))
7373
ax = GeoAxis(fig[1,1]; dest = "+proj=moll")
74-
surface!(ax, nlon, lat, ndata; colormap = :seaborn_icefire_gradient, shading=false)
74+
surface!(ax, nlon, lat_d, ndata; colormap = :seaborn_icefire_gradient, shading=false)
7575
cl=lines!(ax, GeoMakie.coastlines(), color = :white, linewidth=0.85)
7676
translate!(cl, 0, 0, 1000)
7777
fig
@@ -103,15 +103,19 @@ fig
103103
>
104104
> **AlgebraOfGraphics.jl** is a high-level plotting library built on top of Makie.jl that provides a declarative algebra for creating complex visualizations, similar to **ggplot2**'s "grammar of graphics" in R. It allows you to construct plots using algebraic operations like **(*)** and **(+)**, making it easy to create sophisticated graphics with minimal code.
105105
106-
````@example plots
106+
````@example AoG
107+
using YAXArrays, Zarr, Dates
107108
using GLMakie
108109
using AlgebraOfGraphics
110+
using GLMakie.GeometryBasics
109111
GLMakie.activate!()
110112
````
111113

112114
let's continue using the cmip6 dataset
113115

114116
````@example plots
117+
store ="gs://cmip6/CMIP6/ScenarioMIP/DKRZ/MPI-ESM1-2-HR/ssp585/r1i1p1f1/3hr/tas/gn/v20190710/"
118+
g = open_dataset(zopen(store, consolidated=true))
115119
c = g["tas"]
116120
````
117121

0 commit comments

Comments
 (0)