Skip to content

Commit 6bb43c6

Browse files
committed
updated scripts for revision
1 parent 9f85e1c commit 6bb43c6

File tree

12 files changed

+2005
-209
lines changed

12 files changed

+2005
-209
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,6 @@ results/outputs/*
160160
!results/outputs/connectomes
161161
results/figs/size_simulations
162162
data/maggot/meta_data.csv
163+
!results/outputs/connectome_seeded/
164+
results/outputs/connectome_seeded/*
165+
!results/outputs/connectome_seeded/pair_predictions.csv

data/c_elegans/herm_elec_adj.csv

Lines changed: 470 additions & 0 deletions
Large diffs are not rendered by default.

data/c_elegans/male_elec_adj.csv

Lines changed: 587 additions & 0 deletions
Large diffs are not rendered by default.

overleaf

Submodule overleaf updated from ecb30b3 to 7df87e3

pkg/pkg/plot/pymaid.py

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
55
import navis
66

7-
volume_names = ["PS_Neuropil_manual"]
7+
volume_names = ["cns"]
88

99

1010
def rgb2hex(r, g, b):
@@ -54,9 +54,6 @@ def simple_plot_neurons(
5454
palette[key] = rgb2hex(*value)
5555

5656
# neurons = [pymaid.get_neuron(n) for n in neuron_ids]
57-
# if volume_names is not None:
58-
# volumes = [pymaid.get_volume(v) for v in volume_names]
59-
# plot_volumes(volumes)
6057

6158
colors = np.vectorize(palette.get)(neuron_ids)
6259

@@ -71,6 +68,7 @@ def simple_plot_neurons(
7168
soma=soma,
7269
**kwargs,
7370
)
71+
7472
# plot_volumes(volumes, ax)
7573
if plot_mode == "3d":
7674
ax.azim = azim
@@ -83,11 +81,27 @@ def simple_plot_neurons(
8381
if force_bounds:
8482
ax.set_xlim3d((-4500, 110000))
8583
ax.set_ylim3d((-4500, 110000))
84+
85+
if autoscale:
86+
ax.autoscale()
87+
xlims = ax.get_xlim3d()
88+
ylims = ax.get_ylim3d()
89+
zlims = ax.get_zlim3d()
90+
91+
if volume_names is not None:
92+
volumes = [pymaid.get_volume(v) for v in volume_names]
93+
plot_volumes(volumes, ax)
94+
ax.set_xlim3d(xlims)
95+
ax.set_ylim3d(ylims)
96+
ax.set_zlim3d(zlims)
97+
8698
return ax
8799

88100

89101
def plot_volumes(volumes, ax):
102+
ax.autoscale(enable=False)
90103
navis.plot2d(volumes, ax=ax, method="3d", autoscale=False)
104+
ax.autoscale(enable=True)
91105
for c in ax.collections:
92106
if isinstance(c, Poly3DCollection):
93107
c.set_alpha(0.02)

poetry.lock

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ jupyter-client = "6.1.12" # https://github.com/jupyter/jupyter_client/issues/637
1313
svgutils = "^0.3.4"
1414
python-catmaid = "^2.1.1"
1515
jupytext = "^1.13.8"
16+
Shapely = "^1.8.4"
1617

1718
[tool.poetry.dev-dependencies]
1819
black = "^22.3.0"

0 commit comments

Comments
 (0)