Skip to Main Content Skip to Search
Product Documentation

Adjust Desktop Appearance

Fonts

You can specify the font characteristics (type, style, and size) for:

You can set some font options differently for printing — see Print Options.

Setting Fonts for Sets of Tools Based on Content

You can specify fonts for tools based on their predominant content — text, code, or HTML proportional font. For an example of how fonts affect text in the Editor, see Monospace Font Compared to Proportional Font.

To set fonts for a tool:

  1. Select File > Preferences > Fonts.

  2. Under Desktop code font select a font type, style, and size from the drop-down menus.

    For font size, you can type a size, including a size not shown as a choice in the drop-down menu.

  3. Under Desktop text font, do one of the following:

    • Select Use system font.

    • Select the font type, style, and size from the drop-down menus.

      For font size, you can type a size, including a size not shown as a choice in the drop-down menu.

  4. Review the list of tools currently using each font group—Desktop code font, Desktop text font, and Custom fonts.

    If you want to move a tool from one group to another, or if you want to customize fonts for a particular tool, follow the steps in Setting Fonts for Individual Tools and HTML Proportional Text. Otherwise, click OK.

Setting Fonts for Individual Tools and HTML Proportional Text

Custom font preferences enable you to change the font for HTML proportional text and individual desktop tools. For an example of how fonts affect text in the Editor, see Monospace Font Compared to Proportional Font.

To set custom fonts:

  1. Select File > Preferences > Fonts > Custom.

  2. Select the tool you want to customize from the Desktop tools list.

    The type of font the tool currently uses appears under Font to Use.

  3. Under Font to Use, select one of the following:

    • Desktop code.

    • Desktop text

    • Custom, and then specify the font characteristics.

  4. Click OK.

About HTML Proportional Text Font

HTML proportional-text fonts present characters with varying widths. Proportional-font text takes less space, but its characters are harder to align. Proportional-text font is easier to read, and is typically used for descriptive and informational text. For example, the MATLAB default is to use proportional fonts for the following:

Monospace Font Compared to Proportional Font.  A monospace font is useful when you care about alignment, but it does take more space than a proportional font.

With a monospaced font, all characters are the same width.

Image of Editor with three lines of text in 10 point Monospaced font.

With a proportional font, characters are different widths.

Image of Editor with three lines of text in 10 point San Serif, a proportional font.

Factory Default Font Settings

The following table lists the factory default code and text font settings, and the tools that use those font settings. If you previously changed settings, and now want to revert to the default values, update the settings using the values in the table.

Font Type

Factory Default Characteristics

Tools Using Font Type by Factory Default

Desktop code font

Monospaced, Plain, 10 point

  • Command History

  • Command Window

  • Editor (which also applies to the Shortcuts Editor)

Desktop text font

Your system's current font.

  • Current Folder browser (which also applies to the Path browser)

  • Function Browser in the Command Window and Editor

  • Help Navigator

  • Workspace browser

  • Variable Editor

Example of Changing the Font

This example changes the settings for the desktop code font; changes the Command History font preference so that it uses the desktop text font instead of the code font; and specifies a custom font for the Current Folder browser.

  1. Select File > Preferences > Fonts.

  2. Under Desktop code font, select Times New Roman, Plain, 14 point.

  3. Under Desktop text font, select Use system font.

  4. Click Apply.

  5. Make the Command History window use the desktop text font:

    1. Click the Custom Fonts link.

    2. From Desktop tools, select Command History.

    3. Select the Desktop text radio button.

    4. Click Apply.

  6. Apply a custom font to the Current Folder browser:

    1. From Desktop tools, select Current Folder.

    2. Select the Custom radio button.

    3. Select Arial Narrow and Plain, and then type 11 in the size field.

    4. Click OK.

The following table details the results of the changes.

Font Type

Font Characteristics

Tools Assigned Font

Desktop code

Times New Roman® font, Plain, 14 point

