Better Plotting Capabilities
ahwillia opened this issue · 4 comments
The dtw package in R has some nice ideas for visualizing fits. Would be nice to have similar functionality here:
Toni Giorgino (2009). Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package. Journal of Statistical Software, 31(7), 1-24, doi:10.18637/jss.v031.i07.
less fancy, but also check out the examples for the python dtw
package:
http://nbviewer.jupyter.org/github/pierre-rouanet/dtw/blob/master/simple%20example.ipynb
Seems like as long as we can plot a 2D matrix with imshow
or equivalent (heatmap
in PlotlyJS.jl works pretty well for this sort of thing), and overlay the path with x and y coords, it should be pretty useful.
I have something basic working. I think it would be cool to get some error bars around the path through the matrix to get a sense of how much slack there is in the fit. @ssfrr - do you know of any simple way to do this?
I think it is cleaner if this package only implements computations related to dynamic time warping. I started another repo here to hold the plot recipes: https://github.com/ahwillia/TimeSeriesPlots.jl
I changed my mind. I'm going to organize the plots like this:
module TimeWarp
# ... dtw fitting code here
module WarpPlots
using Reexport
@reexport using Plots
# ... plotting recipes here
end
end
So that users can do:
using TimeWarp
using TimeWarp.WarpPlots
dtwplot(randn(10,1), randn(10,1))
To produce the plot above. This also allows users to change the Plots backend and not deal with plots unless they explicitly import them.