Last active
August 28, 2016 17:56
-
-
Save ahwillia/1aba6a7a70858c55d967942645abb0d2 to your computer and use it in GitHub Desktop.
Problem I'm having with userplot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What's going wrong with the left subplot?