Merge pull request #1274 from daschw/pyplot-framestyle_grid

PyPlot: set tick marks color to match grid color for framestyle = :grid
This commit is contained in:
Daniel Schwabeneder 2017-12-02 10:16:08 +01:00 committed by GitHub
commit 863ec08681
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -924,7 +924,7 @@ function py_set_axis_colors(sp, ax, a::Axis)
end
axissym = Symbol(a[:letter], :axis)
if haskey(ax, axissym)
tickcolor = sp[:framestyle] == :zerolines ? py_color(plot_color(a[:foreground_color_grid], a[:gridalpha])) : py_color(a[:foreground_color_axis])
tickcolor = sp[:framestyle] in (:zerolines, :grid) ? py_color(plot_color(a[:foreground_color_grid], a[:gridalpha])) : py_color(a[:foreground_color_axis])
ax[:tick_params](axis=string(a[:letter]), which="both",
colors=tickcolor,
labelcolor=py_color(a[:tickfontcolor]))