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

Lollipop in legend is disproportionately large. #216

Closed
alshan opened this issue Oct 17, 2023 · 1 comment
Closed

Lollipop in legend is disproportionately large. #216

alshan opened this issue Oct 17, 2023 · 1 comment
Assignees
Milestone

Comments

@alshan
Copy link
Collaborator

alshan commented Oct 17, 2023

val estimated = listOf(0.2, 0.3, 0.4, 0.1)
val observed = listOf(1, 2, 3, 4) 
val probability = listOf(0.19, 0.31, 0.42, 0.08)
val values = listOf(1, 2, 3, 4)

val data = mapOf(
    "xs" to observed + values,
    "ys" to estimated + probability,
    "group" to List(4) {"A"} + List(4) {"B"}
)

var p = ggplot(data) + theme().legendPositionRight() +
    geomLollipop(position = positionDodge(0.3)) {
        x = "xs"
        y = "ys"
        color = "group"
    } + scaleColorManual(values=listOf("red", "black"))
    
p = p + labs(title = "some title", x = "xLabel", y = "yLabel") +
            ggsize(500, 350)

image

@alshan alshan added this to the 2023Q4 milestone Oct 17, 2023
@alshan
Copy link
Collaborator Author

alshan commented Oct 17, 2023

@alshan alshan closed this as completed Nov 7, 2023
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

2 participants