Add option field for data to compute extent

This commit is contained in:
Gustavo Goretkin 2017-12-15 13:41:14 -05:00
parent 4bb43887a4
commit 41c5dbcf23
2 changed files with 10 additions and 2 deletions

View File

@ -371,6 +371,9 @@ const _suppress_warnings = Set{Symbol}([
:x_discrete_indices, :x_discrete_indices,
:y_discrete_indices, :y_discrete_indices,
:z_discrete_indices, :z_discrete_indices,
:x_extent_data,
:y_extent_data,
:z_extent_data,
:subplot, :subplot,
:subplot_index, :subplot_index,
:series_plotindex, :series_plotindex,

View File

@ -318,11 +318,16 @@ function expand_extrema!(sp::Subplot, d::KW)
# first expand for the data # first expand for the data
for letter in (:x, :y, :z) for letter in (:x, :y, :z)
data = d[if vert letter_ = if vert
letter letter
else else
letter == :x ? :y : letter == :y ? :x : :z letter == :x ? :y : letter == :y ? :x : :z
end] end
extent_key = Symbol(letter_, :_extent_data)
# if there is extent_key, use it for calculating limits.
data = get(d, extent_key, d[letter_])
axis = sp[Symbol(letter, "axis")] axis = sp[Symbol(letter, "axis")]
if isa(data, Volume) if isa(data, Volume)