Changed the 2d visualization code.