In [9]:
x_grid = np.linspace(-10,10,20)
y_grid = np.linspace(-10,10,20)
x_mesh, y_mesh = np.meshgrid(x_grid, y_grid)
In [10]:
plt.scatter(x_mesh,y_mesh, c=y_mesh)
plt.axis('equal') 
Out[10]:
(-11.009856630824373,
 11.009856630824371,
 -11.015176600441501,
 11.0151766004415)
In [11]:
#streching along the x axis
A2 = np.zeros((2,2))
A2[0,0] = 2
A2[1,1] = 1

X_new_mesh_2 = A2[0,0] * x_mesh + A2[0,1] * y_mesh
Y_new_mesh_2 = A2[1,0] * x_mesh + A2[1,1] * y_mesh

plt.scatter(X_new_mesh_2,Y_new_mesh_2, c=y_mesh)
plt.axis('equal')
Out[11]:
(-22.00985663082437, 22.009856630824373, -11.015176600441501, 11.0151766004415)