Added more code to guess the intended plotting system.