netpyne.plotting.plotTimeSeries

Functions:

plotLFPTimeSeries([LFPData, axis, ...])

Function to produce a line plot of LFP electrode signals

plotCSDTimeSeries([CSDData, axis, ...])

"

plotTimeSeries(data[, label, title, yLabel, ...])

Function to produce a line plot of electrode signals (currently, LFP or CSD)

netpyne.plotting.plotTimeSeries.plotLFPTimeSeries(LFPData=None, axis=None, timeRange=None, electrodes=['avg', 'all'], pop=None, separation=1.0, normSignal=False, filtFreq=False, filtOrder=3, detrend=False, orderInverse=True, overlay=False, scalebar=True, legend=True, colorList=None, returnPlotter=False, **kwargs)[source]

Function to produce a line plot of LFP electrode signals

Parameters:
  • LFPData (dict, str) –

    The data necessary to plot the LFP signals.

    Default: None uses analysis.prepareLFP to produce LFPData using the current NetPyNE sim object.

    If a str it must represent a file path to previously saved data.

  • axis (matplotlib axis) –

    The axis to plot into, allowing overlaying of plots.

    Default: None produces a new figure and axis.

  • timeRange (list) –

    Time range to include in the raster: [min, max].

    Default: None uses the entire simulation

  • electrodes (list) –

    A list of the electrodes to plot from.

    Default: ['avg', 'all'] plots each electrode as well as their average

  • pop (str) –

    A population name to calculate signals from.

    Default: None uses all populations.

  • separation (float) –

    Use to increase or decrease distance between signals on the plot.

    Default: 1.0

  • normSignal (bool) –

    Whether to normalize the data.

    Default: False

  • filtFreq (int or list) –

    Frequency for low-pass filter (int) or frequencies for bandpass filter in a list: [low, high]

    Default: None does not filter the data

  • filtOrder (int) –

    Order of the filter defined by filtFreq.

    Default: 3

  • detrend (bool) –

    Whether to detrend the data.

    Default: False

  • orderInverse (bool) –

    Whether to invert the order of plotting.

    Default: True

  • overlay (bool) –

    Option to label signals with a color-matched overlay.

    Default: False

  • scalebar (bool) –

    Whether to to add a scalebar to the plot.

    Default: True

  • legend (bool) –

    Whether or not to add a legend to the plot.

    Default: True adds a legend.

  • colorList (list) –

    A list of colors to draw from when plotting.

    Default: None uses the default NetPyNE colorList.

  • returnPlotter (bool) –

    Whether to return the figure or the NetPyNE MetaFig object.

    Default: False returns the figure.

Plot Options:
  • showFig (bool) – Whether to show the figure.

    Default: False

  • saveFig (bool) – Whether to save the figure.

    Default: False

  • overwrite (bool) – whether to overwrite existing figure files.

    Default: True overwrites the figure file

    Options: False adds a number to the file name to prevent overwriting

  • legendKwargs (dict) – a dict containing any or all legend kwargs. These include 'title', 'loc', 'fontsize', 'bbox_to_anchor', 'borderaxespad', and 'handlelength'.

  • rcParams (dict) – a dict containing any or all matplotlib rcParams. To see all options, execute import matplotlib; print(matplotlib.rcParams) in Python. Any options in this dict will be used for this current figure and then returned to their prior settings.

  • title (str) – the axis title

  • xlabel (str) – label for x-axis

  • ylabel (str) – label for y-axis

  • linewidth (int) – line width

  • alpha (float) – line opacity (0-1)

Returns:

LFPTimeSeriesPlot – By default, returns the figure. If returnPlotter is True, instead returns the NetPyNE MetaFig.

Return type:

matplotlib figure

netpyne.plotting.plotTimeSeries.plotCSDTimeSeries(CSDData=None, axis=None, timeRange=None, electrodes=['avg', 'all'], pop=None, separation=1.0, orderInverse=True, overlay=False, scalebar=True, legend=True, colorList=None, returnPlotter=False, **kwargs)[source]

Parameters:
  • CSDData (dict, str) –

    The data necessary to plot the CSD signals.

    Default: None uses analysis.prepareCSD to produce CSDData using the current NetPyNE sim object.

    If a str it must represent a file path to previously saved data.

  • axis (matplotlib axis) –

    The axis to plot into, allowing overlaying of plots.

    Default: None produces a new figure and axis.

  • timeRange (list) –

    Time range to include in the raster: [min, max].

    Default: None uses the entire simulation

  • electrodes (list) –

    A list of the electrodes to plot from.

    Default: ['avg', 'all'] plots each electrode as well as their average

  • pop (str) –

    A population name to calculate signals from.

    Default: None uses all populations.

  • separation (float) –

    Use to increase or decrease distance between signals on the plot.

    Default: 1.0

  • orderInverse (bool) –

    Whether to invert the order of plotting.

    Default: True

  • overlay (bool) –

    Option to label signals with a color-matched overlay.

    Default: False

  • scalebar (bool) –

    Whether to to add a scalebar to the plot.

    Default: True

  • legend (bool) –

    Whether or not to add a legend to the plot.

    Default: True adds a legend.

  • colorList (list) –

    A list of colors to draw from when plotting.

    Default: None uses the default NetPyNE colorList.

  • returnPlotter (bool) –

    Whether to return the figure or the NetPyNE MetaFig object.

    Default: False returns the figure.

Plot Options:
  • showFig (bool) – Whether to show the figure.

    Default: False

  • saveFig (bool) – Whether to save the figure.

    Default: False

  • overwrite (bool) – whether to overwrite existing figure files.

    Default: True overwrites the figure file

    Options: False adds a number to the file name to prevent overwriting

  • legendKwargs (dict) – a dict containing any or all legend kwargs. These include 'title', 'loc', 'fontsize', 'bbox_to_anchor', 'borderaxespad', and 'handlelength'.

  • rcParams (dict) – a dict containing any or all matplotlib rcParams. To see all options, execute import matplotlib; print(matplotlib.rcParams) in Python. Any options in this dict will be used for this current figure and then returned to their prior settings.

  • title (str) – the axis title

  • xlabel (str) – label for x-axis

  • ylabel (str) – label for y-axis

  • linewidth (int) – line width

  • alpha (float) – line opacity (0-1)

Returns:

LFPTimeSeriesPlot – By default, returns the figure. If returnPlotter is True, instead returns the NetPyNE MetaFig.

Return type:

matplotlib figure

netpyne.plotting.plotTimeSeries.plotTimeSeries(data, label='TimeSeries', title='Time Series Plot', yLabel=None, axis=None, pop=None, separation=1.0, orderInverse=True, overlay=False, scalebar=True, legend=True, colorList=None, returnPlotter=False, **kwargs)[source]

Function to produce a line plot of electrode signals (currently, LFP or CSD)

Parameters:
  • data (dict, str) – The data necessary to plot the signals.

  • axis (matplotlib axis) –

    The axis to plot into, allowing overlaying of plots.

    Default: None produces a new figure and axis.

  • pop (str) –

    A population name to calculate signals from.

    Default: None uses all populations.

  • separation (float) –

    Use to increase or decrease distance between signals on the plot.

    Default: 1.0

  • orderInverse (bool) –

    Whether to invert the order of plotting.

    Default: True

  • overlay (bool) –

    Option to label signals with a color-matched overlay.

    Default: False

  • scalebar (bool) –

    Whether to to add a scalebar to the plot.

    Default: True

  • legend (bool) –

    Whether or not to add a legend to the plot.

    Default: True adds a legend.

  • colorList (list) –

    A list of colors to draw from when plotting.

    Default: None uses the default NetPyNE colorList.

  • returnPlotter (bool) –

    Whether to return the figure or the NetPyNE MetaFig object.

    Default: False returns the figure.

Plot Options:
  • showFig (bool) – Whether to show the figure.

    Default: False

  • saveFig (bool) – Whether to save the figure.

    Default: False

  • overwrite (bool) – whether to overwrite existing figure files.

    Default: True overwrites the figure file

    Options: False adds a number to the file name to prevent overwriting

  • legendKwargs (dict) – a dict containing any or all legend kwargs. These include 'title', 'loc', 'fontsize', 'bbox_to_anchor', 'borderaxespad', and 'handlelength'.

  • rcParams (dict) – a dict containing any or all matplotlib rcParams. To see all options, execute import matplotlib; print(matplotlib.rcParams) in Python. Any options in this dict will be used for this current figure and then returned to their prior settings.

  • title (str) – the axis title

  • xlabel (str) – label for x-axis

  • ylabel (str) – label for y-axis

  • linewidth (int) – line width

  • alpha (float) – line opacity (0-1)

Returns:

time series plot – By default, returns the figure. If returnPlotter is True, instead returns the NetPyNE MetaFig.

Return type:

matplotlib figure