JetBrains / lets-plot-kotlin

Grammar of Graphics for Kotlin
https://lets-plot.org/kotlin/
MIT License
419 stars 36 forks source link

Make middle strip in `geomCrossbar()` optional #233

Closed AndreiKingsley closed 4 months ago

AndreiKingsley commented 5 months ago

This is a fairly common usecase , i.e. the user needs the bars themselves, without the middle bar. That is, I'd like to propose the following behavior: if y is not assigned, the bar is not drawn (as it is currently when passing a list of nulls). Actual:

image

Expected:

image

We did already the same for boxplot: #143

alshan commented 5 months ago

Hi, try using fatten = 0

AndreiKingsley commented 5 months ago

Ok, but let's get rid of middle bars on 0, why not?

alshan commented 5 months ago

0 is a legit value.

AndreiKingsley commented 5 months ago

I mean if y is not assigned, don't draw a middle bar at all instead od drawn it at 0

alshan commented 5 months ago

Got it.

alshan commented 4 months ago

Fixed by commit: https://github.com/JetBrains/lets-plot/commit/8a554dc7c8d5b1d0d8456299608d53bae4266a54