Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a6fd05d
chore: update method doc
sanjayankur31 Feb 12, 2023
7bebd47
feat: add segment group schematic plotter
sanjayankur31 Feb 13, 2023
0029f38
feat(schematic-plot): enable addition of segment group ids as labels
sanjayankur31 Feb 13, 2023
4b202c2
feat(utils)!: move `get_next_hex_color` to separate utils module
sanjayankur31 Feb 13, 2023
fbc0ef5
feat: bump MAJOR version number for API breaking change
sanjayankur31 Feb 13, 2023
eb243da
fix(plot): correct type annotation
sanjayankur31 Feb 13, 2023
07ab95a
chore(test): turn off GUI for morph plot tests
sanjayankur31 Feb 13, 2023
64ffeac
chore(ci): remove duplicate pytest invocation
sanjayankur31 Feb 13, 2023
ff5585b
test: run `nrnivmodl` before running morph export tests
sanjayankur31 Feb 13, 2023
5328d3f
wip: curtain plots
sanjayankur31 Feb 13, 2023
f608b06
fix(plot-morph): only create scalebar at end of plotting
sanjayankur31 Feb 14, 2023
1895d53
feat(plot-morph): add scalebar etc. at end of plotting
sanjayankur31 Feb 14, 2023
1da1550
feat(curtain-plots): add method to create curtain plots of a list of …
sanjayankur31 Feb 14, 2023
c8eb0a1
test(curtain-plot): add test
sanjayankur31 Feb 14, 2023
0fec0a0
feat(plot-utils): extend text adder method to allow setting alignment
sanjayankur31 Feb 14, 2023
ca1b316
feat(plotting): add method to generate curtain plots of lists of segm…
sanjayankur31 Feb 14, 2023
a8e30f9
test(curtain-plots): add tests for data overlaid curtain plots
sanjayankur31 Feb 14, 2023
fb93a05
chore: turn off gui in plotting tests
sanjayankur31 Feb 14, 2023
2f0320e
refactor(plotting): move util methods to different module
sanjayankur31 Feb 15, 2023
29ed49c
chore(morph-plot): return logging level to INFO
sanjayankur31 Feb 15, 2023
4c3f444
chore(plot): format with black
sanjayankur31 Feb 15, 2023
8a9d6b1
chore(plotting): change default argument value for consistency
sanjayankur31 Feb 15, 2023
31c38b2
feat(curtain-plots): allow setting title
sanjayankur31 Feb 15, 2023
bbd6baf
feat(curtain-plot): allow setting explicit min and max limits
sanjayankur31 Feb 15, 2023
5875fe9
feat(curtain-plot): improve error text
sanjayankur31 Feb 15, 2023
b7491a8
feat(curtain-plot): complete min/max implementation
sanjayankur31 Feb 15, 2023
29ff2ef
feat(curtain-plots): close plots if not to be shown
sanjayankur31 Feb 16, 2023
917f594
feat(plotting): add explicit option to close `plt` plot
sanjayankur31 Feb 16, 2023
a91a575
fix(plotting): do not close plot by default
sanjayankur31 Feb 16, 2023
c75f032
feat(morph-plot): extend to allow overlaying data on plot
sanjayankur31 Feb 16, 2023
705b58e
test(morph-plot): add test for morph plotter with data overlaid
sanjayankur31 Feb 16, 2023
58655df
refactor(plot): split out point neuron plotting
sanjayankur31 Feb 17, 2023
bd82eee
test(plot): add test for point neuron plotter
sanjayankur31 Feb 17, 2023
465c365
chore(plot-morph): improve documentation
sanjayankur31 Feb 17, 2023
d5ee73f
chore(povray): document method
sanjayankur31 Feb 17, 2023
8d62a77
chore(povray): add module level docstring
sanjayankur31 Feb 17, 2023
92e4788
feat(morph-plot): rename plotly morph plotter
sanjayankur31 Feb 22, 2023
1da6f32
feat(3d-plotting): add initial 3D schematic plotter
sanjayankur31 Feb 23, 2023
16c5d42
refactor(3d-schematic): split out canvas creator into util
sanjayankur31 Feb 23, 2023
572b2be
chore(3d-schematic): pass scene and view instead of canvas
sanjayankur31 Feb 23, 2023
337ef91
feat(3d-schematic): add option to not run app immediately
sanjayankur31 Feb 23, 2023
af4c711
feat(plot-morph): add 3D morphology viewer
sanjayankur31 Feb 23, 2023
278b966
feat(plot-utils): add event handling to vispy scene
sanjayankur31 Feb 23, 2023
f938035
feat(vispy-plot): add initial vispy network plotter
sanjayankur31 Feb 23, 2023
878d246
chore(plots): improve strings and hints
sanjayankur31 Feb 23, 2023
3e22457
feat(test-plots): add initial vispy network plotter
sanjayankur31 Feb 23, 2023
c2db36b
feat: add vispy to deps
sanjayankur31 Feb 23, 2023
5c1d640
Merge branch 'development' into feat/more-morphplots
sanjayankur31 Feb 24, 2023
5ccf0c7
fix(setup.py): add pyqt5 as default backend for vispy
sanjayankur31 Feb 24, 2023
970875b
chore: remove unneeded imports
sanjayankur31 Feb 24, 2023
28ac705
chore: format with black
sanjayankur31 Feb 24, 2023
654aa15
improvement((vispy-canvas)): better align console text
sanjayankur31 Feb 24, 2023
b2a40f9
feat(vispy-canvas): set NeuroML title
sanjayankur31 Feb 24, 2023
eaecbd4
fix(morph-plot): correctly use min_width cli argument
sanjayankur31 Feb 24, 2023
2634680
chore(morph-plot): print cell id, not full cell
sanjayankur31 Feb 24, 2023
1201481
feat(3d-schematic): optimise using constant width and `connect` method
sanjayankur31 Feb 24, 2023
9abedf8
feat(vispy-canvas): add quit event
sanjayankur31 Feb 24, 2023
3a84078
feat(vispy-canvas): document quit keypress
sanjayankur31 Feb 24, 2023
8b37f16
feat(vispy-canvas): better align console text output
sanjayankur31 Feb 24, 2023
c7cb2ba
feat(3d-plots): update title text
sanjayankur31 Feb 24, 2023
0f91a2d
feat(plotting): improve logging/printing
sanjayankur31 Feb 24, 2023
ea5a495
feat(plotting): remove unused method arg
sanjayankur31 Feb 24, 2023
73fb2d3
test(plotting): disable gui
sanjayankur31 Feb 24, 2023
844406b
feat(vispy): change key for quit
sanjayankur31 Feb 24, 2023
5a1a3f5
feat(vispy-canvas): improve camera placement and disable extra cams
sanjayankur31 Feb 24, 2023
6964d15
feat(vispy-canvas): allow not setting min/max view ranges
sanjayankur31 Feb 24, 2023
8574fec
feat(3d-plot): calculate bounding box for view ranges
sanjayankur31 Feb 24, 2023
d1aa0ea
feat(vispy-canvas): do not autoroll
sanjayankur31 Feb 24, 2023
cca38ca
WIP: squash
sanjayankur31 Mar 2, 2023
c09c0ab
fix(vispy-plot): fix spherical plotting
sanjayankur31 Mar 7, 2023
30f4f75
chore: add pyqt5 to reqs
sanjayankur31 Mar 7, 2023
d1d32b1
chore: reset logging level
sanjayankur31 Mar 7, 2023
c3453f5
feat(vispy): set themes
sanjayankur31 Mar 7, 2023
b67b4fe
wip: add labels to vispy
sanjayankur31 Mar 8, 2023
1a9a927
fix(plotting): fix point cell 3d plotting
sanjayankur31 Mar 14, 2023
2a95f22
improvement(plot): tweak default scene range
sanjayankur31 Mar 14, 2023
1e0627f
chore: format with black
sanjayankur31 Mar 14, 2023
bfa2f63
chore: document method
sanjayankur31 Mar 14, 2023
5afbdb7
chore(vispy): make turntable camera default
sanjayankur31 Mar 14, 2023
083939f
improvement(vispy): remove axes from canvas
sanjayankur31 Mar 14, 2023
40ba536
perf(vispy-plotting): use single `Marker` object for all spheres
sanjayankur31 Mar 14, 2023
52760d5
feat(vispy): expose theme setting to all methods
sanjayankur31 Mar 14, 2023
27b8dd0
feat(vispy): implement rotation for Turntable camera
sanjayankur31 Mar 14, 2023
4e71eda
chore: complete comment
sanjayankur31 Mar 14, 2023
9ef580e
chore: format with black
sanjayankur31 Mar 14, 2023
8376d1f
chore: format with black
sanjayankur31 Mar 14, 2023
01234a3
test: mark vispy tests to disable them on GitHub CI
sanjayankur31 Mar 14, 2023
1d1c63d
improvement(3d-plotting): remove edge for spheres
sanjayankur31 Mar 15, 2023
d1c8e42
chore: remove print statement
sanjayankur31 Mar 15, 2023
b16923b
Merge branch 'development' into feat/more-morphplots
sanjayankur31 Apr 18, 2023
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
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:

- name: Run tests
run: |
pytest --cov=pyneuroml -m "not localonly" .
pynml -h

./test-ghactions.sh -neuron
Expand Down
2 changes: 1 addition & 1 deletion pyneuroml/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

__version__ = "0.7.6"
__version__ = "1.0.0"

JNEUROML_VERSION = "0.12.1"

Expand Down
3 changes: 2 additions & 1 deletion pyneuroml/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pyneuroml import pynml
from pyneuroml.lems.LEMSSimulation import LEMSSimulation
from pyneuroml.lems import generate_lems_file_for_neuroml
from pyneuroml.utils.plot import get_next_hex_color
import neuroml as nml
from pyelectro.analysis import max_min
from pyelectro.analysis import mean_spike_frequency
Expand Down Expand Up @@ -240,7 +241,7 @@ def generate_current_vs_frequency_curve(
for i in range(number_cells):
ref = "v_cell%i" % i
quantity = "%s[%i]/v" % (pop.id, i)
ls.add_line_to_display(disp0, ref, quantity, "1mV", pynml.get_next_hex_color())
ls.add_line_to_display(disp0, ref, quantity, "1mV", get_next_hex_color())
ls.add_column_to_output_file(of0, ref, quantity)

lems_file_name = ls.save_to_file()
Expand Down
2 changes: 1 addition & 1 deletion pyneuroml/lems/LEMSSimulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from neuroml import __version__ as libnml_ver
from pyneuroml.pynml import read_neuroml2_file
from pyneuroml.pynml import read_lems_file
from pyneuroml.pynml import get_next_hex_color
from pyneuroml.utils.plot import get_next_hex_color

logger = logging.getLogger(__name__)

Expand Down
3 changes: 2 additions & 1 deletion pyneuroml/lems/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import shutil
import os
import logging
from pyneuroml.pynml import read_neuroml2_file, get_next_hex_color
from pyneuroml.pynml import read_neuroml2_file
from pyneuroml.utils.plot import get_next_hex_color
import random
import neuroml

Expand Down
15 changes: 12 additions & 3 deletions pyneuroml/plot/Plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def generate_plot(
save_figure_to: typing.Optional[str] = None,
title_above_plot: bool = False,
verbose: bool = False,
) -> matplotlib.axes.Axes:
close_plot: bool = False,
) -> typing.Optional[matplotlib.axes.Axes]:
"""Utility function to generate plots using the Matplotlib library.

This function can be used to generate graphs with multiple plot lines.
Expand Down Expand Up @@ -127,7 +128,9 @@ def generate_plot(
:type title_above_plot: boolean
:param verbose: enable/disable verbose logging (default: False)
:type verbose: boolean
:returns: matplotlib.axes.Axes object
:param close_plot: call pyplot.close() to close plot after plotting
:type close_plot: bool
:returns: matplotlib.axes.Axes object if plot is not closed, else None
"""

logger.info("Generating plot: %s" % (title))
Expand Down Expand Up @@ -239,7 +242,13 @@ def generate_plot(
if show_plot_already:
plt.show()

return ax
if close_plot:
logger.info("Closing plot")
plt.close()
else:
return ax

return None


def generate_interactive_plot(
Expand Down
Loading