subtightplot
subtightplot is a merger of Pekka Kumpulainen's tight_subplot and Nikolay S.'s subplot_tight. It extends the former, which supports asymmetric subplots, to allow for variable margins in addition to gaps, as in the latter.
Existing scripts that currently call Matlab's builtin subplot can be adapted with minimal modification by issuing the following command upfront:
subplot = @(m,n,p) subtightplot(m,n,p,opt{:});
where opt = {gap, width_h, width_w} describes the inner and outer spacings. The screenshot attached shows demo results for examples modified from the subplot documentation.
For axes ticks and labels and locations, see Matlab's axes properties documentation, or try Eran Ofek's subplot1 for a more guided approach.
If you prefer a post-processing solution, see Richard Crozier's tightfig or Aditya's spaceplots.
Alon Geva's subplotplus is interesting for making complicated subplot arrangements; apparently gaps and margins are fixed. Aslak Grinsted's subaxis is based on a richer, more expressive HTML jargon. Joris Kampman's subplot_grid is a colossal 3500+ line object-based implementation. These high-end alternatives are a departure from the built-in subplot's calling syntax, though.
For an overview, please see the Dec 21st, 2012 post on the File Exchange Pick of the Week Blog, titled "Figure margins, subplot spacings, and more…".
Zitieren als
Felipe G. Nievinski (2024). subtightplot (https://www.mathworks.com/matlabcentral/fileexchange/39664-subtightplot), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Plattform-Kompatibilität
Windows macOS LinuxKategorien
- MATLAB > Graphics > Formatting and Annotation > Axes Appearance > Combine Multiple Plots > Subplots >
Tags
Quellenangaben
Inspiriert von: Subaxis - Subplot, An improved subplot function, tight_subplot(Nh, Nw, gap, marg_h, marg_w), Controllable tight subplot, tightfig(hfig), subplot_grid, subplotplus() - Enhanced layout MATLAB subplot function, Spaceplots
Inspiriert: PlotObjectivesM, smplot for small multiples, FillGaps_ez, PlotObjectives3DM, Dicom Operator - EsmeProcess, Natural Gas Storage Valuation
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
subtightplot/
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.2.0.0 | acknowledging another FX submission. |
||
1.1.0.0 | acknowledged one more FX submission. |
||
1.0.0.0 |