histogram2d with logarithmic z-axis?


#1

is it possible to control the behavior of the z axis in histogram2d? e.g. making it logarithmic.


#2

Yes in Gadfly:

using RDatasets, Gadfly
D = dataset("ggplot2","diamonds")

p = plot(D, x=:Price, y=:Carat,
    Geom.histogram2d(xbincount=15, ybincount=15),
    Scale.color_log10,
    Scale.x_continuous(format=:plain),
    Guide.title("Diamonds")
)

diamonds


#3

nice! thx.