Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/probeinterface/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,21 @@ def plot_probegroup(probegroup, same_axes: bool = True, **kargs):
kargs["zlims"] = None

kargs["title"] = False

cum_contact_cnt = 0
total_contacts = sum(p.get_contact_count() for p in probegroup.probes)

for i, probe in enumerate(probegroup.probes):
plot_probe(probe, ax=axs[i], **kargs)
n = probe.get_contact_count()
kargs_probe = kargs.copy()
for key in ["contacts_colors", "contacts_values", "text_on_contact"]:
if key in kargs and kargs[key] is not None:
val = kargs[key]
if hasattr(val, "__len__") and len(val) == total_contacts:
kargs_probe[key] = val[cum_contact_cnt : cum_contact_cnt + n]

plot_probe(probe, ax=axs[i], **kargs_probe)
cum_contact_cnt += n


def plot_probe_group(probegroup, same_axes: bool = True, **kargs):
Expand Down