# v_axisenlarge

## PURPOSE

V_AXISENLARGE - enlarge the axes of a figure (f,h)

## SYNOPSIS

function v_axisenlarge(f,h)

## DESCRIPTION

    V_AXISENLARGE - enlarge the axes of a figure (f,h)

     Usage:  (1) v_axisenlarge(1.05)    % enlarge axes by 5% in each direction
             (2) v_axisenlarge(-1.05)   % shrink to fit content before enlarging

     Inputs:
        f      enlarge axis by a factor f relative to current size or
               by -f relative to the graph content. For separate factors
               in each direction use [fx fy fz] or [fleft fright fbottom ftop fdown fup]
        h      axis handle [default = gca]

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- v_activlev V_ACTIVLEV Measure active speech level as in ITU-T P.56 [LEV,AF,FSO]=(sp,FS,MODE)
- v_estnoiseg V_ESTNOISEG - estimate MMSE noise spectrum [x,zo]=(yf,tz,pp)
- v_estnoisem V_ESTNOISEM - estimate noise spectrum using minimum statistics
- v_filtbankm V_FILTBANKM determine matrix for a linear/mel/erb/bark-spaced v_filterbank [X,IL,IH]=(P,N,FS,FL,FH,W)
- v_gaussmixg V_GAUSSMIXG global mean, variance and mode of a GMM
- v_gaussmixt V_GAUSSMIXT Multiply two GMM pdfs
- v_glotlf V_GLOTLF Liljencrants-Fant glottal model U=(D,T,P)
- v_phon2sone V_PHON2SONE convert PHON loudness values to SONEs s=(p)
- v_psycest V_PSYCEST estimate multiple psychometric functions
- v_sone2phon V_PHON2SONE convert SONE loudness values to PHONs p=(s)
- v_stdspectrum V_STDSPECTRUM Generate standard acoustic/speech spectra in s- or z-domain [B,A,SI,SN]=(S,M,F,N,ZI,BS,AS)
- v_stftw V_STFTW converts a time-domain signal into the time-frequency domain with the Short-time Fourier Transform [Y,SO,T,F]=(X,NW,M,OV)
- v_vonmisespdf V_VONMISESPDF Von Mises probability distribution P=(x,m,k)
- v_zerocros V_ZEROCROS finds the zeros crossings in a signal [T,S]=(Y,M,X)

## SOURCE CODE

    0001 function v_axisenlarge(f,h)
    0002 %V_AXISENLARGE - enlarge the axes of a figure (f,h)
    0003 %
    0004 % Usage:  (1) v_axisenlarge(1.05)    % enlarge axes by 5% in each direction
    0005 %         (2) v_axisenlarge(-1.05)   % shrink to fit content before enlarging
    0006 %
    0007 % Inputs:
    0008 %    f      enlarge axis by a factor f relative to current size or
    0009 %           by -f relative to the graph content. For separate factors
    0010 %           in each direction use [fx fy fz] or [fleft fright fbottom ftop fdown fup]
    0011 %    h      axis handle [default = gca]
    0012
    0013 %       Copyright (C) Mike Brookes 2012
    0014 %      Version: $Id: v_axisenlarge.m 10865 2018-09-21 17:22:45Z dmb $
    0015 %
    0016 %   VOICEBOX is a MATLAB toolbox for speech processing.
    0017 %   Home page: http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
    0018 %
    0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    0020 %   This program is free software; you can redistribute it and/or modify
    0021 %   it under the terms of the GNU Lesser General Public License as published by
    0022 %   the Free Software Foundation; either version 3 of the License, or
    0023 %   (at your option) any later version.
    0024 %
    0025 %   This program is distributed in the hope that it will be useful,
    0026 %   but WITHOUT ANY WARRANTY; without even the implied warranty of
    0027 %   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    0028 %   GNU Lesser General Public License for more details.
    0029 %
    0030 %   You can obtain a copy of the GNU Lesser General Public License from
    0031 %   https://www.gnu.org/licenses/ .
    0032 %
    0033 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    0034 fpt=[1 1 1 1 1 1; 1 1 2 2 2 2; 1 1 2 2 3 3; 1 2 3 4 3 4; 1 2 3 4 5 5; 1 2 3 4 5 6];
    0035 if nargin<2 || ~numel(h)
    0036     h=gca;
    0037 end
    0038 if nargin<1 || ~numel(f)
    0039     f=-1.02;
    0040 end
    0041 nf=min(numel(f),6);
    0042 f=f(fpt(nf,:));  % expand f to dimension 4
    0043 if any(f>=0)
    0044     ax0=[get(h,'XLim') get(h,'YLim') get(h,'ZLim')];
    0045 else
    0046     ax0=zeros(1,6);
    0047 end
    0048 if any(f<0)
    0049     axis(h,'tight');
    0050     ax1=[get(h,'XLim') get(h,'YLim')  get(h,'ZLim')];
    0051     ax0(f<0)=ax1(f<0);
    0052     f=abs(f);
    0053 end
    0054 ax1=ax0.*f+ax0([2 1 4 3 6 5]).*(1-f);
    0055 set(h,'XLim',ax1(1:2),'YLim',ax1(3:4),'ZLim',ax1(5:6));