working on Axis

This commit is contained in:
Thomas Breloff 2016-05-14 00:10:58 -04:00
parent 290b17a5f9
commit 87a967ad9c
2 changed files with 19 additions and 13 deletions

View File

@ -566,21 +566,22 @@ function preprocessArgs!(d::KW)
# handle axis args
for letter in ("x", "y", "z")
asym = symbol(letter * "axis")
for arg in wraptuple(get(d, asym, ()))
for arg in wraptuple(pop!(d, asym, ()))
processAxisArg(d, letter, arg)
end
delete!(d, asym)
# delete!(d, asym)
# turn :labels into :ticks_and_labels
tsym = symbol(letter * "ticks")
if haskey(d, tsym) && ticksType(d[tsym]) == :labels
d[tsym] = (1:length(d[tsym]), d[tsym])
end
ssym = symbol(letter * "scale")
if haskey(d, ssym) && haskey(_scaleAliases, d[ssym])
d[ssym] = _scaleAliases[d[ssym]]
end
# # NOTE: this logic was moved to _add_plotargs...
# # turn :labels into :ticks_and_labels
# tsym = symbol(letter * "ticks")
# if haskey(d, tsym) && ticksType(d[tsym]) == :labels
# d[tsym] = (1:length(d[tsym]), d[tsym])
# end
#
# ssym = symbol(letter * "scale")
# if haskey(d, ssym) && haskey(_scaleAliases, d[ssym])
# d[ssym] = _scaleAliases[d[ssym]]
# end
end
# handle line args

View File

@ -86,7 +86,12 @@ function _add_plotargs!(plt::Plot, d::KW)
# handle axis updates from a recipe
for letter in ("x","y","z")
# get the Axis object
axis = plt.plotargs[symbol(letter * "axis")]
asym = symbol(letter * "axis")
axis = plt.plotargs[asym]
if axis == nothing
# create a new one on first pass
axis = Axis(letter)
end
# @show 1,typeof(axis)
# update xlabel, xscale, etc