-
-
Notifications
You must be signed in to change notification settings - Fork 79
Support vector of colors (barplot
, boxplot
)
#227
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 28 28
Lines 1450 1467 +17
=======================================
+ Hits 1449 1466 +17
Misses 1 1
Continue to review full report at Codecov.
|
This is awesome, thanks 😃! Would it be possible to add the ylim (or would it be xlim) kwarg to barplot too? |
If the plots with distinct colors are combined in a single one, they should already be aligned, no ? Did you try using the Have a look at: help?> barplot
[...]
• margin::Int = 3 : number of empty characters to the left of the whole plot.
• padding::Int = 1 : left and right space between the labels and the canvas.
• width::Int = 40 : number of characters per canvas row.
[...] |
Yep, totally, if the plotted series are in the same graph then they should be to the same scale. The x/ylim thing would be more useful if opted to keep the plots separate, but wanted to maintain a sense of scale between them. |
I think the keyword |
One last question, do these changes allow one to add a legend for bar plots, to indicate what each color means? |
I was wrong, I've added a new keyword julia> using UnicodePlots
julia> barplot(["1", "2", "3"], [1, 2, 3], maximum = 10)
┌ ┐
1 ┤■■■■ 1
2 ┤■■■■■■■ 2
3 ┤■■■■■■■■■■■ 3
└ ┘
julia> barplot(["1", "2", "3", "4"], [1, 2, 3, 10], maximum = 10)
┌ ┐
1 ┤■■■■ 1
2 ┤■■■■■■■ 2
3 ┤■■■■■■■■■■■ 3
4 ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 10
└ ┘
I've added support for julia> p = barplot(["1", "2", "3"], [1, 2, 3], color = :blue, name = "1ˢᵗ series", maximum = 10)
julia> barplot!(p, ["4", "5", "6"], [6, 1, 10], color = :red, name = "2ⁿᵈ series")
┌ ┐
1 ┤■■■■ 1 1ˢᵗ series
2 ┤■■■■■■■ 2 2ⁿᵈ series
3 ┤■■■■■■■■■■■ 3
4 ┤■■■■■■■■■■■■■■■■■■■■■■ 6
5 ┤■■■■ 1
6 ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 10
└ ┘ |
Thank you very much, this looks awesome! I really appreciate all the effort you put into this request :) Once the package I am developing to visualize some flux measurements at the repl for COBREXA.jl is done, I will ping you so that you can see what came of it :) Once again, thank you very much!!! |
I will release a new version when #224 is merged. |
Fix https://discourse.julialang.org/t/unicodeplots-barplot-with-different-colored-bars/75979.