implement showaxis for pyplot
This commit is contained in:
parent
6d53594850
commit
148ad8032f
@ -1077,6 +1077,24 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
py_set_axis_colors(sp, ax, axis)
|
py_set_axis_colors(sp, ax, axis)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# showaxis
|
||||||
|
if !sp[:xaxis][:showaxis]
|
||||||
|
kw = KW()
|
||||||
|
for dir in (:top, :bottom)
|
||||||
|
ax[:spines][string(dir)][:set_visible](false)
|
||||||
|
kw[dir] = kw[Symbol(:label,dir)] = "off"
|
||||||
|
end
|
||||||
|
ax[:xaxis][:set_tick_params](; which="both", kw...)
|
||||||
|
end
|
||||||
|
if !sp[:yaxis][:showaxis]
|
||||||
|
kw = KW()
|
||||||
|
for dir in (:left, :right)
|
||||||
|
ax[:spines][string(dir)][:set_visible](false)
|
||||||
|
kw[dir] = kw[Symbol(:label,dir)] = "off"
|
||||||
|
end
|
||||||
|
ax[:yaxis][:set_tick_params](; which="both", kw...)
|
||||||
|
end
|
||||||
|
|
||||||
# aspect ratio
|
# aspect ratio
|
||||||
aratio = sp[:aspect_ratio]
|
aratio = sp[:aspect_ratio]
|
||||||
if aratio != :none
|
if aratio != :none
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user