Merge pull request #3388 from RPigott/spines
Fix PyPlot spines iteration
This commit is contained in:
commit
9581a7cc49
@ -841,10 +841,20 @@ function py_set_scale(ax, sp::Subplot, axis::Axis)
|
|||||||
py_set_scale(ax, sp, scale, letter)
|
py_set_scale(ax, sp, scale, letter)
|
||||||
end
|
end
|
||||||
|
|
||||||
function py_set_axis_colors(sp, ax, a::Axis)
|
function py_set_spine_color(spines, color)
|
||||||
for (loc, spine) in ax.spines
|
for loc in spines
|
||||||
spine."set_color"(py_color(a[:foreground_color_border]))
|
spines[loc]."set_color"(color)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function py_set_spine_color(spines::Dict, color)
|
||||||
|
for (loc, spine) in spines
|
||||||
|
spine."set_color"(color)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function py_set_axis_colors(sp, ax, a::Axis)
|
||||||
|
py_set_spine_color(ax.spines, py_color(a[:foreground_color_border]))
|
||||||
axissym = Symbol(a[:letter], :axis)
|
axissym = Symbol(a[:letter], :axis)
|
||||||
if PyPlot.PyCall.hasproperty(ax, axissym)
|
if PyPlot.PyCall.hasproperty(ax, axissym)
|
||||||
tickcolor = sp[:framestyle] in (:zerolines, :grid) ? 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])
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user