Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
@@ -4,7 +4,7 @@ import numpy as np
|
|
4 |
|
5 |
def plot_3D_invfitness(trait, fitness, resident, range, color="RdBu"):
|
6 |
X, Y = np.meshgrid(trait, trait)
|
7 |
-
f_projection = (np.min(fitness) -
|
8 |
axis = dict(
|
9 |
showbackground=True,
|
10 |
backgroundcolor="rgb(230, 230,230)",
|
@@ -41,7 +41,7 @@ def plot_3D_invfitness(trait, fitness, resident, range, color="RdBu"):
|
|
41 |
slice = go.Surface(
|
42 |
x=x_projection,
|
43 |
y=Y,
|
44 |
-
z=(fitness *
|
45 |
surfacecolor=x_projection,
|
46 |
colorscale="Greys",
|
47 |
opacity=0.5,
|
|
|
4 |
|
5 |
def plot_3D_invfitness(trait, fitness, resident, range, color="RdBu"):
|
6 |
X, Y = np.meshgrid(trait, trait)
|
7 |
+
f_projection = (np.min(fitness) - 2) * np.ones(fitness.shape)
|
8 |
axis = dict(
|
9 |
showbackground=True,
|
10 |
backgroundcolor="rgb(230, 230,230)",
|
|
|
41 |
slice = go.Surface(
|
42 |
x=x_projection,
|
43 |
y=Y,
|
44 |
+
z=(fitness * 1e5),
|
45 |
surfacecolor=x_projection,
|
46 |
colorscale="Greys",
|
47 |
opacity=0.5,
|