create recipe, add box and line
This commit is contained in:
parent
25c53f0e52
commit
d231618769
@ -899,6 +899,30 @@ end
|
||||
# note: don't add dependencies because this really isn't a drop-in replacement
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# lens! - magnify a region of a plot
|
||||
@recipe function f(::Type{Val{:lens}}, plt::AbstractPlot)
|
||||
# TODO: validate input
|
||||
@show plt.series_list[end][:seriestype]
|
||||
@show plotattributes
|
||||
x1, x2 = plotattributes[:x]
|
||||
y1, y2 = plotattributes[:y]
|
||||
# TODO: add subplot
|
||||
# TODO: add lines
|
||||
seriestype := :path
|
||||
label := ""
|
||||
linecolor := :lightgray
|
||||
@series begin
|
||||
plotattributes[:x] = [x2, 4]
|
||||
plotattributes[:y] = [y2, 10]
|
||||
()
|
||||
end
|
||||
# add magnification shape
|
||||
# seriestype := plt.series_list[end][:seriestype]
|
||||
plotattributes[:x] = [x1, x1, x2, x2, x1]
|
||||
plotattributes[:y] = [y1, y2, y2, y1, y1]
|
||||
()
|
||||
end
|
||||
# ---------------------------------------------------------------------------
|
||||
# contourf - filled contours
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user