Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
📊 fix the margins in the example plots
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoisot committed Nov 27, 2020
1 parent 6790987 commit 7336853
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docs/src/examples/beta-diversity.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ host-parasite networks.
```@example betadiv
using EcologicalNetworks
using Plots
using Plots.PlotMeasures
```

We use networks that span the entirety of Eurasia. Because these networks are
Expand Down Expand Up @@ -57,11 +58,11 @@ end
We can now visualize these data:

```@example betadiv
p1 = histogram(βosprime, frame=:origin, bins=20, c=:white, leg=false, grid=false)
p1 = histogram(βosprime, frame=:origin, bins=20, c=:white, leg=false, grid=false, margin=10mm)
xaxis!(p1, "Difference to metaweb", (0,1))
yaxis!(p1, (0,10))
p2 = plot([0,1],[0,1], c=:grey, ls=:dash, frame=:origin, grid=false, lab="", legend=:bottomleft)
p2 = plot([0,1],[0,1], c=:grey, ls=:dash, frame=:origin, grid=false, lab="", legend=:bottomleft, margin=10mm)
scatter!(p2, S, OS, mc=:black, lab="shared sp.", msw=0.0)
scatter!(p2, S, WN, mc=:lightgrey, lab="all sp.", msw=0.0, m=:diamond)
xaxis!(p2, "Species dissimilarity", (0,1))
Expand Down
1 change: 1 addition & 0 deletions docs/src/examples/extinctions.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ return an array of networks to be manipulated later:
```@example ext
using EcologicalNetworks
using Plots
using Plots.PlotMeasures
```

```@example ext
Expand Down
10 changes: 7 additions & 3 deletions docs/src/examples/integration_mangal.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ using EcologicalNetworks
using Mangal
using DataFrames
using Plots
using Plots.PlotMeasures
```

We first retrieve relevant metadata for all 1,386 networks archived on `mangal.io` using the `Mangal.jl` package. We count the number of species $S$ and the total number of interactions $L$ in each network, as well as their number of trophic interactions (predation and herbivory). We store these information in a data frame along with the networks' ID numbers, and print the first 5 elements. Due to the high number of networks we handle, note that this step might take some time to run.
Expand Down Expand Up @@ -101,21 +102,24 @@ scatter(foodweb_measures.connect, foodweb_measures.nested,
alpha=0.6, color=pal,
lab="", framestyle=:box,
xlabel="Connectance",
ylabel="Nestedness")
ylabel="Nestedness",
margin = 10mm)
```

```@example mangal
scatter(foodweb_measures.connect, foodweb_measures.modul,
alpha=0.6, color=pal,
lab="",framestyle=:box,
xlabel="Connectance",
ylabel="Modularity")
ylabel="Modularity",
margin = 10mm)
```

```@example mangal
scatter(foodweb_measures.modul, foodweb_measures.nested,
alpha=0.6, color=pal,
lab="", framestyle=:box,
xlabel="Modularity",
ylabel="Nestedness")
ylabel="Nestedness",
margin = 10mm)
```
1 change: 1 addition & 0 deletions docs/src/examples/modularity.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ repeating the process multiple times, and having some luck.
using EcologicalNetworks
using EcologicalNetworksPlots
using Plots
using Plots.PlotMeasures
```

## Generating modular partitions
Expand Down

0 comments on commit 7336853

Please sign in to comment.