def setup_axes(): """ Sets up the 3x2 axis grid with the proper axis labels and ranges Returns ======= axes :: list The axes, indexable via axes[row number][column number] """ axes = visuals.subplots(2, 3, figsize=(21, 14)) for i in range(2): axes[i][0].xaxis.set_ticks([0, 2, 4, 6, 8, 10]) axes[i][0].set_xlim([-1, 11]) axes[i][1].set_xlim([-1.7, 0.2]) axes[i][1].set_ylim([-0.1, 0.5]) axes[i][2].set_xlim([-0.1, 0.5]) axes[i][2].set_ylim([0.2, 50]) axes[0][1].set_ylim([0.0, 0.5]) axes[0][2].set_xlim([0.0, 0.5]) axes[1].insert(1, visuals.append_subplot_below(axes[1][0])) axes[0][0].set_ylim([-1, 15]) axes[1][0].set_ylim([-1, 7]) axes[1][1].set_ylim([0.8, 2.2]) visuals.set_labels_3axes(axes[0], "O") visuals.set_labels_4axes(axes[1], "O") return axes
def setup_axes(): """ Sets up the 3x2 axis grid with the proper axis labels and ranges and the associated insets Returns ======= axes :: list The axes, indexable via axes[row number][column number] insets :: list The insets, indexable via insets[row number] """ inset_xlim = [-0.26, -0.06] inset_ylim = [0.06, 0.16] axes = visuals.subplots(2, 3, figsize=(21, 14)) insets = 2 * [None] for i in range(2): axes[i][0].xaxis.set_ticks(list(range(0, 12, 2))) axes[i][0].set_xlim([-1, 11]) axes[i][0].set_ylim([-1, 17]) axes[i][1].set_xlim([-1.7, 0.2]) axes[i][1].set_ylim([0.0, 0.5]) axes[i][2].set_xlim([0.0, 0.5]) axes[i][2].set_ylim([0.2, 50]) axes[i][2].set_yscale("log") visuals.draw_box(axes[i][1], inset_xlim, inset_ylim) insets[i] = visuals.zoom_box(axes[i][1], inset_xlim, inset_ylim, zoom=3.5) axes[0].insert(1, visuals.append_subplot_below(axes[0][0])) visuals.set_labels_3axes(axes[1], "O") visuals.set_labels_4axes(axes[0], "O") axes[0][0].set_ylim([2.1, 3.7]) axes[0][1].set_ylim([1.3, 2.7]) axes[1][0].yaxis.set_ticks(list(range(0, 18, 2))) return axes, insets
out.mdf["bin_edge_right"])), out.mdf["dn/d[O/Fe]"], c=visuals.colors()[color]) if __name__ == "__main__": axes = visuals.subplots(1, 3, figsize=(21, 7)) axes[0].xaxis.set_ticks([0, 2, 4, 6, 8, 10]) axes[0].yaxis.set_ticks([0, 2, 4, 6, 8, 10, 12, 14, 16, 18]) axes[0].set_xlim([-1, 11]) axes[0].set_ylim([-1, 17]) axes[1].set_xlim([-1.7, 0.2]) axes[1].set_ylim([-0.1, 0.5]) axes[2].set_xlim([-0.1, 0.5]) axes[2].set_ylim([0.2, 50]) visuals.set_labels_3axes(axes, "O") inset_xlim = [-0.26, -0.06] inset_ylim = [0.06, 0.16] visuals.draw_box(axes[1], inset_xlim, inset_ylim) inset = visuals.zoom_box(axes[1], inset_xlim, inset_ylim, zoom=3.8) plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p3_per4", "crimson") plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p6_per2", "blue") plot_output_3axes(axes, "../../simulations/SFRoscil_amp0p3_per2", "black") visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p3_per4", "crimson") visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p6_per2", "blue") visuals.plot_inset(inset, "../../simulations/SFRoscil_amp0p3_per2", "black") visuals.plot_inset(inset, "../../simulations/default",