@@ -113,27 +113,27 @@ GLMakie.activate!()
113
113
114
114
let's continue using the cmip6 dataset
115
115
116
- ```` @example plots
116
+ ```` @example AoG
117
117
store ="gs://cmip6/CMIP6/ScenarioMIP/DKRZ/MPI-ESM1-2-HR/ssp585/r1i1p1f1/3hr/tas/gn/v20190710/"
118
118
g = open_dataset(zopen(store, consolidated=true))
119
119
c = g["tas"]
120
120
````
121
121
122
122
and let's focus on the first time step:
123
123
124
- ```` @example plots
124
+ ```` @example AoG
125
125
dim_data = readcubedata(c[time=1]) # read into memory first!
126
126
````
127
127
128
128
and now plot
129
129
130
- ```` @example plots
130
+ ```` @example AoG
131
131
data(dim_data) * mapping(:lon, :lat; color=:value) * visual(Scatter) |> draw
132
132
````
133
133
134
134
set other attributes
135
135
136
- ```` @example plots
136
+ ```` @example AoG
137
137
plt = data(dim_data) * mapping(:lon, :lat; color=:value)
138
138
draw(plt * visual(Scatter, marker=:rect), scales(Color = (; colormap = :plasma));
139
139
axis = (width = 600, height = 400, limits=(0, 360, -90, 90)))
@@ -143,26 +143,33 @@ draw(plt * visual(Scatter, marker=:rect), scales(Color = (; colormap = :plasma))
143
143
144
144
For this let's consider more time steps from our dataset:
145
145
146
- ```` @example plots
146
+ ```` @example AoG
147
147
using Dates
148
148
dim_time = c[time=DateTime("2015-01-01") .. DateTime("2015-01-01T21:00:00")] # subset 7 t steps
149
149
````
150
150
151
- ```` @example plots
151
+ ```` @example AoG
152
152
dim_time = readcubedata(dim_time); # read into memory first!
153
153
nothing # hide
154
154
````
155
155
156
- ```` @example plots
156
+ ```` @example AoG
157
157
plt = data(dim_time) * mapping(:lon, :lat; color = :value, layout = :time => nonnumeric)
158
158
draw(plt * visual(Scatter, marker=:rect))
159
159
````
160
160
161
161
again, let's add some additional attributes
162
162
163
- ```` @example plots
163
+ ```` @example AoG
164
164
plt = data(dim_time) * mapping(:lon, :lat; color = :value, layout = :time => nonnumeric)
165
165
draw(plt * visual(Scatter, marker=:rect), scales(Color = (; colormap = :magma));
166
166
axis = (; limits=(0, 360, -90, 90)),
167
167
figure=(; size=(900,600)))
168
+ ````
169
+
170
+ most [ Makie plot functions] ( https://docs.makie.org/stable/reference/plots/overview ) should work. See ` lines ` for example
171
+
172
+ ```` @example AoG
173
+ plt = data(dim_data[lon=1..10]) * mapping(:lat, :value; layout = :lon => nonnumeric)
174
+ draw(plt * visual(Lines); figure=(; size=(600,400)))
168
175
````
0 commit comments