Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combining geom_histogram with geom_linerange can lead to AssertionError #150

Open
Vindaar opened this issue Aug 24, 2022 · 1 comment
Open

Comments

@Vindaar
Copy link
Owner

Vindaar commented Aug 24, 2022

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...

@Vindaar
Copy link
Owner Author

Vindaar commented Aug 24, 2022

eccentricity_compare.pdf

This is what it looks like with the Dummy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant