Skip to content

Commit

Permalink
counter of x values in PlotLines fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Maetschke committed Nov 2, 2017
1 parent 19b1b43 commit 466b9da
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions nutsml/plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class PlotLines(NutFunction): # pragma no coverage
"""

def __init__(self, ycols,
xcols=itt.count(),
xcols=None,
layout=(1, None),
every_sec=0,
every_n=0,
Expand Down Expand Up @@ -51,11 +51,12 @@ def __init__(self, ycols,
:param int|tuple|None ycols: Index or tuple of indices of the
data columns that contain the y-data for the plot.
If None data is used directly.
:param int|tuple|function|iterable xcols: Index or tuple of indices of
the data columns that contain the x-data for the plot.
:param int|tuple|function|iterable|None xcols: Index or tuple of indices
of the data columns that contain the x-data for the plot.
Alternatively an iterator or a function can be provided that
generates the x-data for the plot, e.g. xcols = itertools.count()
or xcols = lambda: epoch
For xcols==None, itertools.count() will be used.
:param tuple layout: Rows and columns of the plotter layout., e.g.
a layout of (2,3) means that 6 plots in the data are
arranged in 2 rows and 3 columns.
Expand All @@ -71,7 +72,7 @@ def __init__(self, ycols,
:rtype: any
"""
self.ycols = [-1] if ycols is None else as_list(ycols)
self.xcols = xcols
self.xcols = itt.count() if xcols is None else xcols
self.filepath = filepath
self.figsize = figsize
self.cnt = 0
Expand Down

0 comments on commit 466b9da

Please sign in to comment.