Added partial support for 3d graphing. Not functional.