cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar

Automatically Resize Column Widths

Hi.  I'd like there to be a button, right-click, or double-click option to automatically resize multiple selected column widths based on their content.  I know there are add-ins users have created to do this, but it would be great to have this integrated into JMP.

 

Similarly, I'd also like there to be way to select multiple columns, drag the column edge of one column to change the width, and have the new width applied to all column (Similar to Excel).

 

Thanks.

11 Comments
stan_koprowski
Community Manager

Hi,

This is available via keyboard click.

On the Mac select columns that you want to resize and click Option while clicking and dragging the columns.

Similar option for Windows using the Alt key.  See Chapter 2 page 49 of the Getting Started book as shown below.

 

 

 

Resize multiple columns simultaneouslyResize multiple columns simultaneously

 

nikles
Level VI

Thanks Stan.  Was not aware of this.  But is there also an autosize feature based on the column content?

 

john_madden
Level VI

In JSL there is a message <<Optimize Display.

 

If you happen to use the Add-In Manager  add-in, it's pretty straightforward to create a simple add-in as a JSL one-liner:

 

Current Data Table() << Optimize Display

and turn it into a menu item (with a keyboard shortcut).

 

That does what I think you want to the currently open table.

nikles
Level VI

Outstanding!  I will make as an add-in.  I still request this feature be added as a button or menu option in future versions though.

 

Thanks for the help John.

nikles
Level VI

Update - Optimize Display does not do exactly what I'd like.  When I run this command, it makes an effort, but it still does not make the larger columns wide enough.  I've observed cases where the column is still too narrow to display the entire value in the column (truncated with a "..."), or the column heading has to be wrapped around to a second line.

Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!
jszarka
Level V

I just learned about the "optimize display" code and do think it would help to be more visible to the non scripters than what @john_madden suggested.

 

I am imagining you can have this as an option under the Tables Menu --> Optimize Display (I would personally put it right above Missing Data Pattern).

 

An alternative option is to highlight your columns of interest and have Optimize Display as an option through the Cols menu or when you Right-Click (below Standardize Attributes.)

nikles
Level VI

Re-commenting on this topic to un-archive it.  

Summary: the suggestions so far are great, but they do not meet my needs.  Below are the proposals and their problems:

1. With multiple columns selected, hold down the option key while dragging the edge of one column with the mouse to resize all columns.  Problem: this is not automatic resizing.

2. Use dt << Optimize Display().  Problem: (a) this operates on the whole table, not just the selected columns.  (b) I've noticed that it does not actually make all of the columns as wide as they need to be, and sometimes still leaves some columns too narrow to view the contents (or the column name) without truncating.

I hope this summary helps elevate this request back up the list.  Thanks!

hogi
Level XII

It's available now in JMP18 : )

hogi
Level XII

@Sarah-Sylvestre : -> delivered