Created
October 5, 2016 04:06
-
-
Save Softwave/ac456f2eed77024fe48705b1a26bae12 to your computer and use it in GitHub Desktop.
plotting.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# program that graphs tribble population growth | |
from pylab import * | |
import math | |
def p(t): | |
return math.e ** (0.2 * t) | |
xthing = arange(1.0, 72.0, 0.1) | |
ything = p(xthing) | |
print(p(72)) | |
plot(xthing, ything) | |
xlabel('time (hours)') | |
ylabel('number of tribbles') | |
title('Tribble population growth') | |
grid(True) | |
show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment