Skip to content

Commit

Permalink
Updated tests to include plotting multiple objects
Browse files Browse the repository at this point in the history
  • Loading branch information
AirMicrodot committed May 15, 2019
1 parent ff06310 commit b011b24
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion diagnostics/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
def plot(*args, **kwargs):

fig = kwargs.pop("figure", plt.figure())
align_x = kwargs.pop("align_x", False)
align_x = kwargs.pop("align", kwargs.pop("align_x", False))
as_dt = kwargs.get("as_dt", False)
cmap = kwargs.get("cmap", plt.get_cmap("tab10"))

Expand Down
9 changes: 9 additions & 0 deletions tests/test_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,15 @@ def test_statechangearray_plot():
return True


def test_multiple_plots():
plt.ioff()
a = StateChangeArray([0, 1, 0, 1, 0], t=[0, 5, 10, 20, 30], name="a").to_bool()
b = StateChangeArray([0, 1, 0, 1, 0], t=[0, 2, 5, 7, 15], name="b").to_bool()
c = TimeSerie(np.linspace(0, 10, 100), t0=0, fs=10, name="c")
a.plot(b, c, align_x=True)
return True


def test_statechangearray_toevents():
a = StateChangeArray([1, 3, 5, 7], t=[1, 2, 4, 8], name="a")
e1, e2, e3, e4 = a.to_events()
Expand Down

0 comments on commit b011b24

Please sign in to comment.