Command Window
Editor

Desktop text

Same as your current system font, which appears in the dimmed fields below the Use system font check box.

Command History
Workspace browser
Variable Editor
Function Browser

Custom

SanSerif, Plain, 8 point

Help Navigator

Custom

SanSerif, Plain, 10 point

HTML Proportional Text

Custom

Monotype Corporation Arial® Narrow font, Plain, 11 point

Current Folder browser

Font Troubleshooting — Document Displays Boxes and Odd Symbols Instead of Text

If you open a file created by someone else, and you see boxes or meaningless symbols instead of text, it is probably because you are using different language fonts from the file creator. This situation can occur, for example, if you open a file created by someone whose native language is Japanese and your native language is English. The Japanese user is probably using fonts for East Asian languages and you are not.

To resolve this problem, in the Windows Control Panel, find the region and language options, and then install the supplemental files for East Asian languages.

For more information, refer to the Windows help.

Where MATLAB Gets Fonts

Unless you change it, MATLAB gets fonts from the operating-system font list. Any fonts on the system list that MATLAB cannot display are excluded from its list. The system fonts are installed in one of the following locations:

If a new compatible font becomes available to MATLAB, consider updating fonts on your Windows platform, as follows:

  1. Use the Windows Control Panel to install the font.

    For more information, refer to the Windows help.

  2. Restart MATLAB.

A compatible font on Windows platforms for desktop components (such as the Command Window), figure windows, and uicontrols is one compatible with TrueType® and Microsoft OpenType® fonts. A bitmapped font is compatible font for graphics objects, such as xlabel, ylabel, title, and text.

Color Settings

This section describes how to change the colors that desktop tools use.

Changing Text, Background, and Hyperlink Colors in Desktop Tools

To change the colors that MATLAB uses for text and background in desktop tools follow these steps:

  1. Select File > Preferences > Colors.

  2. Clear Use system colors.

    System colors are the text and background colors that your platform (for example, Microsoft Windows) uses for other applications.

  3. Select the colors you want to use from the Text and Background color palettes.

    When you choose a color, the Sample area in the dialog box updates to show you how it will look.

      Tip   If you use a gray background color, a selection in an inactive window is not visible.

  4. Under Other colors, select the color you want to use for hyperlinks.

  5. Click OK.

Changing Syntax Highlighting Colors

In the Command Window, Command History, Editor, and Shortcuts callback area, MATLAB conveys syntax information using different colors. This feature, known as syntax highlighting, helps you to identify syntax elements, such as if/else statements at a glance. The Editor also provides syntax highlights colors for other languages.

In the Command Window, only the MATLAB input you type is highlighted; the output from running MATLAB functions is not highlighted.

To change syntax highlighting colors, follow these steps:

  1. Select File > Preferences > Editor/Debugger, and then click Language.

  2. In the Language drop-down menu, select the language for which you want to change syntax highlighting colors.

  3. In the Syntax highlighting area, select Enable syntax highlighting.

  4. Change the colors.

    • If you set the Language to MATLAB, click the Set syntax colors link, and then change the colors under MATLAB syntax highlighting colors.

    • If you did not set the Language to MATLAB, change the colors under Syntax highlighting .

  5. Click OK.

Changing Code Analyzer Colors

Code Analyzer helps you to identify potential problems and refine your MATLAB code. By default, the Editor indicates:

To change code analyzer colors:

  1. Select File > Preferences > Colors > Programming Tools.

  2. Select the colors you want the code analyzer to use for warnings, autofix highlighting, or both.

  3. Decide if you want autofix highlights to appear in the Editor.

    Clear Autofix highlight if you do not want autofix highlights to appear in the Editor; select Autofix highlight if you do.

  4. Click Apply.

  5. Decide if you want to change the color that the code analyzer uses for errors.

    • If you do not, go to step 6.

    • If you do, then:

      1. In the left navigation pane, click Colors.

      2. Under MATLAB syntax highlighting colors, change the color for Errors.

        In addition to changing the color of code analyzer indicators for errors, this action also changes the color for errors in the Command Window, Command History window, Editor, and Shortcuts callback area.

  6. Click OK.

