Commit 8131d12e authored by Leon Pyka's avatar Leon Pyka
Browse files

plotting log-scale now

parent 7dae57e5
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -46,19 +46,23 @@ def plot_current_and_toughness(filepaths_dict : dict):
    print(hierarchical_array[:,0])

    axs[0].errorbar(hierarchical_array[:,0], hierarchical_array[:,1], yerr = hierarchical_array[:,2],
                    fmt='x', color = 'black')
                    fmt='x', capsize=5.0, color = 'black')
    axs[0].errorbar(random_reference_array[:,0], random_reference_array[:,1], yerr = random_reference_array[:,2],
                   fmt='o', color = 'grey')
                   fmt='o', capsize=5.0, color = 'grey')
    axs[1].errorbar(hierarchical_array[:,0], hierarchical_array[:,3], yerr = hierarchical_array[:,4],
                    fmt='x', color = 'black', label = "hierarchical")
                    fmt='x', capsize=5.0,color = 'black', label = "hierarchical")
    axs[1].errorbar(random_reference_array[:,0], random_reference_array[:,3], yerr = random_reference_array[:,4],
                   fmt='o', color = 'grey', label = "random same density per layer")
                   fmt='o', capsize=5.0,color = 'grey', label = "random same density per layer")
    
    axs[0].set_xlabel("Crack length")
    axs[1].set_xlabel("Crack length")
    axs[0].set_ylabel("Peak current")
    axs[1].set_ylabel("Toughness")
    axs[1].legend()
    axs[0].set_xscale('log')
    axs[0].set_xticks([5,10,20,40,80], labels=[5,10,20,40,80])
    axs[1].set_xscale('log')
    axs[1].set_xticks([5,10,20,40,80], labels=[5,10,20,40,80])
    plt.show()
    fig.savefig("current_toughness_crack_lenghts.png")