def get_scatter_plot_base_cap_6(save_figure=True, imax=3, strategies=[ "simple graphs", "distance_aux", "local_hubs", "degree_aux", "random" ]): geometries = ["20x500", "100x100"] radius = 20 for s in geometries: for st in strategies: pt.scatter_plot(["5NN", "GG", "RNG", "GPA", "YAO", "ER"], s, st, imax, radius, map="models", legacy=False, save_fig=save_figure)
def get_scatter_plot_find_cap_6(save_figure=True, imax=3, strategies=[ "simple graphs", "distance_aux", "local_hubs", "degree_aux", "random" ], radius=20): geometries = ["20x500", "100x100"] for s in geometries: print("---------------> {}".format(s)) for st in strategies: pt.scatter_plot(["5NN", "GG", "RNG", "GPA", "YAO", "ER"], s, st, imax, radius, map="find", legacy=False, save_fig=save_figure)
def get_scatter_plot_find_cap_7( save_figure=True, imax=3, models=["RNG", "5NN", "GG", "GPA", "YAO", "ER"], strategies=[ "simple graphs", "distance_aux", "local_hubs", "degree_aux", "random" ], sclose=False): geometries = ["20x500"] radius = 20 for s in geometries: for st in strategies: pt.scatter_plot(models, s, st, imax, radius, map="find", legacy=False, save_fig=save_figure, is_seismic=True, chapter=7, autoclose=sclose)
def netsci_scatter_plots(save_fig=True): for imax in [3, 10]: for seismic in [True, False]: plt.scatter_plot(["RNG", "GG", "5NN"], "20x500", "simple graphs", imax, 20, map="models", legacy=False, lv=1, save_fig=save_fig, return_data=False, is_seismic=seismic, chapter=6, autoclose=False) plt.scatter_plot(["RNG", "GG", "5NN"], "20x500", "simple graphs", imax, 20, map="find", legacy=False, lv=1, save_fig=save_fig, return_data=False, is_seismic=seismic, chapter=6, autoclose=False) if seismic: plt.scatter_plot(["RNG", "GG", "5NN"], "20x500", "simple graphs", imax, 20, map="magnitude", legacy=False, lv=1, save_fig=save_fig, return_data=False, is_seismic=seismic, chapter=6, autoclose=False)
lv=1, save_fig=save_fig, return_data=False, is_seismic=seismic, chapter=6, autoclose=False) #netsci_scatter_plots(save_fig=False) plt.scatter_plot(["RNG", "GG", "5NN"], "20x500", "simple graphs", 3, 20, map="models", legacy=False, lv=1, save_fig=False, return_data=False, is_seismic=True, chapter=6, autoclose=False) plt.scatter_plot(["RNG", "GG", "5NN"], "20x500", "simple graphs", 10, 20, map="models", legacy=False, lv=1, save_fig=False,
def get_hdla_tables_cap6(imax, radius=20): a = radius / 20 if a == 1.0: a = "1" number_of_hdla = {} hdla_range = {} strategies = [ "simple graphs", "distance_aux", "local_hubs", "degree_aux", "random" ] st_name = { "simple graphs": "Original", "distance_aux": "Distance", "local_hubs": "Local hubs", "degree_aux": "Degree", "random": "Random" } geometries = ["20x500", "100x100"] s_name = {"20x500": "(1:25)", "100x100": "(1:1)"} for s in geometries: number_of_hdla[s] = {} hdla_range[s] = {} for st in strategies: hdla_range[s][st] = {} number_of_hdla[s][st] = pt.scatter_plot( ["5NN", "GG", "RNG", "GPA", "YAO", "ER"], s, st, imax, radius, map="find", legacy=False, save_fig=False, return_data=True) higher, lower = pt.scatter_plot( ["5NN", "GG", "RNG", "GPA", "YAO", "ER"], s, st, imax, radius, map="models", legacy=False, save_fig=False, return_data=True) hdla_range[s][st]['high'] = higher hdla_range[s][st]['low'] = lower # print table ## headers print("\\begin{table}[h]") print("\\centering") print("\\makebox[\\linewidth]{\\small") print("\\tabcolsep = 0.11cm") print("\\begin{tabular}{|l|l|l|l|l|l|l|l|l|l|l|}") print("\\hline") print( "\\multicolumn{11}{|c|}{$I_{max}=" + str(imax) + "$} \\\\ \\hline" ) print("\\multirow{2}{*}{$s$} &") print(" \\multirow{2}{*}{$st$} &") print(" \\multicolumn{7}{l|}{Number of HDLA} &") print(" \\multirow{2}{*}{$G_L$ range (HDLA)} &") print(" \\multirow{2}{*}{$G_L$ range (Non-HDLA)} \\\\ \\cline{3-9}") print( " & & Total & RNG & GG & GPA & 5NN & YAO & ER & & \\\\ \\hline" ) ordered_columns_hdla_number = [ 'total', 'RNG', 'GG', 'GPA', '5NN', 'YAO', 'ER' ] ordered_ranges = ['low', 'high'] for s in geometries: line = "\\multirow{5}{*}{" + s_name[s] + "} " for st in strategies: line += "& {} ".format(st_name[st]) for hdla_col in ordered_columns_hdla_number: line += "& {} ".format(number_of_hdla[s][st][hdla_col]) for this_range in ordered_ranges: if len(hdla_range[s][st][this_range]) > 0: min_r = round(min(hdla_range[s][st][this_range]), 3) max_r = round(max(hdla_range[s][st][this_range]), 3) if 0.5034 > min_r >= 0.503: min_r = 0.5 if 0.5034 > max_r >= 0.503: max_r = 0.5 line += "& $({},{})$ ".format(min_r, max_r) else: line += "& $\phi$ " if st != "random": line += "\\\\ \\cline{2-11} " else: line += "\\\\ \\hline" print(line) line = " " print("\\end{tabular}") print("}") print( "\\caption[$G_L$ ranges of HDLA and non-HDLA $(I_{max}=3,a=" + str(a) + ")$]{$G_L$ ranges of HDLA, and LA minus HDLA (Non-HDLA) of systems with and without physical links added for $I_{" "max}=" + str(imax) + "$, and $a=" + str(a) + "$.}") print("\\label{tab:LA-ranges-imax-" + str(imax) + "-a" + str(a) + "}") print("\\end{table}")