plots.py 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. import functions as r
  4. ##### Figure 2 #####
  5. # load data for Fig2A
  6. sims=np.load('coefC_tau_th.npy',allow_pickle=True)
  7. # plot Fig2A
  8. # uncomment ax.invert_xaxis() in the function "first_approx"
  9. # in the function "first_approx", the variables A and B must end in "_fixedy"
  10. # in the function "first_approx", the variable X must be paratemeters1
  11. fig1,fig2,fig5,fig6,fig7,fig8,fig9,fig10=r.first_approx(sims)
  12. # load data for Fig2B
  13. sims=np.load('d_tau_th.npy',allow_pickle=True)
  14. # plot Fig2B
  15. # uncomment ax.invert_xaxis() in the function "first_approx"
  16. # in the function "first_approx", the variables A and B must end in "_fixedy"
  17. # in the function "first_approx", the variable X must be paratemeters1
  18. fig1,fig2,fig5,fig6,fig7,fig8,fig9,fig10=r.first_approx(sims)
  19. # load data for Fig2C
  20. sims=np.load('coefC_tau_th.npy',allow_pickle=True)
  21. # plot Fig2C
  22. # comment ax.invert_xaxis() in the function "first_approx"
  23. # in the function "first_approx", the variables A and B must end in "_fixedx"
  24. # in the function "first_approx", the variable X must be paratemeters2
  25. fig1,fig2,fig5,fig6,fig7,fig8,fig9,fig10=r.first_approx(sims)
  26. ##### Figure 3 #####
  27. # load data for Fig3A
  28. sims=np.load('coefC_d.npy',allow_pickle=True)
  29. # plot Fig3A
  30. fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6=r.dif_2d(sims)
  31. r.ns_region(sims,fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6)
  32. ##### Figure 4 #####
  33. # load data for Fig4B
  34. sims=np.load('w1-w2_recurrentv2.npy',allow_pickle=True)
  35. # plot Fig4B
  36. p1=1.0
  37. p2=1.0
  38. fig8, fig9, fig10, fig11, k = r.one_combi(sims,p1,p2)
  39. # load data for Fig4C
  40. sims=np.load('w1-w2_recurrentv2.npy',allow_pickle=True)
  41. # plot Fig4C top
  42. # comment ax.invert_xaxis() in the function "first_approx"
  43. # in the function "first_approx", the variables A and B must end in "_fixedx"
  44. # in the function "first_approx", the variable X must be paratemeters2
  45. fig1,fig2,fig5,fig6,fig7,fig8,fig9,fig10=r.first_approx(sims)
  46. # plot Fig4C bottom
  47. # comment ax.invert_xaxis() in the function "first_approx"
  48. # in the function "first_approx", the variables A and B must end in "_fixedy"
  49. # in the function "first_approx", the variable X must be paratemeters1
  50. fig1,fig2,fig5,fig6,fig7,fig8,fig9,fig10=r.first_approx(sims)
  51. # load data for Fig4D-E
  52. sims=np.load('w1-w2_recurrentv2.npy',allow_pickle=True)
  53. # plot Fig4D-E
  54. fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6=r.dif_2d(sims)
  55. r.ns_region(sims,fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6)
  56. ##### Figure 10 #####
  57. # load data for Fig10A-B
  58. sims=np.load('coefC-HF_d-HF.npy',allow_pickle=True)
  59. # plot Fig10A-B
  60. fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6=r.dif_2d(sims)
  61. r.ns_region(sims,fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6)
  62. # plot Fig10C
  63. p1=0.5
  64. p2=1.7
  65. fig8, fig9, fig10, fig11, k = r.one_combi(sims,p1,p2)
  66. # load data for Fig10D-E-F-G
  67. sims=np.load('coefC-HF_d-HF.npy',allow_pickle=True)
  68. sims_tauth=np.load('coefC-HF_d-HF_15-tau_th.npy',allow_pickle=True)
  69. # plot Fig10D-E
  70. fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6=r.effect_tauth(sims, sims_tauth)
  71. r.ns_region(sims_tauth,fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6,sims)
  72. # plot Fig10F-G
  73. p1=0.5
  74. p2=1.7
  75. fig8, fig9, fig10, fig11, k = r.one_combi(sims_tauth,p1,p2,sims)
  76. ##### Figure 11 #####
  77. # load data for Fig11D model A
  78. sims=np.load('modelA_coefC-HF-d_HF.npy',allow_pickle=True)
  79. sims_tauth=np.load('modelA_coefC-HF-d_HF_15-tauth.npy',allow_pickle=True) # _15-tau_th
  80. # plot Fig11D model A
  81. fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6=r.effect_tauth(sims, sims_tauth)
  82. r.ns_region(sims_tauth,fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6,sims)
  83. # load data for Fig11D model B
  84. sims=np.load('modelB_coefC-HF-d_HF.npy',allow_pickle=True)
  85. sims_tauth=np.load('modelB_coefC-HF-d_HF_15-tauthv2.npy',allow_pickle=True)
  86. # plot Fig11D model B
  87. fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6=r.effect_tauth(sims, sims_tauth)
  88. r.ns_region(sims_tauth,fig1,ax1,fig2,ax2,fig3,ax3,fig4,ax4,fig5,ax5,fig6,ax6,sims)