Made the print graphic function slightly more concise.