Skip to content

Commit 367a0ea

Browse files
committed
organized doc-specific functions
1 parent 4085520 commit 367a0ea

File tree

7 files changed

+176
-397
lines changed

7 files changed

+176
-397
lines changed

docs/plots.jl

Lines changed: 0 additions & 181 deletions
This file was deleted.

docs/src/color_laws.md

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
```@setup plotting
2+
using DustExtinction, CairoMakie
3+
using DustExtinction: ExtinctionLaw
4+
include("./plotting.jl")
5+
```
16

27
# [Color laws](@id laws)
38

@@ -138,8 +143,8 @@ and is loosely associated with the size of the dust grains in the interstellar m
138143

139144
### Clayton, Cardelli and Mathis (1989)
140145

141-
```@example
142-
using DustExtinction, CairoMakie; lplot(CCM89)
146+
```@example plotting
147+
lplot(CCM89) # hide
143148
```
144149

145150
```@docs
@@ -148,8 +153,8 @@ CCM89
148153

149154
### O'Donnell 1994
150155

151-
```@example
152-
using DustExtinction, CairoMakie; lplot(OD94)
156+
```@example plotting
157+
lplot(OD94) # hide
153158
```
154159

155160
```@docs
@@ -158,8 +163,8 @@ OD94
158163

159164
### Calzetti et al. (2000)
160165

161-
```@example
162-
using DustExtinction, CairoMakie; lplot(CAL00)
166+
```@example plotting
167+
lplot(CAL00) # hide
163168
```
164169

165170
```@docs
@@ -168,8 +173,8 @@ CAL00
168173

169174
### Valencic, Clayton, & Gordon (2004)
170175

171-
```@example
172-
using DustExtinction, CairoMakie; lplot(VCG04)
176+
```@example plotting
177+
lplot(VCG04) # hide
173178
```
174179

175180
```@docs
@@ -178,8 +183,8 @@ VCG04
178183

179184
### Gordon, Cartledge, & Clayton (2009)
180185

181-
```@example
182-
using DustExtinction, CairoMakie; lplot(GCC09)
186+
```@example plotting
187+
lplot(GCC09) # hide
183188
```
184189

185190
```@docs
@@ -188,8 +193,8 @@ GCC09
188193

189194
### Fitzpatrick (1999)
190195

191-
```@example
192-
using DustExtinction, CairoMakie; lplot(F99)
196+
```@example plotting
197+
lplot(F99) # hide
193198
```
194199

195200
```@docs
@@ -198,8 +203,8 @@ F99
198203

199204
### Fitzpatrick (2004)
200205

201-
```@example
202-
using DustExtinction, CairoMakie; lplot(F04)
206+
```@example plotting
207+
lplot(F04) # hide
203208
```
204209

205210
```@docs
@@ -208,8 +213,8 @@ F04
208213

209214
### Fitzpatrick (2019)
210215

211-
```@example
212-
using DustExtinction, CairoMakie; lplot(F19)
216+
```@example plotting
217+
lplot(F19) # hide
213218
```
214219

215220
```@docs
@@ -218,8 +223,8 @@ F19
218223

219224
### Maiz Apellaniz et al. (2014)
220225

221-
```@example
222-
using DustExtinction, CairoMakie; lplot(M14)
226+
```@example plotting
227+
lplot(M14) # hide
223228
```
224229

225230
```@docs
@@ -240,8 +245,8 @@ DustExtinction.checkbounds
240245

241246
#### Fitzpatrick & Massa (1990)
242247

243-
```@example
244-
using DustExtinction, CairoMakie; lplot(FM90)
248+
```@example plotting
249+
lplot(FM90) # hide
245250
```
246251

247252
```@docs
@@ -259,11 +264,9 @@ G03_LMCAve
259264

260265
#### Gordon et al. (2016)
261266

262-
```@example
263-
using DustExtinction, CairoMakie
264-
265-
mplot(G16, (2.0, 3.1, 4.0, 5.0, 6.0), 1.0)
266-
mplot(G16, 3.1, 0.0:0.2:1.0)
267+
```@example plotting
268+
mplot(G16, (2.0, 3.1, 4.0, 5.0, 6.0), 1.0) # hide
269+
mplot(G16, 3.1, 0.0:0.2:1.0) # hide
267270
```
268271

269272
```@docs

docs/src/dust_maps.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
```@setup plotting
2+
using DustExtinction, CairoMakie
3+
using DustExtinction: ExtinctionLaw
4+
include("./plotting.jl")
5+
```
6+
17
# [Dust Maps](@id maps)
28

39
## Usage
@@ -31,10 +37,8 @@ julia> [dustmap(l[i], b[j]) for i in 1:length(l), j in 1:length(b)]
3137
3238
```
3339

34-
```@example
35-
using DustExtinction, CairoMakie
36-
37-
dplot()
40+
```@example plotting
41+
dplot() # hide
3842
```
3943

4044
## Advanced Usage

0 commit comments

Comments
 (0)