Call as myaxposf(amy) or myaxposf amy = 0 or [] for tight axis amy = 1 for vertical tight axis amy = 2 for horizontal tight axis amy = 3 for both loose axis amy >= 4 for default position set by matlab @Rezaul