Skip to content

Combining geom_histogram with geom_linerange can lead to AssertionError #150

@Vindaar

Description

@Vindaar

The following:

      ggplot(dfIn, aes(dset, fill = "Type")) +
        geom_histogram(bins = 100, hdKind = hdOutline, alpha = 0.5, position = "identity") +
        geom_linerange(aes = aes(x = dM, y = "Dummy", yMin = 0.0, yMax = 100.0)) +
        geom_linerange(aes = aes(x = cM, y = "Dummy", yMin = 0.0, yMax = 100.0)) +
        ggtitle("Property: " & dset & ", Energy: " & $tup[0][1]) +
        ggsave("/t/" & dset & "_compare.pdf")

will lead to an AssertionError in postprocess_scales.nim if the y = "Dummy" is not set. The reason being that histogram does not define a y scale, but geom_linerange is a continuous scale and thus needs a y axis (even though that place is technically taken care of by yMin and yMax'

edit: using such a dummy scale is dumb, as it overwrites the y scale of the geom_histogram as well. This needs to be fixed...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions