How can I force Pluto's "display" command to make better use of available screen real estate?

How can I direct the the terminal stream using the display command in such a way that the available width is utilized?

I’ve made the Julia cells in my browser wide by using

html"""<style>
	main {
    	max-width: 1500px !important;
    	#margin-right: 100px !important;
		#margin-left:  300px !important;
	}
	"""

But when I evaluate

display(DataFrame(Label1 = randn(5), Label2 = randn(5), Label3 = ["hi","there","everyone", "out","there"], Label4 = now():Day(1):now()+Day(4), Label5 = randn(5), Label6 = randn(5)))

my output looks like this

i.e. the rightmost columns are omitted even though there’s space to accommodate them. I’d like to be able to display more columns when needed…

Any thoughts?

This is not a directly answer on how to enlarge the console-like width, but is there a specifc reason why you revert to the console-like display rather than using the more capable display capability of DataFrames in Pluto when those are sent either as cell output or as logs with @info for example?

The old style console is intended more as a fallback as it has quite limited functionality compared to the stadard cell output (which is also mostly equivalent to sending variables to logs).

Well, none of the display options I’ve found are very nice. Here’s a pluto notebook. (I don’t know how to post it here other than by sharing a link).

If you open the notebook you will see a comparison of 5 different ways of displaying a dataframe df in pluto:

df
display(df)
pretty_table(df)
@info df
HTMLTable(df)

As I wrote, I want to have a wide display to fit things but Pluto doesn’t play well with a wide display in that:

  • plots are left-justifed

  • Markup text is left-justified

  • display, pretty_table and HTMLTable all make columns to the far right inaccessible

  • “native” (i.e. df) and @info df use the available screen real estate, but they are both centered on the page (not playing well with the left-justified plots and text) and furthermore have the dataframe column data not centered under the column name

All in all, I’m still looking for a way to make it look “nice enough”. I can probably overcome this issue by writing some HTML but I’d rather find a canned solution, as I don’t write HTML yet.

Try something like show(df, truncate=200) or show(df, allrows=true). Look into the show and pretty_tables keyword arguments.

You need to tell Pluto to assume a bigger display size. You can try setting e.g.

ENV["COLUMNS"] = 1000

before starting Pluto? Though that may not work as it looks like Pluto is currently hard-coding 88 columns.

See also Display DataFrame with more than 18 rows/columns · Issue #292 · fonsp/Pluto.jl · GitHub

Thanks for the suggestions. No joy, but at least it’s educational :<