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 # handle axis args
for letter in ("x", "y", "z") for letter in ("x", "y", "z")
asym = symbol(letter * "axis") asym = symbol(letter * "axis")
for arg in wraptuple(get(d, asym, ())) for arg in wraptuple(pop!(d, asym, ()))
processAxisArg(d, letter, arg) processAxisArg(d, letter, arg)
end end
delete!(d, asym) # delete!(d, asym)
# turn :labels into :ticks_and_labels # # NOTE: this logic was moved to _add_plotargs...
tsym = symbol(letter * "ticks") # # turn :labels into :ticks_and_labels
if haskey(d, tsym) && ticksType(d[tsym]) == :labels # tsym = symbol(letter * "ticks")
d[tsym] = (1:length(d[tsym]), d[tsym]) # if haskey(d, tsym) && ticksType(d[tsym]) == :labels
end # d[tsym] = (1:length(d[tsym]), d[tsym])
# end
ssym = symbol(letter * "scale") #
if haskey(d, ssym) && haskey(_scaleAliases, d[ssym]) # ssym = symbol(letter * "scale")
d[ssym] = _scaleAliases[d[ssym]] # if haskey(d, ssym) && haskey(_scaleAliases, d[ssym])
end # d[ssym] = _scaleAliases[d[ssym]]
# end
end end
# handle line args # handle line args

View File

@ -86,7 +86,12 @@ function _add_plotargs!(plt::Plot, d::KW)
# handle axis updates from a recipe # handle axis updates from a recipe
for letter in ("x","y","z") for letter in ("x","y","z")
# get the Axis object # 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) # @show 1,typeof(axis)
# update xlabel, xscale, etc # update xlabel, xscale, etc