for x, y, z in all_vals:
    x = find_in_sorted_list(x, xvals)
y = find_in_sorted_list(y, yvals)
Z1[y, x] = z
surf = ax.plot_surface(X, Y, Z1, rstride=1, cstride=1, cmap=cm.jet,
    linewidth=0, antialiased=False)
plt.xlabel('Blur standard deviation')
plt.ylabel('JPEG quality')
ax.w_zaxis.set_major_locator(LinearLocator(10))
ax.w_zaxis.set_major_formatter(FormatStrFormatter('%.03f'))
fig.colorbar(surf, shrink=0.5, aspect=5)
plt.show()
Как сделать 3D-графики в Python?