版本 2.14 (1.2 MB) 作者: Ben Mitch
Like subplot, but easier, and WYSIWYG export to file. Also fixes dashed/dotted lines in export.
19.6K 次下载
更新时间 2019/11/21


编者注: This file was selected as MATLAB Central Pick of the Week

Panel is an alternative to Matlab's "subplot", providing easier control over layout (particularly, easy elimination of whitespace). It also fixes dashed/dotted lines during export to image files (both vector and bitmap formats).
If you find the layouts generated by subplot() have too much space and not enough axis, try Panel. If you find it tedious to construct subplot layouts that are more complex than a simple grid, try Panel. If you always resort to other software to prepare your final figures for publication because you can't get the appearance you want from Matlab, try Panel.
Panel was designed to produce output for print publications directly from Matlab. Layouts are, by default, in physical units (mm, by default), and exporting to a graphics file targets print columns directly. However, it performs equally well if the end goal is digital display, providing easy control over use of screen real estate.

Panel incorporates features suggested by several Matlab Central users, as well as some code - see the documentation for details.

Questions? Please see the first.

NB: Release 2.11 is required for all functions to work correctly at and beyond Matlab R2014b.


Ben Mitch (2024). Panel (, MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
Windows macOS Linux
Help CenterMATLAB Answers 中查找有关 Axes Appearance 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明

Added find() method, removed an unnecessary constraint, fixed inability to mouse on axes covered by an xlabel/ylabel group axis.


Fixed bug reported by Jiri.


Release 2.12: Fixed minor bug in export syntax, and added return of accessed object to x/y/zlabel and title functions.

Release 2.11: Fixes one or two things for the Matlab R2014b graphics revamp. Some performance optimisation, also.

Added link to FAQ.

Release 2.10: Removes optimisation (LP) problem from layout in favour of analytical solution (faster, does not need opt toolbox). Supports panels of fixed physical size. Supports various packing modes not previously supported.

Release 2.9. Export infers image format from file extension; units can be set in constructor; adds group descriptor "family"; adds panel.version(); adds LNCS page size.

Release 2.8. Withdraws panel.plot() in favour of panel.fixdash(), which has the same aim but is much less crude.

Version 2.7. Changes: added demo of insets (tx Ann Hickox); added panel.plot() to work around poor rendering of dashed lines.

Release 2.6. Adds support for SVG export (through plot2svg), plus improved documentation.

Added support for multiple objects per panel (e.g. 2 axes, as suggested by Brendan, see demopanelG). Couple of bugs fixed.

NB: Significant change, consider this BETA, please: revert to 2.4 if problems. Can't find anything wrong with it, though.

Release 2.4. Fixes one bug, whereby a single panel in a figure does not get positioned until the figure is resized.

Release 2.3, fixed a few bugs is all.

Version 2.2. Some improvements to the documentation, added the flag "no-manage-font" to disable Panel's font management. Otherwise, unchanged, straight swap.

Version 2.1 (20 Jul 2011) includes a built-in linear programming solver (due to Jeff Stuart, available on FEX). This allows users without the Optimisation Toolbox to use Panel. Some performance improvements, and added an option to export to PDF.

Updated information: R2008a is required, based on

Release of Version 2.0. This release moves to a single implementation file, and moves to a much simpler system for control of layout.

Added recursive and group labelling and titling, as suggested by Niko.

20% faster rendering, fixed figure units bug from years ago, implemented correct handling of "orphaned" panel references.

Integrated implementation of native axis properties, so that functions like xlabel() and title() and set(gca, 'xticklabel', ...) now work seamlessly with panel. Big tidy of the documentation too.

Hopefully, really fixed all the tick label bugs this time. Added management of independently-created axes (like colorbars), idea by Arthur Ward. Added grid-like packing to pack(), as previously added to constructor, panel().

Fixed a minor bug introduced in the last update.

Added missing documentation; fixed mis-applied tick labels during export bug; added simple constructor syntax for building panel grids all-at-once.