Skip to content

Commit 41b906d

Browse files
committed
Raise error if unknown plot type
1 parent cfddf4f commit 41b906d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎dtw/dtwPlot.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
import numpy
2323

24-
def dtwPlot(x, type, **kwargs):
24+
def dtwPlot(x, type="alignment", **kwargs):
2525
# IMPORT_RDOCSTRING plot.dtw
2626
"""Plotting of dynamic time warp results
2727
@@ -72,6 +72,8 @@ def dtwPlot(x, type, **kwargs):
7272
return dtwPlotThreeWay(x, **kwargs)
7373
elif type == "density":
7474
return dtwPlotDensity(x, **kwargs)
75+
else:
76+
raise ValueError("Unknown plot type: " + type)
7577

7678

7779
def dtwPlotAlignment(d, xlab="Query index", ylab="Reference index", **kwargs):

0 commit comments

Comments
 (0)