Skip to content

Compact borderless printing #267

@sethaxen

Description

@sethaxen

I tend to prefer printing tables with no borders to save space. On PrettyTables v2, I would do this like

julia> using PrettyTables

julia> table = (x=randn(5), y=randn(5));

julia> pretty_table(table; hlines=:none, vlines=:none, show_subheader=false)
         x           y 
  0.788356  -0.0725819
 -0.879859   -0.912923
 -0.873793    0.631621
 -0.733255     1.43868
 -0.702195    -0.35417

If I understand the docs correctly, on PrettyTables v3, this is the analog:

julia> pretty_table(
           table;
           table_format=TextTableFormat(; borders=text_table_borders__borderless),
           show_first_column_label_only=true,
       )

          x            y 

   0.788356   -0.0725819
  -0.879859    -0.912923
  -0.873793     0.631621
  -0.733255      1.43868
  -0.702195     -0.35417

Compared to v2, there's an extra space on the left and a newline between the column labels and the column data. Is it possible to remove these?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions