matplotlib plotting python
import numpy as np
import matplotlib.pyplot as plt
fig, axs = plt.subplots(nrows=2, ncols=2)
axs[0, 0].plot(ax1,color='b', alpha=0.5)
axs[0, 1].plot(ax2,color='g', alpha=0.5 )
axs[1, 0].plot(ax3,color='y', alpha=0.5)
axs[1, 1].plot(ax4,color='r', alpha=0.5 )
fig.tight_layout()
plt.show()
########################################
import numpy as np
import matplotlib.pyplot as plt
fig, axs = plt.subplots(nrows=3, ncols=2, figsize=(7, 7))
# plot time signal:
axs[0, 0].set_title("Signal")
axs[0, 0].hist(ax1, color='C0')
axs[0, 0].set_xlabel("Time")
axs[0, 0].set_ylabel("Amplitude")
# plot different spectrum types:
axs[1, 0].set_title("Magnitude Spectrum")
axs[1, 0].hist(ax2, color='C1')
axs[1, 1].set_title("Log. Magnitude Spectrum")
axs[1, 1].hist(ax3, color='C1')
axs[2, 0].set_title("Phase Spectrum ")
axs[2, 0].hist(ax4, color='C2')
axs[2, 1].set_title("Angle Spectrum")
axs[2, 1].hist(ax5, color='C2')
axs[0, 1].remove() # don't display empty ax
fig.tight_layout()
plt.show()