No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

plot_all_the_plots.jl 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. import DelimitedFiles
  2. import PyPlot
  3. """
  4. plot_csv(filename, axis_labels, column; args...)
  5. plots the data from CSV file filename
  6. axis_labels: use the CSV headers as axis labels
  7. column: use the corresponding column as plotted values (y-axis)
  8. """
  9. function plot_csv(file, l=false, column=2; args...)
  10. println(file)
  11. d, h = DelimitedFiles.readdlm(file, ','; header=true)
  12. if size(d,1) == 1 && d[1] == "-"
  13. PyPlot.axhline(d[column]; args...)
  14. else
  15. sorted_idx = sortperm(d[:,1])
  16. println(d)
  17. PyPlot.plot(d[sorted_idx,1], d[sorted_idx,column]; args...)
  18. end
  19. if l
  20. PyPlot.xlabel(h[1])
  21. PyPlot.ylabel(h[column])
  22. end
  23. end
  24. PyPlot.figure()
  25. # kb
  26. PyPlot.subplot(241)
  27. plot_csv("plot_data/before_recompute_nucleus/v_kb_nuc_new.csv", true, label="nuc new μn = 20")
  28. plot_csv("plot_data/before_recompute_nucleus/v_kb_nuc_new_mun60.csv", true, label="nuc new µn=60")
  29. plot_csv("plot_data/before_recompute_nucleus/v_kb_nuc_old.csv", true, label="nuc old μn = 20")
  30. plot_csv("plot_data/before_recompute_nucleus/v_kb_nuc_old_mun60.csv", true, label="nuc old μn=60")
  31. plot_csv("plot_data/before_recompute_nucleus/v_kb_nuc_old_mun100.csv", true, label="nuc old µn=100")
  32. plot_csv("plot_data/before_recompute_nucleus/v_kb_nonuc_mun100.csv", false, label="nonuc μn=100", ls="dotted")
  33. plot_csv("plot_data/before_recompute_nucleus/v_kb_nonuc_mun20.csv", false, label="nonuc μn=20", ls="dotted")
  34. PyPlot.axhline(0.0, lw=0.5, color="black")
  35. PyPlot.legend()
  36. PyPlot.title("Velocity vs kb")
  37. # mu
  38. PyPlot.subplot(242)
  39. plot_csv("plot_data/before_recompute_nucleus/v_A_mu_nuc_old.csv", true, label="nuc old")
  40. plot_csv("plot_data/before_recompute_nucleus/v_A_mu_nonuc.csv", true, label="nonuc", ls="dotted")
  41. PyPlot.axhline(0.0, lw=0.5, color="black")
  42. PyPlot.legend()
  43. PyPlot.title("Velocity vs µn")
  44. PyPlot.subplot(243)
  45. plot_csv("plot_data/before_recompute_nucleus/v_A_mu_nuc_old.csv", true, 3, label="nuc old")
  46. PyPlot.axhline(0.0, lw=0.5, color="black")
  47. PyPlot.legend()
  48. PyPlot.title("Area vs µn")
  49. # kb
  50. PyPlot.subplot(244)
  51. plot_csv("plot_data/before_recompute_nucleus/v_A_KMT_nuc_old.csv", true, label="nuc old")
  52. PyPlot.axhline(0.0, lw=0.5, color="black")
  53. PyPlot.legend()
  54. PyPlot.title("Velocity vs kMT")
  55. # channel depth
  56. PyPlot.subplot(245)
  57. plot_csv("plot_data/before_recompute_nucleus/v_beta_nuc_old.csv", true, label="nuc old")
  58. plot_csv("plot_data/before_recompute_nucleus/v_beta_nuc_new.csv", true, label="nuc new")
  59. plot_csv("plot_data/before_recompute_nucleus/v_beta_nonuc.csv", false, label="nonuc", ls="dotted")
  60. PyPlot.axhline(0.0, lw=0.5, color="black")
  61. PyPlot.legend()
  62. PyPlot.title("Velocity vs f_β")
  63. # channel width
  64. PyPlot.subplot(246)
  65. plot_csv("plot_data/before_recompute_nucleus/v_width_nuc_old.csv", true, label="nuc old")
  66. plot_csv("plot_data/before_recompute_nucleus/v_width_nuc_new.csv", true, label="nuc new")
  67. plot_csv("plot_data/before_recompute_nucleus/v_width_nonuc.csv", false, label="nonuc", ls="dotted")
  68. PyPlot.axhline(0.0, lw=0.5, color="black")
  69. PyPlot.legend()
  70. PyPlot.title("Velocity vs f_width")
  71. # channel pulsation
  72. PyPlot.subplot(247)
  73. plot_csv("plot_data/before_recompute_nucleus/v_omega_nuc_old.csv", true, label="nuc old")
  74. plot_csv("plot_data/v_omega_nuc.csv", true, label="nuc")
  75. PyPlot.axhline(0.0, lw=0.5, color="black")
  76. PyPlot.legend()
  77. PyPlot.title("Velocity vs f_ω")
  78. PyPlot.show()