pattern diagram formatting