Basic graphing implemented but incorrect