Misc

Utils.quantile_multidimFunction
quantile_multidim(A, p; dims, kwargs...)

Compute quantiles along specified dimensions of multidimensional array A.

source
Utils.find_min_matrixFunction
find_min_matrix(matrix, k)

Returns the Cartesian indices of the k:th smallest values in matrix.

Examples

julia> A = [10 8 12; 5 4 9; 3 6 2]
julia> find_min_matrix(A, 3)
source
Utils.find_max_matrixFunction
find_max_matrix(matrix, k)

Returns the Cartesian indices of the k:th largest values in matrix.

Examples

julia> A = [10 8 12; 5 4 9; 3 6 2]
julia> find_max_matrix(A, 3)
source
Utils.optimalPlotLayoutFunction
optimalPlotLayout(NumberOfPlots)

Silly function that returns the 'optimal' number of rows and columns for a subplot given the number of plots.

source
Utils.plot_braces!Function
plot_braces!(x, y, width, height, up = true, horizontal = true)

Plots curly braces with tip at point (x,y) with braces total width of width and height. Accepts additional keywords arguments for plot styling. If up is true, the braces point upward. If horizontal = false, the braces are vertical.

Examples

julia> plot(-2π:0.01:2π, sin.(-2π:0.01:2π))
julia> plot_braces!(π/2, 1, 2, 0.1; lw = 1, color = :black) 
julia> annotate!(π/2, 1.15, text(L"f(1.57) = 1", :black, :middle, 8))  
source