add subplot

This commit is contained in:
Simon Christ 2020-01-28 22:10:43 +01:00
parent d231618769
commit fc4683c1ea

View File

@ -904,14 +904,26 @@ end
@recipe function f(::Type{Val{:lens}}, plt::AbstractPlot) @recipe function f(::Type{Val{:lens}}, plt::AbstractPlot)
# TODO: validate input # TODO: validate input
@show plt.series_list[end][:seriestype] @show plt.series_list[end][:seriestype]
@show plotattributes[:inset_subplots]
@show plotattributes @show plotattributes
x1, x2 = plotattributes[:x] x1, x2 = plotattributes[:x]
y1, y2 = plotattributes[:y] y1, y2 = plotattributes[:y]
# TODO: add subplot # TODO: add subplot
for series in plt.series_list
@series begin
plotattributes = copy(series.plotattributes)
subplot := 2
label := ""
xlims := (x1, x2)
ylims := (y1, y2)
()
end
end
# TODO: add lines # TODO: add lines
seriestype := :path seriestype := :path
label := "" label := ""
linecolor := :lightgray linecolor := :lightgray
subplot := 1
@series begin @series begin
plotattributes[:x] = [x2, 4] plotattributes[:x] = [x2, 4]
plotattributes[:y] = [y2, 10] plotattributes[:y] = [y2, 10]