From 7336853d775b7a426250aad170798b96013d0797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Poisot?= Date: Fri, 27 Nov 2020 09:01:57 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=8A=20fix=20the=20margins=20in=20the?= =?UTF-8?q?=20example=20plots?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/src/examples/beta-diversity.md | 5 +++-- docs/src/examples/extinctions.md | 1 + docs/src/examples/integration_mangal.md | 10 +++++++--- docs/src/examples/modularity.md | 1 + 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/src/examples/beta-diversity.md b/docs/src/examples/beta-diversity.md index 53203dab3..e31e9f5e9 100644 --- a/docs/src/examples/beta-diversity.md +++ b/docs/src/examples/beta-diversity.md @@ -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 @@ -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)) diff --git a/docs/src/examples/extinctions.md b/docs/src/examples/extinctions.md index 40aee9dfa..5f615468d 100644 --- a/docs/src/examples/extinctions.md +++ b/docs/src/examples/extinctions.md @@ -9,6 +9,7 @@ return an array of networks to be manipulated later: ```@example ext using EcologicalNetworks using Plots +using Plots.PlotMeasures ``` ```@example ext diff --git a/docs/src/examples/integration_mangal.md b/docs/src/examples/integration_mangal.md index 13d98ae92..92570cc8c 100644 --- a/docs/src/examples/integration_mangal.md +++ b/docs/src/examples/integration_mangal.md @@ -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. @@ -101,7 +102,8 @@ 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 @@ -109,7 +111,8 @@ 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 @@ -117,5 +120,6 @@ scatter(foodweb_measures.modul, foodweb_measures.nested, alpha=0.6, color=pal, lab="", framestyle=:box, xlabel="Modularity", - ylabel="Nestedness") + ylabel="Nestedness", + margin = 10mm) ``` diff --git a/docs/src/examples/modularity.md b/docs/src/examples/modularity.md index 4ab006dd9..28934ade0 100644 --- a/docs/src/examples/modularity.md +++ b/docs/src/examples/modularity.md @@ -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