clean up
This commit is contained in:
parent
5a2d39320f
commit
2bbd4cbb17
@ -832,7 +832,7 @@ function preprocessArgs!(d::KW)
|
|||||||
d[:colorbar] = convertLegendValue(d[:colorbar])
|
d[:colorbar] = convertLegendValue(d[:colorbar])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# framestyle
|
||||||
if haskey(d, :framestyle) && haskey(_framestyleAliases, d[:framestyle])
|
if haskey(d, :framestyle) && haskey(_framestyleAliases, d[:framestyle])
|
||||||
d[:framestyle] = _framestyleAliases[d[:framestyle]]
|
d[:framestyle] = _framestyleAliases[d[:framestyle]]
|
||||||
end
|
end
|
||||||
|
|||||||
20
src/axes.jl
20
src/axes.jl
@ -499,14 +499,14 @@ function axis_drawing_info(sp::Subplot)
|
|||||||
|
|
||||||
if !(sp[:framestyle] == :none)
|
if !(sp[:framestyle] == :none)
|
||||||
# xaxis
|
# xaxis
|
||||||
f = scalefunc(yaxis[:scale])
|
|
||||||
invf = invscalefunc(yaxis[:scale])
|
|
||||||
t1 = invf(f(ymin) + 0.015*(f(ymax)-f(ymin)))
|
|
||||||
t2 = invf(f(ymax) - 0.015*(f(ymax)-f(ymin)))
|
|
||||||
|
|
||||||
sp[:framestyle] == :grid || push!(xaxis_segs, (xmin,ymin), (xmax,ymin)) # bottom spine / xaxis
|
sp[:framestyle] == :grid || push!(xaxis_segs, (xmin,ymin), (xmax,ymin)) # bottom spine / xaxis
|
||||||
sp[:framestyle] in (:semi, :box) && push!(xborder_segs, (xmin,ymax), (xmax,ymax)) # top spine
|
sp[:framestyle] in (:semi, :box) && push!(xborder_segs, (xmin,ymax), (xmax,ymax)) # top spine
|
||||||
if !(xaxis[:ticks] in (nothing, false))
|
if !(xaxis[:ticks] in (nothing, false))
|
||||||
|
f = scalefunc(yaxis[:scale])
|
||||||
|
invf = invscalefunc(yaxis[:scale])
|
||||||
|
t1 = invf(f(ymin) + 0.015*(f(ymax)-f(ymin)))
|
||||||
|
t2 = invf(f(ymax) - 0.015*(f(ymax)-f(ymin)))
|
||||||
|
|
||||||
for xtick in xticks[1]
|
for xtick in xticks[1]
|
||||||
push!(xaxis_segs, (xtick, ymin), (xtick, t1)) # bottom tick
|
push!(xaxis_segs, (xtick, ymin), (xtick, t1)) # bottom tick
|
||||||
# sp[:draw_axes_border] && push!(xaxis_segs, (xtick, ymax), (xtick, t2)) # top tick
|
# sp[:draw_axes_border] && push!(xaxis_segs, (xtick, ymax), (xtick, t2)) # top tick
|
||||||
@ -515,14 +515,14 @@ function axis_drawing_info(sp::Subplot)
|
|||||||
end
|
end
|
||||||
|
|
||||||
# yaxis
|
# yaxis
|
||||||
f = scalefunc(xaxis[:scale])
|
|
||||||
invf = invscalefunc(xaxis[:scale])
|
|
||||||
t1 = invf(f(xmin) + 0.015*(f(xmax)-f(xmin)))
|
|
||||||
t2 = invf(f(xmax) - 0.015*(f(xmax)-f(xmin)))
|
|
||||||
|
|
||||||
sp[:framestyle] == :grid || push!(yaxis_segs, (xmin,ymin), (xmin,ymax)) # left spine / yaxis
|
sp[:framestyle] == :grid || push!(yaxis_segs, (xmin,ymin), (xmin,ymax)) # left spine / yaxis
|
||||||
sp[:framestyle] in (:semi, :box) && push!(yborder_segs, (xmax,ymin), (xmax,ymax)) # right spine
|
sp[:framestyle] in (:semi, :box) && push!(yborder_segs, (xmax,ymin), (xmax,ymax)) # right spine
|
||||||
if !(yaxis[:ticks] in (nothing, false))
|
if !(yaxis[:ticks] in (nothing, false))
|
||||||
|
f = scalefunc(xaxis[:scale])
|
||||||
|
invf = invscalefunc(xaxis[:scale])
|
||||||
|
t1 = invf(f(xmin) + 0.015*(f(xmax)-f(xmin)))
|
||||||
|
t2 = invf(f(xmax) - 0.015*(f(xmax)-f(xmin)))
|
||||||
|
|
||||||
for ytick in yticks[1]
|
for ytick in yticks[1]
|
||||||
push!(yaxis_segs, (xmin, ytick), (t1, ytick)) # left tick
|
push!(yaxis_segs, (xmin, ytick), (t1, ytick)) # left tick
|
||||||
# sp[:draw_axes_border] && push!(yaxis_segs, (xmax, ytick), (t2, ytick)) # right tick
|
# sp[:draw_axes_border] && push!(yaxis_segs, (xmax, ytick), (t2, ytick)) # right tick
|
||||||
|
|||||||
@ -1108,17 +1108,6 @@ function _before_layout_calcs(plt::Plot{PyPlotBackend})
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# if !sp[:draw_axes_border]
|
|
||||||
# if ispolar(sp)
|
|
||||||
# for (loc, spine) in ax[:spines]
|
|
||||||
# spine[:set_visible](false)
|
|
||||||
# end
|
|
||||||
# else
|
|
||||||
# # hide the right and top spines
|
|
||||||
# ax[:spines]["right"][:set_visible](false)
|
|
||||||
# ax[:spines]["top"][:set_visible](false)
|
|
||||||
# end
|
|
||||||
# end
|
|
||||||
end
|
end
|
||||||
py_drawfig(fig)
|
py_drawfig(fig)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user