I ran a series of simulations and want to create a response surface of the performance based off my two parameters, tol and eta. The issue I'm having is actually plotting this in python. I have the vectors vec_tol (of dimension nx1) and vec_eta (mx1), and two matrices of the performance t_osa_adj (dimension nxm) and sdn_osa_sol (also nxm). I would like to plot a surface plot of [x,y,z] = [vec_tol,vec_eta,t_osa_adj] colored by sdn_osa_sol and I keep running into this error in python:
"ValueError: shape mismatch: objects cannot be broadcast to a single shape. Mismatch is between arg 0 with shape (16,) and arg 1 with shape (10,)."
My understanding is that this is because for the plot_surface command to work n must be equal to m. How do I fix this? I have put a snippet of the code below.
fig = plt.figure(figsize = (8, 7), facecolor='white')
ax = fig.add_subplot(projection='3d')
surf = ax.plot_surface(vec_tol, vec_eta, t_osa_adj, facecolors = cm.jet(np.log(sdn_osa_sol)), linewidth=0, antialiased=False)
Thank you.