AlgebraOfGraphics.jl icon indicating copy to clipboard operation
AlgebraOfGraphics.jl copied to clipboard

scales as keywords to the plot

Open mkborregaard opened this issue 4 years ago • 0 comments

The syntax in AOG seems to be (I might be wrong here) that things that vary according to data go in mapping whereas things that you specify explicitly (fillcolor etc) go in visual. But scales behave differently. It seems like an inconsistency of the syntax to have to use

plt = data(allison) * 
        mapping(:BodyWt, :Gestation)
draw(plt, axis = (xscale = log10,))

rather than the (to me) more intuitive

data(allison) * 
    mapping(:BodyWt, :Gestation) * 
    visual(xscale = log10) |> 
    draw

mkborregaard avatar Oct 15 '21 12:10 mkborregaard