Skip to content

Instantly share code, notes, and snippets.

@cainanyang
Created April 23, 2014 14:11
Show Gist options
  • Save cainanyang/11216679 to your computer and use it in GitHub Desktop.
Save cainanyang/11216679 to your computer and use it in GitHub Desktop.
看看gamma函数的图形是不是(x-1)!
from scipy.special import gamma as Gamma
from pylab import *
def f1(x):
return Gamma(x)
x = linspace(-10, 10, 512)
y1 = f1(x)
gca().set_autoscale_on(False)
# Matlab-style syntax:
plot(x, y1)
xlabel('x')
ylabel('y')
# legend(r'$\Gamma(x)$')
axis([-10, 10, -100, 1000])
grid(True)
show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment