UnicodePlots `barplot` with different colored bars

Is it possible to stack multiple bar plots with different colored bars in one plot? For example, currently I have a function that returns three separate plots, but I think it would look better if I could combine them (e.g. the scale would be better represented and the y-axis would be aligned). Below is an example of what I currently have:

Is there a way to do this without too much hacking into the source code of UnicodePlots? This would be part of another package, so I am trying to keep dependencies as light as possible, thus I would like to avoid adding Plots.jl if possible… I am aiming for something like this:

1 Like

These issues could probably be solved by using the ylim argument and left-padding with lpad() the string labels.

1 Like

Thanks! Yep, padding the labels worked great, but it seems bar plots do not make use of the ylim argument. See the code below:

image

Any other ideas of how I could force the same scale to be used in both plots?

It seems this is not implemented yet. Best way forward would probably be to open an issue on https://github.com/JuliaPlots/UnicodePlots.jl/issues.

3 Likes

@Elmo, please comment on the PR fixing this, if that suits you or needs more rework.

https://github.com/JuliaPlots/UnicodePlots.jl/pull/227

3 Likes