For more information, see Automatically Check Code in the Editor — Code Analyzer.

Toolbar Customization

The toolbar on the desktop and on undocked tools provides easy access to frequently used operations.

Columns — Resize, Rearrange, and Sort in Desktop Tools

Some desktop tools, such as the Current Folder browser, present information in columns. The following table describes how you can resize and reposition the columns, as well as sort the information in the columns.

To:Do This:
Change the column widthDrag the separator bar between two column headings.
View information cropped by narrow column Position the pointer over an item to view the full value for that item. It displays like a tooltip.
Rearrange the columnsDrag a column header to a different position.
Sort the information by a particular column

Click the column header. For example, in the Current Folder browser, click the Date Modified date to sort the items in date order.

In some columns, you also can reverse the sort order by clicking the column header again. A small gray arrow in the header indicates the current sort order. For example, a down arrow in the Date Modified column header indicates a descending sort order. The newest files are at the top of the list.

Enable and Disable Confirmation Dialog Boxes

For many actions you try to perform, MATLAB displays confirmation dialog boxes before performing that action. To specify whether or not you want a given confirmation dialog box to appear:

  1. Select File > Preferences > GeneralConfirmation Dialogs.

  2. Select the check box for each dialog box you want to appear; clear it if you do not want it to appear.

  3. Click OK.

Open and Rearrange Desktop Tools and Documents

Desktop Tools — Open and Rearrange

Open Desktop Tools.  To open a desktop tool, do any one of the following:

Resize and Move Desktop Tools.  To resize tools on the MATLAB desktop, use the mouse or the keyboard, as described in the following sections:

Resize Desktop Tools Using the Mouse.  

To expand or reduce the size of adjacent tool windows, use the pointer to drag the separator bar that appears between them. When you move the pointer onto the separator bar, the pointer assumes a different shape, as follows:

Resize Desktop Tools Using the Keyboard.  

You can use menu item mnemonics to resize desktop tools using the keyboard.

For example, suppose the Command Window is open on the desktop along with other tools. To make the Command Window the active tool:

  1. Click in the Command Window.

  2. Press Alt+D, Z — the mnemonic equivalent of selecting Desktop > Resize Command Window.

    The pointer shape becomes an arrow.

  3. Use the keyboard arrow keys to change the size of the Command Window.

  4. Press Enter to accept the new size, or press Esc to return the Command Window to its original size.

Determine Current Size of the Command Window.  

To determine the number of characters and lines that can display in the Command Window, given its current size, issue this command:

get(0,'CommandWindowSize')

For example, a result of 50, 25 means that 50 characters can display across the Command Window, and 25 lines can display without scrolling.

Move Tools Using the Mouse.  

To move a tool to another location on the MATLAB desktop using the mouse, follow these steps:

  1. Drag the title bar of the tool to where you want the tool to be.

    As you drag the tool, an outline of it appears. The status bar indicates where the tool moves if you release the mouse. For instance, it can display:

    • Release the mouse to dock the Editor on the top.

    • Release the mouse to tab-dock the Current Folder.

    • Release the mouse to leave the Editor in the current location.

  2. When the outlined position is where you want the tool to be, release the mouse button.

    The tool stays at the new location.

The following illustration shows how it looks as you drag the Command History tool above the Command Window. When you begin dragging the Command History tool, the outline appears around the tool. When you drag it across the boundary separating the two tools, the outline indicates the top-bottom arrangement. If you release the mouse button, you change the arrangement from side-by-side to top-bottom.

Image of dragging Command History to a new position.

Other tools on the desktop automatically resize to accommodate the new configuration. The following example shows how the desktop looks after you move the Command History tool above the Command Window.

Image of Command History above the Command Window.

