Esempio n. 1
0
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
Esempio n. 2
0
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
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] 
	"""
    axes = visuals.subplots(1, 3, figsize=(21, 7))
    axes.insert(1, visuals.append_subplot_below(axes[0]))
    visuals.set_labels_4axes(axes, "O")
    visuals.hide_xticklabels(axes[0])
    axes[0].set_ylim([-1, 16])
    axes[0].set_xlim([-1, 11])
    axes[1].set_ylim([1.3, 2.5])
    axes[2].set_xlim([-1.7, 0.1])
    axes[2].set_ylim([0., 0.5])
    axes[3].set_xlim([-0.1, 0.5])
    axes[3].set_ylim([0.15, 50])
    axes[1].yaxis.set_ticks([1.4, 1.6, 1.8, 2.0, 2.2, 2.4])
    axes[1].xaxis.set_ticks(list(range(0, 12, 2)))
    return axes
Esempio n. 4
0
import sys
import warnings
warnings.filterwarnings("ignore")

if __name__ == "__main__":
	axes = visuals.subplots(1, 3, figsize = (21, 7))
	axes.insert(1, visuals.append_subplot_below(axes[0]))
	axes[0].xaxis.set_ticks([0, 2, 4, 6, 8, 10])
	axes[0].set_xlim([-1, 11])
	axes[0].set_ylim([2.1, 3.6])
	axes[1].set_ylim([1.3, 2.7])
	axes[2].set_xlim([-1.7, 0.2])
	axes[2].set_ylim([-0.1, 0.5])
	axes[3].set_xlim([-0.1, 0.5])
	axes[3].set_ylim([0.2, 50])
	visuals.set_labels_4axes(axes, "O")
	inset_xlim = [-0.26, -0.06]
	inset_ylim = [0.06, 0.16]
	visuals.draw_box(axes[2], inset_xlim, inset_ylim)
	inset = visuals.zoom_box(axes[2], inset_xlim, inset_ylim, zoom = 3.8)
	visuals.plot_output_4axes(axes,
		"../../simulations/SFEoscil_amp0p2_per4", "crimson", "O")
	visuals.plot_output_4axes(axes,
		"../../simulations/SFEoscil_amp0p4_per2", "blue", "O")
	visuals.plot_output_4axes(axes,
		"../../simulations/SFEoscil_amp0p2_per2", "black", "O")
	visuals.plot_inset(inset,
		"../../simulations/SFEoscil_amp0p2_per4", "crimson")
	visuals.plot_inset(inset,
		"../../simulations/SFEoscil_amp0p4_per2", "blue")
	visuals.plot_inset(inset,