Merge pull request #1254 from daschw/axes-limits

expand axes extrema for heatmap edges
This commit is contained in:
Daniel Schwabeneder 2017-11-20 08:40:01 +01:00 committed by GitHub
commit ad34863bd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -380,6 +380,15 @@ function expand_extrema!(sp::Subplot, d::KW)
expand_extrema!(axis, ignorenan_minimum(data) - 0.5minimum(bw)) expand_extrema!(axis, ignorenan_minimum(data) - 0.5minimum(bw))
end end
# expand for heatmaps
if d[:seriestype] == :heatmap
for letter in (:x, :y)
data = d[letter]
axis = sp[Symbol(letter, "axis")]
scale = get(d, Symbol(letter, "scale"), :identity)
expand_extrema!(axis, heatmap_edges(data, scale))
end
end
end end
function expand_extrema!(sp::Subplot, xmin, xmax, ymin, ymax) function expand_extrema!(sp::Subplot, xmin, xmax, ymin, ymax)