Move Tools Using the Keyboard.  

To move desktop tools using the keyboard, follow the menu item mnemonics. For example, suppose the Command Window and other tools are currently open on the desktop. To move the Command Window to a new location, follow these steps:

  1. Make the Command Window the active tool by pressing Ctrl+0.

  2. Press Alt+D, V — the mnemonic equivalent for selecting Desktop > Move Command Window.

    The pointer shape becomes an arrow.

  3. Use the arrow keys to move the outline of the Command Window to a new location.

  4. Press Enter to keep the tool at the new location, or press Esc to return the Command Window to its original position.

Undock Tools to Move Them Outside the Desktop.  

You can move a tool outside the MATLAB desktop (called undocking) to make it larger or easier to use. For example, when referring to the online documentation, you can move the Help browser off the desktop.

To move a tool outside the desktop:

  1. Select the tool to make it active.

  2. Perform one of the following:

    • Click the Undock button  Image of Undock button.  on the title bar of the tool you want to move outside the desktop.

    • Select Undock for that tool from the Desktop menu; the tool must be the currently active one.

    • Drag the title bar of the tool outside the desktop. As you drag, an outline of the tool appears. Release the mouse.

Move Undocked Tools Back onto the Desktop.  To move a tool that is outside the MATLAB desktop back onto the desktop, do one of the following:

Group Desktop Tools Together.  You can group tools so that they occupy the same location on the MATLAB desktop. Basically, you are stacking one tool on top of another. Then, you can access the individual tools using the tool name on the title bar:

To group tools:

  1. Drag the title bar of one tool on the desktop on top of another tool on the desktop.

    An outline of the tool you are dragging overlies the target tool.

    Image of dragging Command History on top of Command Window.

  2. Release the mouse.

    Both tools occupy the same space. Labeled tabs appear at the top of that space.

    Image of Command Window and Command History grouped together.

To view a grouped tool, click the title bar for the tool. The selected tool moves to the foreground and becomes the currently active window.

When you click the Close box  Image of Close box. for a tool grouped with other tools, that tool closes. You cannot close all the grouped tools at once. Instead, close each tool individually.

Right-click the title bar for a tool and use the context menu to close, undock, maximize, or minimize the tool.

Maximize Available Space on the Desktop.  To hide the title bars for desktop tools so they use less space, select Desktop > Titles. This action clears the check mark next to the Titles menu item. Identify a desktop tool with a hidden title by hovering over the area where the title bar used to be. A tooltip displays the name of the tool.

Maximize Tools Within the Desktop.  MATLAB software provides multiple ways to maximize tools on the desktop. It also has multiple ways of restoring the desktop to the layout in place before you resized it. For example:

Minimize Tools Within the Desktop.  

You can minimize any tool on the desktop, which creates a button representing the tool along an edge of the desktop. For example, suppose you minimize the Command Window. The desktop looks like the following image, although the layout of the desktop and the location of the button can be different for your desktop.

MATLAB software provides multiple ways to minimize tools in the desktop, restore the previous desktop layout, and manipulate the location of the tool button. For example:

Desktop Documents — Open and Rearrange

Open Documents.  Use the document bar to go to a document that is open, but not in view. The names of all open documents appear on the document bar. Click the document name to open the document. If the document bar is not open, select Desktop > Document Bar > Bar Position and select the position for it, for example, Right.

Entries for undocked documents appear on the Windows task bar, or the equivalent for your platform. Click the task bar entry for a document to make that document active.

When you open MATLAB documents, they open in the associated tool and appear in the position they occupied when last used. Figures open undocked, regardless of the last position occupied. If the tool is not already open, it opens when you open the document.

How you open a document depends on the document type, as described in the following table.

Document Type and Tool

How to Open Document

Where Document Appears by Default

Other Techniques to Open Document

Text file in the Editor

Click the Open file button  Image of Open file button. on the desktop toolbar and select the file.

In the last location of the Editor. The default location for the Editor is outside the desktop.

Open Existing Files

Variable in the Variable Editor

Double-click a variable in the Workspace browser.

In the last location of the Variable Editor. The default location of the Variable Editor is docked on the desktop.

Opening the Variable Editor

HTML or similar page in the Web browser

Double-click the file name in the Current Folder browser.

In the last location of the Web browser, replacing the existing Web browser document.

Web Browsers and MATLAB

Figure

Use the plot function.

In a figure window, outside the desktop.

Any other function or tool that creates a figure window.

Example of Working with Documents on the Desktop.  

Some common actions for working with documents on the desktop are:

Navigate Among Open Documents Using the Document Bar.  When you have more than one document open in a tool, each document appears either maximized (the default), tiled, or floating (cascading). Tiled and floating arrangements make multiple documents visible simultaneously. The document bar shows the names for all open documents docked together in a tool.

Adjust the Document Bar.  You can show, hide, move, alphabetize, and adjust the size of the tabs on the document bar as described in the following table.

To Accomplish This:Do This:

Show the document bar.

Select Desktop > Document Bar > Bar Position, and then select a location.

Hide the document bar.

Right-click the document bar, and then select Bar Position > Hide.

Move the document bar.

Do one of the following:

  • Drag it to another location.

  • Select a new location from the Desktop > Document Bar > Bar Position submenu.

Alphabetize the names of the documents on the document bar.

Right-click on the document bar and select Alphabetize.

Reorder document names on the document bar.

Drag a document name to a different position on the document bar.

Position Documents.  You can position open documents so that one document or multiple documents are in view from within a tool. Select the arrangement from the Window menu or use the Arrange Documents drop-down menu  Image of Arrange Documents drop-down menu., as described in the table that follows. When you tile documents, they are all visible within the tool, arranged in a grid pattern.

To:Do This:

View one document (default)

From the Arrange Documents drop-down menu, choose the Maximize option  Image of Maximize option.

View all open documents, layered on top of each other

In the Arrange Documents drop-down menu, choose the Float option  Image of Float option..

Optionally, select Window > Cascade to make the document arrangement neater.

View all documents, side-by-side

In the Arrange Documents drop-down menu, choose the Left/Right Tile option  Image of Left/Right Tile option.

View open documents, one above the other

In the Arrange Documents drop-down menu, choose the Top/Bottom Tile option  Image of Top/Bottom Tile option..

View open documents, tiled within the tool

  • In the Arrange Documents drop-down menu, choose the Tile option  Image of Tile option..

  • In the grid that opens, move the pointer to highlight the number and position of the tiles. You must choose an even number.

    The tiles that will contain documents are blue, whereas the tiles that will be empty are gray.

View a subset of open documents, tiled within the tool

  1. Select Window > Tile.

  2. Indicate the documents you want to view and the grid pattern to use for the arrangement of their display.

Replace a tiled document

See Replace a Tiled Document with an Out-Of-View Document
Close an empty tile

On the separator bar, move the pointer over the handle  Image of handle—located in the center of the separator bar., and then click the Close box that replaces the handle.

Replace a Tiled Document with an Out-Of-View Document.  

You can replace a currently tiled document with another that is on the document bar, but not currently in view.

For example, suppose you have three documents open in the Editor — collatz.m, collatzplot.m, and collatzall.m. The first two documents are in view, as shown in the following image.

To view collatzall.m in the top tile, follow these steps:

  1. Click the title bar of the file in the top tile, collatz.m.

  2. On the document bar, click collatzall.m.

    If you previously viewed collatzall.m in the bottom tile, collatzall.m displays in the bottom tile, regardless of which title bar you click in step 1.

  3. If collatzall.m displays in the bottom tile, drag its title bar to the top tile to get the arrangement you want.

Now, collatzall.m displays in the top tile and collatzplot.m displays in the bottom tile.

Move and Resize Documents.  You can move and resize documents to organize them as you want, as described in the following table.

To Accomplish This:Do This:
Minimize all open documents in a tool.Make that tool active, and then select Window > Minimize Toolname Documents.
Float documents.Select Windows > Float.
Minimize (hide) a floating document.Click the minimize button  Image of minimize button. on the document title bar.
Access a minimized document.Select its name from the document bar or the Window menu.
Move or resize a maximized document.Move or resize the tool that contains it.
Make a document larger when it is next to an empty tile.Hover over the handle on the separator bar, and then click the Close box that appears.
Resize tiled documents.Drag the separator bar that is between the documents.
Move tiled documents.Drag the title bar of the document to another tile. If you drag it to a tile that already contains a document, the document you are dragging covers up the other document.

Close Documents.  The following table summarizes the key options for closing documents.

To Close:Do This:
All documents open within a tool

Click the Close box  Image of Close box. on the title bar for the tool.

Documents without saving changes

Hold the Ctrl key while clicking the Close box.

All documents undocked from within their tools

Select Window > Close All Documents from the desktop.

Move Documents Outside of the Desktop (Undock).  You can move a tool outside of the MATLAB desktop (called undocking) to make it larger or easier to work with. For example, you can move the Help browser outside of the desktop when referring to the online documentation.

To move a tool outside the desktop, click the Undock arrow  Image of Undock arrow.  on the title bar of the tool you want to move outside the desktop.

Dock Documents and Tools.  To dock documents and their associated tool, click the Dock button  Image of Dock button. on the menu bar for the tool.

Group Documents in a Tool Outside the Desktop.  To group all the documents for a tool outside of the desktop, undock the tool from the desktop, not just the individual documents.

If you have already undocked all the documents and closed the empty tool that had contained them, follow these steps:

  1. Select Desktop > Dock All in Editor, for example.

    This selection moves all the documents into the tool in the desktop.

  2. Undock the tool.

Desktop Arrangements — Save, Reuse, Rename, and Delete

Overview of Desktop Arrangements.  When you end a session, MATLAB saves the current desktop arrangement. The next time you start MATLAB, the desktop appears like the way you left it. However, tools such as the Help browser, Web browser, and Variable Editor do not reopen automatically, even if they were open when you ended the last session. You can use startup options to specify tools that you want to open on startup. For example, to have the MATLAB Web browser open each time you start MATLAB, add web to a startup.m file. For more information, see Startup Options.

You can also use predefined layouts, and you can save your own layouts for later reuse.

Save a Desktop Arrangement.  To save your current desktop arrangement:

  1. Select Desktop > Save > Layout.

  2. Assign a name to the layout in the resulting dialog box, and then click OK.

MATLAB stores the arrangements you save as XML files in the preferences folder for MATLAB. The layout last used in a session is MATLABDesktop.xml. The MATLABDesktop.xml file loads when you start MATLAB and is overwritten when you close MATLAB.

Reuse a Saved or Predefined Desktop Arrangement.   Select Desktop > Desktop Layout, and then select the name of the layout you want to use.

MATLAB includes the following predefined layouts:

When you select a saved or predefined layout, document tools already open in the desktop remain open.

Rename a Saved Desktop Arrangement.  Rename a desktop layout that you have previously created and saved as follows:

  1. Select Desktop > Organize Layouts.

  2. In the resulting dialog box, select a layout, click the Rename button.

  3. Type the new name over the existing name.

  4. Click Close.

You can rename desktop layouts that you created only.

Delete a Saved Desktop Arrangement.  Delete a desktop layout that you have previously created and saved as follows:

  1. Select Desktop > Organize Layouts.

  2. In the resulting dialog box, select a layout, click the Delete button, and then click Close.

You can delete desktop layouts that you created only.


[1] Linux is a registered trademark of Linus Torvalds.

[2] UNIX is a registered trademark of The Open Group in the United States and other countries.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS