The UFZ services GitLab and Mattermost will be unavailable on Monday, July 4 from 06:00 AM to 08:00 AM due to maintenance work.

Commit bcce6b77 authored by Adam Reichold's avatar Adam Reichold
Browse files

Add mini talk on EUNIS-to-flower-patches problem.

parent 6bbf5b41
documents/dach21/*.jpg filter=lfs diff=lfs merge=lfs -text
documents/dach21/*.png filter=lfs diff=lfs merge=lfs -text
documents/dach21/*.mp4 filter=lfs diff=lfs merge=lfs -text
documents/eunis/*.png filter=lfs diff=lfs merge=lfs -text
......@@ -78,6 +78,7 @@ document:
- documents/sampling_effects/sampling_effects.pdf
- documents/foraging_parameters.pdf
- documents/dach21/dach21.pdf
- documents/eunis/eunis.pdf
builder:
when: manual
......
\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usepackage{pgfplots}
\mode<presentation>
{
\usetheme{Pittsburgh}
}
\setbeamertemplate{navigation symbols}{}
\definecolor{flower_patch_purple}{RGB}{233,58,166}
\definecolor{flower_patch_red}{RGB}{226,62,47}
\definecolor{flower_patch_green}{RGB}{48,220,146}
\definecolor{flower_patch_blue}{RGB}{76,167,200}
\begin{document}
\begin{frame}
\begin{center}
\begin{tikzpicture}
\path (-6.5,-5) rectangle (4.5,4);
\node[draw,minimum size=50,very thick] at (0,0) (model) {\large Model};
\only<2->
{
% z.B. trait matching label
\node[draw] at (-4,2) (preferences)
{
\begin{tabular}{cccc}
& $\mathbf{I_1}$ & $\mathbf{I_2}$ & $\mathbf{I_3}$ \\
$\mathbf{F_1}$ & 0.09 & 0.02 & 0.83 \\
$\mathbf{F_2}$ & 0.78 & 0.87 & 0.98 \\
$\mathbf{F_3}$ & 0.80 & 0.46 & 0.78 \\
$\mathbf{F_4}$ & 0.12 & 0.64 & 0.14 \\
\end{tabular}
};
\path (preferences) edge[->,thick] node {} (model);
}
\only<3>
{
\node[font=\small,align=center] (paper) at (2,2.5) {Truit et al.: Trait-Based Modeling of\\Multihost Pathogen Transmission (2019)};
}
\only<4-6>
{
\node[font=\small] (traits) at (2,3) {selectivity: $I \in \left[ 0, 1 \right]$ attractiveness: $F \in \left[ 0, 1 \right]$};
}
\only<5-6>
{
\node[font=\small] (nestedness) at (2,2.5) {nestedness: $P\left( I, F \right) \propto e^{-n I \left( 1 - F \right)}$};
}
\only<6>
{
\node[font=\small] (specialisation) at (2,2) {specialisation: $P\left( I, F \right) \propto e^{-\sigma \left( I - F \right)^2}$};
}
\only<7->
{
\node[draw,minimum size=100] at (-4,-2) (flower-patches)
{
\begin{tikzpicture}
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (0.36,2.26) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (0.68,1.32) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.74,2.11) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.16,2.04) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (0.61,2.52) {};
\node[circle,fill=flower_patch_red,minimum size=6,inner sep=0] at (0.08,0.07) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (2.51,1.02) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.13,0.08) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.17,1.32) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (0.62,0.58) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (0.77,0.06) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.49,1.71) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (2.65,2.30) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.90,2.50) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (2.22,1.79) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (1.57,2.36) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (0.09,0.65) {};
\node[circle,fill=flower_patch_red,minimum size=6,inner sep=0] at (1.11,0.46) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.88,1.80) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (2.08,1.39) {};
\node[circle,fill=flower_patch_blue,minimum size=6,inner sep=0] at (0.12,1.88) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.58,1.05) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (1.34,2.62) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (2.54,1.54) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (2.56,0.02) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (2.19,2.37) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.52,0.53) {};
\node[circle,fill=flower_patch_purple,minimum size=6,inner sep=0] at (1.29,0.95) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (0.47,1.56) {};
\node[circle,fill=flower_patch_green,minimum size=6,inner sep=0] at (2.18,0.68) {};
\end{tikzpicture}
};
\path (flower-patches) edge[->,thick] node {} (model);
}
\only<8>
{
\node (weights) at (1,-3)
{
\begin{tikzpicture}[scale=0.4]
\begin{axis}[ybar,symbolic x coords={$F_1$,$F_2$,$F_3$,$F_4$},x tick style={draw=none},bar width=1.5cm,enlarge x limits=0.2]
\addplot[fill=flower_patch_purple,bar shift=0] coordinates {($F_1$,8)};
\addplot[fill=flower_patch_red,bar shift=0] coordinates {($F_2$,2)};
\addplot[fill=flower_patch_green,bar shift=0] coordinates {($F_3$,4)};
\addplot[fill=flower_patch_blue,bar shift=0] coordinates {($F_4$,1)};
\end{axis}
\end{tikzpicture}
};
}
\only<9->
{
\node[draw] at (3,0) (contacts) {\includegraphics[width=3cm]{bipartite_network}};
\path (model) edge[->,thick] node {} (contacts);
}
\end{tikzpicture}
\end{center}
\end{frame}
\begin{frame}
\begin{center}
\begin{tikzpicture}
\node[inner sep=0] (gis-data) at (0,0) {\includegraphics[width=4cm]{gis_data}};
\node[inner sep=0,minimum size=150,draw] (flower-patches) at (6,0)
{
\begin{tikzpicture}
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (0.54,3.39) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (1.02,1.98) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (2.61,3.15) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (1.73,3.05) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (0.92,3.78) {};
\node[circle,fill=flower_patch_red,minimum size=10,inner sep=0] at (0.12,0.10) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (3.76,1.52) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (1.69,0.12) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (1.75,1.98) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (0.92,0.88) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (1.16,0.09) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (2.23,2.57) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (3.97,3.44) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (2.84,3.75) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (3.32,2.68) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (2.35,3.53) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (0.14,0.97) {};
\node[circle,fill=flower_patch_red,minimum size=10,inner sep=0] at (1.66,0.69) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (2.81,2.70) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (3.11,2.08) {};
\node[circle,fill=flower_patch_blue,minimum size=10,inner sep=0] at (0.17,2.81) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (2.37,1.57) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (2.01,3.93) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (3.81,2.31) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (3.83,0.02) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (3.28,3.54) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (2.28,0.80) {};
\node[circle,fill=flower_patch_purple,minimum size=10,inner sep=0] at (1.94,1.43) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (0.71,2.34) {};
\node[circle,fill=flower_patch_green,minimum size=10,inner sep=0] at (3.27,1.02) {};
\end{tikzpicture}
};
\path (gis-data) edge[->,very thick] node[midway,above] {\huge ?} (flower-patches);
\end{tikzpicture}
\end{center}
\end{frame}
\begin{frame}
\end{frame}
\end{document}
import math as m
import random as r
count = 30
scale = 2.67
# scale = 4
min_distance_2 = 0.0125 * scale ** 2
size = m.floor(2.5 * scale)
colors = ["purple", "red", "green", "blue"]
weights = [8, 2, 4, 1]
r.seed(1)
positions = []
for _ in range(count):
collision = True
while collision:
position = (r.random() * scale, r.random() * scale)
for position1 in positions:
distance_2 = (position[0] - position1[0]) ** 2 + (
position[1] - position1[1]
) ** 2
if distance_2 < min_distance_2:
break
else:
collision = False
positions.append(position)
[color] = r.choices(colors, weights=weights)
print(
f"\\node[circle,fill=flower_patch_{color},minimum size={size:.0f},inner sep=0] at ({position[0]:.2f},{position[1]:.2f}) {{}};"
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment