some forgotten extrema -> _extrema

This commit is contained in:
Michael K. Borregaard 2017-05-30 16:55:30 +02:00
parent 59afc30219
commit ad722e601f
4 changed files with 4 additions and 4 deletions

View File

@ -482,7 +482,7 @@ function hover(to_hover, to_display, window)
end end
function extract_extrema(d, kw_args) function extract_extrema(d, kw_args)
xmin, xmax = extrema(d[:x]); ymin, ymax = _extrema(d[:y]) xmin, xmax = _extrema(d[:x]); ymin, ymax = _extrema(d[:y])
kw_args[:primitive] = GeometryTypes.SimpleRectangle{Float32}(xmin, ymin, xmax-xmin, ymax-ymin) kw_args[:primitive] = GeometryTypes.SimpleRectangle{Float32}(xmin, ymin, xmax-xmin, ymax-ymin)
nothing nothing
end end

View File

@ -704,7 +704,7 @@ function link_axes!(axes::Axis...)
a1 = axes[1] a1 = axes[1]
for i=2:length(axes) for i=2:length(axes)
a2 = axes[i] a2 = axes[i]
expand_extrema!(a1, extrema(a2)) expand_extrema!(a1, _extrema(a2))
for k in (:extrema, :discrete_values, :continuous_values, :discrete_map) for k in (:extrema, :discrete_values, :continuous_values, :discrete_map)
a2[k] = a1[k] a2[k] = a1[k]
end end

View File

@ -366,7 +366,7 @@ end
end end
# widen limits out a bit # widen limits out a bit
expand_extrema!(axis, widen(extrema(xseg.pts)...)) expand_extrema!(axis, widen(_extrema(xseg.pts)...))
# switch back # switch back
if !isvertical(d) if !isvertical(d)

View File

@ -83,7 +83,7 @@ facts("Axes") do
Plots.discrete_value!(axis, ["x$i" for i=1:5]) Plots.discrete_value!(axis, ["x$i" for i=1:5])
Plots.discrete_value!(axis, ["x$i" for i=0:2]) Plots.discrete_value!(axis, ["x$i" for i=0:2])
@fact Plots.extrema(axis) --> (0.5, 7.5) @fact Plots._extrema(axis) --> (0.5, 7.5)
end end