diff --git a/.gitignore b/.gitignore index e1fa28e8..c8329ab7 100644 --- a/.gitignore +++ b/.gitignore @@ -151,5 +151,7 @@ examples/results/*.dat /tests/iv_izh2007RS0.net.nml /tests/leak_chan.channel.nml /tests/test_cell_analysis.cell.nml - +arm64 *.neux +/test_*plot*png +/examples/plot.py diff --git a/pyneuroml/plot/Plot.py b/pyneuroml/plot/Plot.py index 0e84a88f..9387aa6a 100644 --- a/pyneuroml/plot/Plot.py +++ b/pyneuroml/plot/Plot.py @@ -177,15 +177,14 @@ def generate_plot( label = "" if not labels else labels[i] marker = None if not markers else markers[i] linewidth = 1 if not linewidths else linewidths[i] - markersize = 6 if not markersizes else markersizes[i] + markersize = None if not markersizes else markersizes[i] if colors: plt.plot( xvalues[i], yvalues[i], - "o", - color=colors[i], marker=marker, + color=colors[i], markersize=markersize, linestyle=linestyle, linewidth=linewidth, @@ -195,7 +194,6 @@ def generate_plot( plt.plot( xvalues[i], yvalues[i], - "o", marker=marker, markersize=markersize, linestyle=linestyle, @@ -385,7 +383,7 @@ def generate_interactive_plot( raise ValueError("labels not provided correctly") if not markersizes: - markersizes = len(xvalues) * [6.0] + markersizes = len(xvalues) * [6] if not markers: markers = len(xvalues) * [0] if not linestyles: diff --git a/pyneuroml/plot/PlotSpikes.py b/pyneuroml/plot/PlotSpikes.py index 0534773a..647fa9c7 100644 --- a/pyneuroml/plot/PlotSpikes.py +++ b/pyneuroml/plot/PlotSpikes.py @@ -12,9 +12,13 @@ logger = logging.getLogger(__name__) +FORMAT_ID_T = "id_t" +FORMAT_ID_TIME_NEST_DAT = "id_t_nest_dat" +FORMAT_T_ID = "t_id" + DEFAULTS = { - "format": "id_t", + "format": FORMAT_ID_T, "rates": False, "save_spike_plot_to": None, "rate_window": 50, @@ -74,8 +78,9 @@ def process_args(): metavar="", default=DEFAULTS["format"], help="How the spiketimes are represented on each line of file: \n" - + "id_t: id of cell, space(s) / tab(s), time of spike (default);\n" - + "t_id: time of spike, space(s) / tab(s), id of cell;\n" + + "%s: id of cell, space(s) / tab(s), time of spike (default);\n"%FORMAT_ID_T + + "%s: id of cell, space(s) / tab(s), time of spike, allowing NEST dat file comments/metadata;\n"%FORMAT_ID_TIME_NEST_DAT + + "%s: time of spike, space(s) / tab(s), id of cell;\n"%FORMAT_T_ID + "sonata: SONATA format HDF5 file containing spike times", ) @@ -288,10 +293,10 @@ def run(a=None, **kwargs): ids_in_file[name] = [] for line in spikes_file: - if not line.startswith("#"): - if a.format == "id_t": + if not line.startswith("#") and not (line.startswith("sender") and a.format == FORMAT_ID_TIME_NEST_DAT): + if a.format == FORMAT_ID_T or a.format == FORMAT_ID_TIME_NEST_DAT: [id, t] = line.split() - elif a.format == "t_id": + elif a.format == FORMAT_T_ID: [t, id] = line.split() id_shifted = offset_id + int(float(id)) max_id = max(max_id, id_shifted) diff --git a/setup.py b/setup.py index 7b665516..f5ced29f 100644 --- a/setup.py +++ b/setup.py @@ -92,7 +92,6 @@ long_description=open("README.md").read(), long_description_content_type="text/markdown", install_requires=[ - "argparse", "pylems>=0.5.7", "airspeed>=0.5.5", "neuromllite>=0.4.1", # sets dependency for libNeuroML also diff --git a/test-ghactions.sh b/test-ghactions.sh index ba9ba148..7fea64ab 100755 --- a/test-ghactions.sh +++ b/test-ghactions.sh @@ -1,6 +1,6 @@ set -e -python setup.py install +pip install . echo echo "################################################"