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

**URL:** https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963
**Category:** Pluto
**Created:** [June 29, 2023, 4:35am UTC](https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963 "2023-06-29T04:35:50Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![adannenberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adannenberg/32/7869_2.png) [@adannenberg](https://discourse.julialang.org/u/adannenberg)
#### Post date: [June 29, 2023, 4:35am UTC](https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963/1 "2023-06-29T04:35:50Z")

</div>

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

```julia
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

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/f/dff9bbc27a76979634bda26a830c8fccfd788c53.jpeg)

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?

---

<div class="post-metadata">

### Author: ![disberd](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@disberd](https://discourse.julialang.org/u/disberd)
#### Post date: [June 29, 2023, 6:52am UTC](https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963/2 "2023-06-29T06:52:00Z")

</div>

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).

---

<div class="post-metadata">

### Author: ![adannenberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adannenberg/32/7869_2.png) [@adannenberg](https://discourse.julialang.org/u/adannenberg)
#### Post date: [June 29, 2023, 12:44pm UTC](https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963/3 "2023-06-29T12:44:25Z")

</div>

Well, none of the display options I’ve found are very nice. Here’s a [pluto notebook](https://drive.google.com/file/d/1PpcqO4Lzw03CIj5pNr8J6Eb2qeUUgCM-/view?usp=sharing). (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:

```julia
df

```

```julia
display(df)

```

```julia
pretty_table(df)

```

```julia
@info df

```

```julia
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.

---

<div class="post-metadata">

### Author: ![Nathan\_Boyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nathan_boyer/32/14825_2.png) [@Nathan\_Boyer](https://discourse.julialang.org/u/Nathan_Boyer)
#### Post date: [June 29, 2023, 2:53pm UTC](https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963/4 "2023-06-29T14:53:30Z")

</div>

Try something like `show(df, truncate=200)` or `show(df, allrows=true)`. Look into the [show](https://dataframes.juliadata.org/stable/lib/functions/#Base.show) and [pretty\_tables](https://ronisbr.github.io/PrettyTables.jl/dev/man/html_backend/) keyword arguments.

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [June 29, 2023, 3:09pm UTC](https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963/5 "2023-06-29T15:09:39Z")

</div>

> [@adannenberg](#):
>
> How can I direct the the terminal stream using the display command in such a way that the available width is utilized?

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

```julia
ENV["COLUMNS"] = 1000

```

before starting Pluto? Though that may not work as it looks like Pluto is currently [hard-coding 88 columns](https://github.com/fonsp/Pluto.jl/blob/280827087ff89be6fb8fdd28cb75d4e21d4b257e/src/runner/PlutoRunner.jl#L972).

See also [Display DataFrame with more than 18 rows/columns · Issue #292 · fonsp/Pluto.jl · GitHub](https://github.com/fonsp/Pluto.jl/issues/292)

---

<div class="post-metadata">

### Author: ![adannenberg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adannenberg/32/7869_2.png) [@adannenberg](https://discourse.julialang.org/u/adannenberg)
#### Post date: [June 30, 2023, 12:47am UTC](https://discourse.julialang.org/t/how-can-i-force-plutos-display-command-to-make-better-use-of-available-screen-real-estate/100963/6 "2023-06-30T00:47:40Z")

</div>

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