SGfigurepapermode

by Tim Lueth and Yilun Sun, SG-Lib Toolbox: SolidGeometry 5.6 - User interface
Introduced first in SolidGeometry 4.7, Creation date: 2019-08-12, Last change: 2025-08-19

removes picture title and increases font size for publications



See Also: SGfigureeval

Example Illustration

 missing image of SGfigurepapermode

Syntax

SGfigurepapermode

Examples


SGfigure(SGbox)
SGfigurepapermode




Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

This function, SGfigurepapermode, is designed to adjust the appearance of figures in MATLAB for publication purposes. It removes the picture title and increases the font size to make figures more suitable for printed materials.

Input Parameters

Algorithm Steps

  1. Retrieve the font size parameter using getfuncparams(1,varargin,16). This function call extracts the first parameter from varargin or defaults to 16 if not provided.
  2. Retrieve the dynamic size flag using getfuncparams(2,varargin,true). This function call extracts the second parameter from varargin or defaults to true if not provided.
  3. Get the current figure's position using get(gcf,'Position'), which returns a vector [s e c r] representing the figure's position and size.
  4. If the dynamic size flag ds is true, adjust the font size FS based on the figure's height sc(4) relative to a base height of 640 pixels.
  5. Set the font size of the current axes using set(gca,'FontSize',FS).
  6. Retrieve the title handle of the current axes using get(gca,'Title') and set its font size to FS.
  7. Find all text objects in the current figure using findobj(gcf,'Type','text') and set their font size to FS.
  8. Find all text box objects in the root object using findobj(findall(groot),'Type','Textbox') and set their font size to FS.
  9. Find all text objects in the root object using findobj(findall(groot),'Type','Text') and set their font size to FS.
  10. Find all axes objects in the root object using findobj(findall(groot),'Type','Axes') and set their font size to FS.
  11. Set the figure's background color to white using set(gcf,'Color','w').
  12. Remove the menu bar and tool bar from the figure using set(gcf,'MenuBar',"none") and set(gcf,'ToolBar',"none").
  13. Bring the figure window to the front using shg.
Algorithm explaination created using ChatGPT on 2025-08-19 00:46. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21