Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

plotRaster() issue

40 views
Skip to first unread message

Reza

unread,
May 30, 2024, 5:03:42 AM5/30/24
to NetPyNE Q&A forum
Hello all,
Hope you're doing well. 

I have an issue here with Tutorial 7 (and also previous tutorials) and cannot have the raster plot, as you can see below. 
[
There was an exception in plotRaster()
Plotting recorded cell traces ... cell
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/netpyne/analysis/utils.py", line 87, in wrapper 
     return function(*args, **kwargs) 
  File "/usr/local/lib/python3.10/dist-packages/netpyne/plotting/plotRaster.py", line 395, in plotRaster
     rasterPlotter.axis.vlines(spkTimes, 0, len(cellInds), 'red', linewidth=0.1)
NameError: name 'cellInds' is not defined
]
I have also tried to have latest "plotRaster.py" file from Git, and install it using the following code, but wasn't successful (multiple errors).
"pip install -e /content/plotRaster.py"

I had to use sim.analysis.plotRaster() to see the plot but it has no syncLines and other information that should be above the raster plot are missed.download.png

It would be great if anyone could help me with this issue. 
Thank you so much. 

Reza

Reza

unread,
Jun 11, 2024, 6:14:11 AM6/11/24
to NetPyNE Q&A forum
Hello guys!
I appreciate Valery for helping me to solve this issue but I still have the same problem and cannot plot the Raster plot.

and when I use sim.analysis.plotRaster() code to plot the raster plot, it cannot show the plot properly (Cannot show the cells=... syns/cell=... rate=...Hz sync=... above the Raster plot) and it has no syncLines.

Could anyone help me with this issue?Rasterplot Error.png 

Thank you so much. 

Reza

----------
Here is the code: 

...
-------------------------------------------------
%cd netpyne
...
-------------------------------------------------
!git checkout development
...
-------------------------------------------------
!git pull
...
-------------------------------------------------
!pip install -e .
...
Attempting uninstall: netpyne Found existing installation: netpyne 1.0.6 Uninstalling netpyne-1.0.6: Successfully uninstalled netpyne-1.0.6 Running setup.py develop for netpyne Successfully installed netpyne-1.0.6
-------------------------------------------------
!pip install -e /content/netpyne/
...
Installing collected packages: netpyne Attempting uninstall: netpyne Found existing installation: netpyne 1.0.6 Uninstalling netpyne-1.0.6: Successfully uninstalled netpyne-1.0.6 Running setup.py develop for netpyne Successfully installed netpyne-1.0.6
-------------------------------------------------
import netpyne
print(netpyne.__file__)
/usr/local/lib/python3.10/dist-packages/netpyne/__init__.py



-----------------------------------------------------------------------------
pip show netpyne

Name: netpyne Version: 1.0.6 Summary: A Python package to develop, simulate and analyse biological neuronal networks in NEURON. Home-page: https://github.com/Neurosim-lab/netpyne Author: Salvador Dura-Bernal (Neurosim lab) Author-email: salvad...@gmail.com License: MIT Location: /content/netpyne Editable project location: /content/netpyne Requires: bokeh, future, lfpykit, matplotlib, matplotlib-scalebar, numpy, pandas, schema, scipy, tqdm Required-by:

-------------------------------------------------
!pip uninstall netpyne

Found existing installation: netpyne 1.0.6 Uninstalling netpyne-1.0.6: Would remove: /usr/local/lib/python3.10/dist-packages/netpyne.egg-link Proceed (Y/n)? Y Successfully uninstalled netpyne-1.0.6

-------------------------------------------------
!pip install -e .
...
Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->netpyne==1.0.6) (1.16.0) Installing collected packages: netpyne Running setup.py develop for netpyne Successfully installed netpyne-1.0.6

-------------------------------------------------
!pip show netpyne
Name: netpyne Version: 1.0.6 Summary: A Python package to develop, simulate and analyse biological neuronal networks in NEURON. Home-page: https://github.com/Neurosim-lab/netpyne Author: Salvador Dura-Bernal (Neurosim lab) Author-email: salvad...@gmail.com License: MIT Location: /content/netpyne Editable project location: /content/netpyne Requires: bokeh, future, lfpykit, matplotlib, matplotlib-scalebar, numpy, pandas, schema, scipy, tqdm Required-by:

-------------------------------------------------
import netpyne
print(netpyne.__file__)
/usr/local/lib/python3.10/dist-packages/netpyne/__init__.py

Reza

unread,
Jun 11, 2024, 11:27:17 AM6/11/24
to NetPyNE Q&A forum
Solved!
Just remove the "!pip install netpyne" and clone netpyne from github from scratch.
Thank you Valery.
Reply all
Reply to author
Forward
0 new messages