Figure Print Preparation Tool: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:


;Description: A tool to set the margins, papersize, align labels, etc...
;Description: A tool to set the margins, papersize, align labels, etc...
 
   
;Usage:  
    Usage:   setplot(fig, figsize, margins, fontsize, fontname)
  setplot(fig, figsize, margins, fontsize, fontname)
            defaults:  
  default:  
            setplot(gcf, [], [0.5 1 0 1.5 1.5 0], 10, 'Times');
  setplot(gcf, [10 10], [0.25 0.9 0.5 1.2 1.2 0.75], 10, 'Times');
  parameters:
    Inputs: fig = figure handle  
      fig = figure handle  
             figsize = [figwidth figheight] in cm
             current figure is default
                          *1      *2  (see figure below)
      figsize = [figwidth figheight] in cm
            margins = [top bottom rows left right cols] in cm
                    *1      *2  (see figure below)
                        *m1  *m2  *m3  *m4  *m5  *m6  (see figure below)
                [10 10] is default
                      note that m3 and m6 are not absolute. They can be used to 
      margins = [top bottom rows left right cols] in cm
                      add extra positive or negative spacing between cols/rows 
                  *m1  *m2  *m3  *m4  *m5  *m6  (see figure below)
            fontsize = size of the font              
                default see below
            fontname = type of fontfile:
      fontsize = size of the font
            _____________________________________________  _ _ _ _ _ __
                10 is default           
            |        __________        __________        | _ _ _*m1  ^
      fontname = type of fontfile:
            |  y  |          |      |          |      |            |
                'Times New Roman' is default
            |  l  | subplot1 |      | subplot2 |      |            .
            _____________________________________________  _ _ _ _ _ __
            |  b  |          |      |          |      |            |  
          |        __________        __________        | _ _ _*m1  ^
            |  l  |__________|      |__________|      | _ _ _      .                                                    
          |  y  |          |      |          |      |            |
            |                                            |      *m3  |
          |  l  | subplot1 |      | subplot2 |      |            .
            |        __________        __________        | _ _ _    *2
          |  b  |          |      |          |      |            |  
            |  y  |          |      |          |      |            |  
          |  l  |__________|      |__________|      | _ _ _      .                                                  
            |  l  | subplot3 |      | subplot4 |      |            .
          |                                            |      *m3  |
            |  b  |          |      |          |      |            |  
          |        __________        __________        | _ _ _    *2
            |  l  |__________|      |__________|      | _ _ _      .  
          |  y  |          |      |          |      |            |  
            |          xlabel            xlabel          |      *m2  |  
          |  l  | subplot3 |      | subplot4 |      |            .
            |_____________________________________________| _ _ _ _ _ _v_  
          |  b  |          |      |          |      |            |  
           
          |  l  |__________|      |__________|      | _ _ _      .  
            |      |          |      |          |      |
          |          xlabel            xlabel          |      *m2  |  
            |<-*m4->|          |<-*m6->|          |<-*m5->|
          |_____________________________________________| _ _ _ _ _ _v_  
            |<-------------- *1 ------------------------->|
       
     
          |      |          |      |          |      |
   
          |<-*m4->|          |<-*m6->|          |<-*m5->|
    Outputs: none   
          |<-------------- *1 ------------------------->|


Especially useful in combination with the figure saving tool (saver.m)
Especially useful in combination with the figure saving tool (saver.m)


;Author: Rob Hoogendijk
;Author: Rob Hoogendijk

Revision as of 14:37, 3 August 2011

Back to Matlab Tools


File:Setplot.m
Description
A tool to set the margins, papersize, align labels, etc...
   Usage:   setplot(fig, figsize, margins, fontsize, fontname)  
            defaults:   
            setplot(gcf, [], [0.5 1 0 1.5 1.5 0], 10, 'Times');

   Inputs:  fig = figure handle   
            figsize = [figwidth figheight] in cm  
                          *1       *2  (see figure below)  
            margins = [top bottom rows left right cols] in cm  
                        *m1  *m2  *m3  *m4   *m5  *m6  (see figure below)  
                      note that m3 and m6 are not absolute. They can be used to  
                      add extra positive or negative spacing between cols/rows   
            fontsize = size of the font                
            fontname = type of fontfile:  
            _____________________________________________  _ _ _ _ _ __  
           |        __________         __________        | _ _ _*m1   ^  
           |   y   |          |       |          |       |            |  
           |   l   | subplot1 |       | subplot2 |       |            .  
           |   b   |          |       |          |       |            |   
           |   l   |__________|       |__________|       | _ _ _      .                                                      
           |                                             |      *m3   |  
           |        __________         __________        | _ _ _     *2  
           |   y   |          |       |          |       |            |   
           |   l   | subplot3 |       | subplot4 |       |            .  
           |   b   |          |       |          |       |            |   
           |   l   |__________|       |__________|       | _ _ _      .   
           |          xlabel             xlabel          |      *m2   |   
           |_____________________________________________| _ _ _ _ _ _v_   
           
           |       |          |       |          |       |  
           |<-*m4->|          |<-*m6->|          |<-*m5->|  
           |<-------------- *1 ------------------------->|  
      
   
   Outputs: none    

Especially useful in combination with the figure saving tool (saver.m)

Author
Rob Hoogendijk