Skip to content

histogram(density = true) and x_discrete(labels = ...) incompatible ? #1163

@EliasBcd

Description

@EliasBcd

I am trying to plot a histogram while giving labels to each histogram bar. There seem to be an incompatibility between density = true and x_discrete(label = ...)

x = [1,1,1,1, 2,2,2,2,2]
lab = Dict(1 =>"one", 2 => "two")
Gadfly.plot(x = x, Scale.x_discrete(labels = x -> lab[x]), Geom.histogram(density = true))

On my computer, the density = true is ignored when I have x_discrete, but works perfectly without latter. It looks like a bug to me, or is it a normal behavior? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions