Skip to content

Instantly share code, notes, and snippets.

@ahwillia
Last active August 28, 2016 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahwillia/1aba6a7a70858c55d967942645abb0d2 to your computer and use it in GitHub Desktop.
Save ahwillia/1aba6a7a70858c55d967942645abb0d2 to your computer and use it in GitHub Desktop.
Problem I'm having with userplot
@userplot DTWPlot
@recipe function f(h::DTWPlot)
seq1, seq2 = h.args
i1,i2 = collect(1:length(seq1)),collect(1:length(seq2))
# set up the subplots
seriestype := :line
legend --> false
link := :both
grid --> false
layout --> @layout [
leftplot lineplot{0.9w,0.9h}
_ rightplot
]
# main plot
@series begin
right_margin --> 0mm
top_margin --> 0mm
subplot := 2
i1, i2
end
# left line plot
@series begin
subplot := 1
bottom_margin --> 0mm
seq2, i2
end
# bottom line plot
@series begin
subplot := 3
left_margin --> 0mm
i1, seq1
end
end
@ahwillia
Copy link
Author

What's going wrong with the left subplot?

screen shot 2016-08-28 at 10 52 45 am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment