Problem in plot

Hello everyone, my problem is that countering is not smooth, I want to eliminate point shapes as indicated by A2, A3, A5, A6, and A7 in the SECTION.png.
Using grdimage, I tried many options of interpolation, but no way.
I am deeply hoping to get a solution.

I appreciate any help you can provide.
my code and data are attached below.

x-y-z.TXT (632.0 KB)

import pygmt
with open("x-y-z.TXT", "r") as file2:
    xyz_coords = [list(map(float, line.split())) for line in file2]
x_coords2 = [point[0] for point in xyz_coords]
y_coords2 = [point[1] for point in xyz_coords]
z_coords2 = [point[2] for point in xyz_coords]

regions = [0.0, 20000, 0, 4000]
frames = "af"
dpis = '50'
bitcolors = '255'
projections = "X10i/-3i"

fig = pygmt.Figure()

data = pygmt.blockmean(x=x_coords2, y=y_coords2, z=z_coords2, spacing=(10, 10), region=regions)
grid = pygmt.surface(data=data, spacing=(10, 10), lower='30', upper='3900', region=regions)

    fig.grdimage(grid=grid, projection=projections, interpolation="b", cmap="no_green", dpi=dpis, bitcolor=bitcolors)
    fig.colorbar(frame=["a1000", "y+lz"], truncate=[30, 3900], position = "x0.0/-0.6+w7c/0.3c+h")
    fig.basemap(region=regions, projection=projections, frame=["WsNe","xaf+lx","ya1000f500+ly"])


your profile data look not good for what you are doing, many identical values with abrupt stepwise changes. plot and check the individual profiles or just scroll through your text file.

in other words, you should do something with your data and/or adjust interpolation method (surface) and probably test interpolation methods other than surface. This is nothing grdimage can help you with.

see example 16 maybe also example 12 and 14 in the gmt illustration gallery. The example data is nothing like yours (example data are arbitrarily spaced while your are not) but you can get some idea of how you can choose and adjust interpolation method.