Merge e83c6e66b03be627557c2c53aaef628ea5f9b805 into d8da3c60d980ebb341b2fba77fb3994aa64fe82e
This commit is contained in:
commit
100e49343b
@ -69,6 +69,7 @@ export
|
|||||||
default,
|
default,
|
||||||
with,
|
with,
|
||||||
twinx,
|
twinx,
|
||||||
|
twiny,
|
||||||
|
|
||||||
pie,
|
pie,
|
||||||
pie!,
|
pie!,
|
||||||
|
|||||||
@ -681,3 +681,16 @@ function twinx(sp::Subplot)
|
|||||||
end
|
end
|
||||||
|
|
||||||
twinx(plt::Plot = current()) = twinx(plt[1])
|
twinx(plt::Plot = current()) = twinx(plt[1])
|
||||||
|
|
||||||
|
function twiny(sp::Subplot)
|
||||||
|
sp[:top_margin] = max(sp[:top_margin], 20px)
|
||||||
|
plot!(sp.plt, inset = (sp[:subplot_index], bbox(0,0,1,1)))
|
||||||
|
twinsp = sp.plt.subplots[end]
|
||||||
|
twinsp[:xaxis][:mirror] = true
|
||||||
|
twinsp[:background_color_inside] = Plots.RGBA{Float64}(0,0,0,0)
|
||||||
|
link_axes!(sp[:yaxis], twinsp[:yaxis])
|
||||||
|
twinsp
|
||||||
|
end
|
||||||
|
|
||||||
|
twiny(plt::Plot = current()) = twiny(plt[1])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user