Dec-09-2017, 05:45 PM
(This post was last modified: Dec-09-2017, 06:24 PM by Afterdarkreader.)
import numpy as np from scipy.stats import lognorm import matplotlib.pyplot as plt from math import exp fig, ax = plt.subplots(1, 1) initialPop = 326300000 popGrowth = 0.007 x= np.linspace(0, 216, num=21600) ax.set_title('cumulative changes in veganism') ax.set_xlabel('$Quarter$') ax.set_ylabel('$Percent of the Population$') ax.plot(x, ((initialPop * np.exp(popGrowth * (x/4)))- lognorm.pdf(x, 0.55, 156, exp(0.05775))*0.1155 - lognorm.pdf(x, 0.55, 1, exp(0.0015))*0.003 - lognorm.pdf(x, 0.55, 80, exp(0.77))*0.154), 'p-', lw=1, alpha=0.6, label='Major Graph')I'm having a problem where the program is graphing everything, but it's not subtracting the lognorm values like I want it to. It's just graphing I think it has to do with the data types, but I'm not sure how to fix that. Any help would be appreciated!

I figured it out on my own :)