Open IgorDouven opened 6 years ago
I saw this, but I'm hoping there's an easier solution.
Do you know how ggplot2
handles this?
In ggplot2
one would use geom_bar(position="dodge", stat="identity")
to create a grouped bar chart. That would automatically have spacing between the groups. To fine-tune the within-group spacing, one could use width
and position_dodge
within geom_bar()
. In Gadfly, the only way I could get a grouped bar chart to look like I wanted was by specifying all individual xmin
and xmax
values. (I'm very satisfied with the result, though it would be nice if the creation of a grouped bar chart in Gadfly was as easy as it is in ggplot2
.)
Another way to do a grouped bar chart is shown in this discourse posting: https://discourse.julialang.org/t/stacked-bar-graphs/18550/2
Looks very nice! Many thanks for this!
Op za 22 dec. 2018 om 23:14 schreef Mattriks notifications@github.com:
Another way to do a grouped bar chart is shown in this discourse posting: https://discourse.julialang.org/t/stacked-bar-graphs/18550/2
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/GiovineItalia/Gadfly.jl/issues/1092#issuecomment-449600709, or mute the thread https://github.com/notifications/unsubscribe-auth/AgoBLMK-E5i8sQlhVuiKH95D8m5cq3H-ks5u7q6qgaJpZM4Rz_v2 .
I know that, in general, the space between bars in a bar plot can be controlled via
bar_spacing
. But in a grouped bar chart, is there a way to define one spacing for the bars within each group and another for the groups?