Advertisement
Guest User

Untitled

a guest
Jun 5th, 2020
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.12 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3.  
  4.  
  5. dist = np.random.normal(0, 1, 1000)
  6.  
  7.  
  8.  
  9. FONT_SIZE = "xx-large"
  10.  
  11. fig = plt.figure(figsize=(16, 26))
  12. fig.tight_layout()
  13.  
  14. gs = fig.add_gridspec(4, 2)
  15.  
  16.  
  17. fig_ax1 = fig.add_subplot(gs[0, 0])
  18.  
  19. # fig_ax1.margins(0, 0)
  20. fig_ax1.boxplot(
  21.     dist,
  22.     notch=True,
  23.     vert=False)
  24.  
  25. fig_ax1.tick_params(
  26.     left=False, labelleft=False)
  27.  
  28. fig_ax1.set_xlabel("$dt_{}$ [seconds]", fontsize="x-large")
  29.  
  30. fig_ax1.set_ylabel("Something", fontsize=FONT_SIZE)
  31.  
  32. # plt.subplots_adjust(left=0.1, right=0.9, top=0.6, bottom=0.4)
  33.  
  34.  
  35.  
  36. fig_ax2 = fig.add_subplot(gs[0, 1])
  37. fig_ax2.boxplot(
  38.     dist,
  39.     notch=True,
  40.     vert=False)
  41.  
  42. fig_ax2.tick_params(
  43.     left=False, labelleft=False)
  44.  
  45. fig_ax2.set_xlabel("$dt_{}$ [seconds]", fontsize="x-large")
  46.  
  47. fig_ax2.set_ylabel("Something", fontsize=FONT_SIZE)
  48.  
  49.  
  50. fig_ax3 = fig.add_subplot(gs[1, 0])
  51. fig_ax3.boxplot(
  52.     dist,
  53.     notch=True,
  54.     vert=False)
  55.  
  56. fig_ax3.tick_params(
  57.     left=False, labelleft=False)
  58.  
  59. fig_ax3.set_xlabel("$dt_{}$ [seconds]", fontsize="x-large")
  60.  
  61. fig_ax3.set_ylabel("Something", fontsize=FONT_SIZE)
  62.  
  63.  
  64. fig_ax4 = fig.add_subplot(gs[1, 1])
  65. fig_ax4.boxplot(
  66.     dist,
  67.     notch=True,
  68.     vert=False)
  69.  
  70. fig_ax4.tick_params(
  71.     left=False, labelleft=False)
  72.  
  73. fig_ax4.set_xlabel("$dt_{}$ [seconds]", fontsize="x-large")
  74.  
  75. fig_ax4.set_ylabel("Something", fontsize=FONT_SIZE)
  76.  
  77.  
  78. fig_ax5 = fig.add_subplot(gs[2, 0])
  79. fig_ax5.hist(
  80.     dist,
  81.     bins=60)
  82.  
  83. fig_ax5.set_xlabel(" Fee [€]", fontsize="x-large")
  84. fig_ax5.set_xlim(0, 0.02)
  85. fig_ax5.set_ylabel("Push", fontsize=FONT_SIZE)
  86.  
  87.  
  88. fig_ax6 = fig.add_subplot(gs[2, 1])
  89. fig_ax6.hist(
  90.     dist,
  91.     bins=60)
  92.  
  93. fig_ax6.set_xlabel("Fee [€]", fontsize="x-large")
  94.  
  95. fig_ax6.set_ylabel("Pull", fontsize=FONT_SIZE)
  96.  
  97.  
  98.  
  99. fig_ax7 = fig.add_subplot(gs[3, :])
  100. fig_ax7.set_title("Round Trip", fontsize="x-large")
  101. fig_ax7.boxplot(
  102.     dist,
  103.     notch=True,
  104.     vert=False)
  105.  
  106. fig_ax7.tick_params(
  107.     left=False, labelleft=False)
  108.  
  109. fig_ax7.set_xlabel("$dt_{Round Trip}$ [seconds]", fontsize="x-large")
  110. fig_ax7.set_ylabel("Round Trip", fontsize="x-large")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement