diff --git a/src/backends/pyplot.jl b/src/backends/pyplot.jl index 72cc0ebd..62a0b394 100644 --- a/src/backends/pyplot.jl +++ b/src/backends/pyplot.jl @@ -1099,17 +1099,17 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend}) ax[:spines]["top"][:set_alpha](intensity) ax[:spines]["right"][:set_linewidth](intensity) ax[:spines]["top"][:set_linewidth](intensity) - elseif sp[:framestyle] in (:axes, :origin) + elseif sp[:framestyle] == :axes ax[:spines]["right"][:set_visible](false) ax[:spines]["top"][:set_visible](false) - if sp[:framestyle] == :origin - ax[:spines]["left"][:set_position]("zero") - ax[:spines]["bottom"][:set_position]("zero") - end - elseif sp[:framestyle] in (:grid, :none) + elseif sp[:framestyle] in (:grid, :none, :origin) for (loc, spine) in ax[:spines] spine[:set_visible](false) end + if sp[:framestyle] == :origin + ax[:axhline](y = 0, color= py_color(sp[:xaxis][:foreground_color_axis]), lw = 0.5) + ax[:axvline](x = 0, color= py_color(sp[:yaxis][:foreground_color_axis]), lw = 0.5) + end end end end