Powerful convenience for Julia visualizations and data analysis http://juliaplots.github.io/
Plots.scalefontsizes()
could come to the rescue!
randn(100)
or rand(100) .* 10
bins=4
functions in most normal cases
julia> fit(Histogram, rand(100); nbins=4)
Histogram{Int64, 1, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}}
edges:
0.0:0.5:1.0
weights: [61, 39]
closed: left
isdensity: false
StatsBase
?
[slack] <briochemc> BTW I can fail your examples too:
nbins=4
is just broken
nbins=19
julia> fit(Histogram, randn(100); nbins=19)
Histogram{Int64, 1, Tuple{StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}}}}
edges:
-4.0:0.5:3.0
weights: [1, 1, 0, 1, 5, 6, 19, 16, 13, 11, 19, 5, 2, 1]
closed: left
isdensity: false
nbins
: if no edges
argument is supplied, the approximate number of bins to use along each dimension (can be either a single integer, or a tuple of integers).
histogram(rand(10), bins=range(0,1; length=4+1))
bar
but all bars start at the axis. Looked into boxplot
but I don't think this will do it. I will need to create separate bars for any one category (e.g., see m1 in image). Stacked bar plot looks close, but I don't think it's quite it. Appreciate the help!: https://files.slack.com/files-pri/T68168MUP-F01Q6VCU9FD/download/image.png
[slack] <Misha Mikhasenko> ```@recipe function f(dx::Tuple, dy::Tuple)
box = Shape(
[dx[1], dx[1], dx[2], dx[2], dx[1]],
[dy[1], dy[2], dy[2], dy[1], dy[1]]
)
(box,)
end
plot()
plot!((1,2), (2,4), c=:red)
plot!((2,3), (6,8), c=:green) ```
ylims
and "just remove the shift"? aren't the result identical?
[slack] <sverek> ```julia> pgfplotsx()
Plots.PGFPlotsXBackend()
julia> push!(Plots.PGFPlotsX.CUSTOM_PREAMBLE, raw"\usepackage{amsmath}")
1-element Vector{String}:
"\usepackage{amsmath}"
julia> plot(xlabel=L"\mathit{\Pi}")```