def sinwave ( n = 4 , inc = .25 ) : x = np . arange ( - n , n , inc ) y = np . arange ( - n , n , inc ) X , Y = np . meshgrid ( x , y ) R = np . sqrt ( X ** 2 + Y ** 2 ) Z = np . sin ( R ) / ( .5 * R ) return pd . DataFrame ( Z , index = x , columns = y )
plot a sine wave of given freq and aplitude in python
Returns a DataFrame with the required format for a surface ( sine wave ) plot
def sinwave(n=4,inc=.25):
	"""
	Returns a DataFrame with the required format for 
	a surface (sine wave) plot

	Parameters:
	-----------
		n : int
			Ranges for X and Y axis (-n,n)
		n_y : int
			Size of increment along the axis
	"""	
	x=np.arange(-n,n,inc)
	y=np.arange(-n,n,inc)
	X,Y=np.meshgrid(x,y)
	R = np.sqrt(X**2 + Y**2)
	Z = np.sin(R)/(.5*R)
	return pd.DataFrame(Z,index=x,columns=y)