Question: only do problem 5, exercise 6 is given below seaborn link: https://seaborn.pydata.org/api.html Problem 5: (6 pts) Recreate your plot from lab exercise 6 using the

only do problem 5, exercise 6 is given below

only do problem 5, exercise 6 is given below seaborn link: https://seaborn.pydata.org/api.htmlProblem 5: (6 pts) Recreate your plot from lab exercise 6 usingthe seaborn package with all of the same plot elements, including plot

seaborn link: https://seaborn.pydata.org/api.html

Problem 5: (6 pts) Recreate your plot from lab exercise 6 using the seaborn package with all of the same plot elements, including plot title, axes titles, and legend. Exercise 6: What happens if in the beginning two people know the rumour? How many people have heard the rumor after 10 hours? Save the number of people that know the rumor each hour until 10 hours have passed. Plot the results of this exercise and the results of exercise 5 on the same plot, where exercise 5 is red and exercise 6 is blue. Include a legend that labels how many people knew the rumor originally, with an appropriate title. In [21]: N_2 = np.zeros(11) N_2[0] = 2 tvec = np.arange(11) for t in tvec[:10]: N_2[t+1] = 3*N_2[t] print(N_2) [2.00000e+00 6.00000e+00 1.80000e+01 5.40000e+01 1.62000e+02 4.86000e+02 1.45800e+03 4.37400e+03 1.31220e+04 3.93660e+04 1.18098e+05] In [22]: plt.plot(tvec, N_1,c="red", marker=",", label="1") plt.ylim(0,120000) plt.plot(tvec,N_2, c="blue", marker=".", label="2") plt.legend ( loc="upper left", title='Initial # of people that know the rumour') plt.xlabel('Time (hours)') plt.ylabel('Individuals that know the rumour') plt.title( 'Rumour Spreading Simulation'); 120000 Rumour Spreading Simulation Initial # of people that know the rumour 1 2 100000 80000 Individuals that know the rumour 60000 40000 20000 o 0 2 8 10 4 6 Time (hours)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!