Commit aed6af98 authored by MichelJuillard's avatar MichelJuillard
Browse files

improving table display

parent 6003e42f
......@@ -2,25 +2,28 @@ using PrettyTables
function dynare_table(data, title, column_header, row_header, note;
fmt="%10.4f")
title = ""
if length(title) > 0
pretty_table([title]; noheader = true, tf = borderless,
pretty_table([title],
noheader = true,
tf = borderless,
highlighters = hl_row(1, crayon"bold"))
end
pretty_table(data,
noheader = true;
tf = borderless,
formatter = ft_printf(fmt, 1:size(data,1)+1),
noheader = true,
formatters = ft_printf(fmt, 1:size(data,1)+1),
cell_alignment = Dict( (1, i) => :c
for i = 1 :size(data,1)+1),
highlighters = (hl_row(1, crayon"bold"),
hl_col(1, crayon"bold")),
hlines = [0, 1, length(row_header)],
hlines_format = Tuple('─' for _ = 1:4),
)
hlines = [:begin, 1, :end],
body_hlines_format = Tuple('─' for _ = 1:4),
vlines = [1])
if length(note) > 0
pretty_table([note];
pretty_table([note],
noheader = true,
tf = borderless)
end
println(" ")
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment