From 87a967ad9cf8d3b953b98bc907933247e8641629 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Sat, 14 May 2016 00:10:58 -0400 Subject: [PATCH] working on Axis --- src/args.jl | 25 +++++++++++++------------ src/plot.jl | 7 ++++++- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/args.jl b/src/args.jl index b84edd94..2372a2ea 100644 --- a/src/args.jl +++ b/src/args.jl @@ -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 diff --git a/src/plot.jl b/src/plot.jl index 5628d4c3..8b77a3f6 100644 --- a/src/plot.jl +++ b/src/plot.jl @@ -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