Guilin Sun
Ansys Employee

As I suggested, the raw data is from the non-iniform mesh. In order to build a linear mesh, you will need to interpolate the date: https://optics.ansys.com/hc/en-us/articles/360034925893-interp-Script-command

I would suggest to first resolve the issues that the result is different from the GUI and script. Once it works, please write a new post for any other questions, as the forum is to have one question one solution.