correct an error in taking encoding scheme that made x axis inversed