import matplotlib.pyplot as plt import scipy as sc def fullPlot(eps, sig, epsP, deps): print("Ploting results ...") fig, axs = plt.subplots(1, 4, figsize=(20,9)) plt.subplots_adjust(wspace=0.5) plt.rcParams.update({'font.size': 24}) # Draw axis for k in range(0, 4): axs[k].grid() axs[k].axvline(color = 'black') axs[k].axhline(color = 'black') # Plot 1 axs[0].title.set_text("$\\varepsilon \\to \sigma$") axs[0].set_xlabel("$\\varepsilon$") axs[0].set_ylabel("$\sigma \, (MPa)$") axs[0].plot(eps, sig) # Plot 2 axs[1].title.set_text("$\\varepsilon \\to \\varepsilon_p$") axs[1].set_xlabel("$\\varepsilon$") axs[1].set_ylabel("$\\varepsilon_p$") axs[1].plot(eps, epsP) # Plot 3 axs[2].title.set_text("$\\varepsilon_p \\to \sigma$") axs[2].set_xlabel("$\\varepsilon_p$") axs[2].set_ylabel("$\sigma \, (MPa)$") axs[2].plot(epsP, sig) # Plot 4 axs[3].title.set_text("$k \\to d\\varepsilon_p$") axs[3].set_xlabel("k") axs[3].set_ylabel("$d\\varepsilon_p$") axs[3].plot(deps, marker='+') # Better scale xadd = 0.2 yadd = 0.2 for k in range(0, 4): lft, rig = axs[k].get_xlim() lft -= xadd axs[k].set_xlim(lft, rig) lft, rig = axs[k].get_ylim() lft -= yadd rig += yadd axs[k].set_ylim(lft, rig) plt.show()