Ejemplo n.º 1
0
def _plot(p1_infiles,p2_infiles2,bottom_label,left_label,tau_b=1000):
    fig = plt.figure(figsize=(12,9))
    ax_host = SubplotHost(fig, 1,1,1)
    fig.add_subplot(ax_host)
    for p1_file, p2_file in zip(p1_infiles,p2_infiles):
        p1, p2 = get_ave_ste(p1_file, p2_file, tau_b=1000)
        ax_host.errorbar(p1[0],p2[0], xerr=p1[1], yerr=p2[1],label=p1_file[:4])
        ax_host.text(p1[0]*1.02,p2[0]*1.02,p1_file[:7])
    ax_host.axis["bottom"].set_label(bottom_label)
    ax_host.axis["left"].set_label(left_label)
    ax_host.grid()
    # if wanna legend, uncomment the following line
    # plt.legend()
    plt.show()
Ejemplo n.º 2
0
            (Names[idx], '\n[Mg# ', '{:.1f}'.format(MgNumber[idx]), ', ',
             '{:.2f}'.format(FeOwt[idx]), '% FeO]'))

#        label = ''.join((Names[idx], '\nMg# ', '{:.1f}'.format(MgNumber[idx]),
#                         '\nFeO wt%: ',
#                        '{:.2f}'.format(FeOwt[idx])))
#    else:
#        xyloc = (x[idx], -11.5)
#        label = ''.join((Names[idx], '\nMg# 74-78',
#                         '\nFeO wt %: ',
#                        '{:.2f}'.format(FeOwt[idx])))

#    ax.annotate(label[idx], xy=xyloc, xytext=xytextloc[idx],
#                arrowprops=dict(facecolor='black', arrowstyle='->'))

ax.text(-1.55, -14.4, label[0], ha='left')
ax.text(-1.175, -11.2, label[1], ha='right')
ax.text(-0.7, -10.65, label[2], ha='center')
ax.text(-1.38, -13.2, label[3], ha='left')
ax.text(-0.7, -12.9, label[4], ha='center')
ax.text(-1.65, -16.1, label[6], ha='left')
ax.text(-0.49, -11.95, label[7], ha='left')

### Jaipur slow direction
ax.plot(x[1], JaipurSlow, **style[1])
ax.text(-1.175, JaipurSlow, 'Jaipur || b', ha='right', va='center')

### Fuego
FuegoLoc = FuegoLoc = (x[-1], (bulk[1] + JaipurSlow) / 2.)
ax.add_artist(Ellipse(FuegoLoc, 0.06, 1., facecolor='none'))
                 -11.1, 
                 Jaipur.whatIsD(Celsius, orient='y')
                 ])

# Jaipur diopside fast direction
#ax.plot(np.log10(0.016), Jaipur.whatIsD(Celsius, orient='x'), **Jaipur.basestyle)
#ax.text(-1.55, -10.8, 'Jaipur diopside\nfast direction', ha='center')

# augite PMR-53
#ax.plot(np.log10(0.026), -11.02, **PMR.basestyle)
#ax.text(-1.75, -11.3, 'augite\nPMR-53',)

# Nushan cpx
#ax.plot(np.log10(0.204), Nushan.whatIsD(Celsius, orient='z'), **Nushan.basestyle) 
ax.plot(np.log10(0.154), Nushan.whatIsD(Celsius, orient='z'), **Nushan.basestyle)
ax.text(-0.7, -12.35, unicode('N\374shan\ncpx', 'latin-1'), ha='center')

# Fuego cpx
#FuegoLoc = (np.log10(0.133), (Jaipur.whatIsD(Celsius, orient='x')+Jaipur.whatIsD(Celsius, orient='y'))/2.)
FuegoLoc = (np.log10(0.066), (Jaipur.whatIsD(Celsius, orient='x')+Jaipur.whatIsD(Celsius, orient='y'))/2.)
ax.add_artist(Ellipse(FuegoLoc, 0.06, 1., facecolor='none', edgecolor='k'))
#ax.text(-0.95, -11.5, 'Fuego\nphenocryst', ha='right')
ax.text(-1.225, -10.85, 'Fuego phenocryst', ha='right', rotation=90)

# Xenoliths
#xenoMin = np.log10(0.11 - 0.035)
#xenoMax = np.log10(0.11 + 0.035)
xenoMin = np.log10(0.07 - 0.045)
xenoMax = np.log10(0.07 + 0.045)
xenoDrange = 1.
xenoDmin = Nushan.whatIsD(Celsius, orient='z')-0.05
Ejemplo n.º 4
0
        str_cs = "+"
        if i == impacting_electron.nearest:
            symbol = "rs"
        else:
            symbol = "ro"
    else:
        str_elem = "e"
        symbol = "bo"
        str_cs = ""

    # Potential
    if plot_V:
        ax_V_Eh.plot(all_particles[i].pos, all_particles[i].V, symbol)
        ax_V_Eh.text(
            all_particles[i].pos,
            all_particles[i].V,
            r" $" + str_elem + "_{" + str(i) + "}\ (" + str(all_particles[i].cs) + str_cs + ")$",
            horizontalalignment="left",
        )
    # Energy
    # if (plot_U):
    #    ax_U_Eh.plot(all_particles[i].pos, all_particles[i].U(), symbol)
    #    ax_U_Eh.text(all_particles[i].pos, all_particles[i].U(), r' $' + str_elem + '_{' + str(i) + '}\ (' + str(all_particles[i].cs) + str_cs + ')$', horizontalalignment = "center")


# ******************************************************************************
# Potential plot
# ******************************************************************************

if plot_V:
    # Total potential
    ax_V_Eh.plot(r, Vtot, "-k", label=r"$V_{tot}$")
Ejemplo n.º 5
0
        label[idx] = ''.join((Names[idx], '\n[Mg# ', '{:.1f}'.format(MgNumber[idx]),
                     ', ', '{:.2f}'.format(FeOwt[idx]), '% FeO]'))

#        label = ''.join((Names[idx], '\nMg# ', '{:.1f}'.format(MgNumber[idx]),
#                         '\nFeO wt%: ', 
#                        '{:.2f}'.format(FeOwt[idx])))
#    else:
#        xyloc = (x[idx], -11.5)
#        label = ''.join((Names[idx], '\nMg# 74-78',
#                         '\nFeO wt %: ', 
#                        '{:.2f}'.format(FeOwt[idx])))

#    ax.annotate(label[idx], xy=xyloc, xytext=xytextloc[idx],
#                arrowprops=dict(facecolor='black', arrowstyle='->'))

ax.text(-1.55, -14.4, label[0], ha='left')
ax.text(-1.175, -11.2, label[1], ha='right')
ax.text(-0.7, -10.65, label[2], ha='center')
ax.text(-1.38, -13.2, label[3], ha='left')
ax.text(-0.7, -12.9, label[4], ha='center')
ax.text(-1.65, -16.1, label[6], ha='left')
ax.text(-0.49, -11.95, label[7], ha='left')

### Jaipur slow direction
ax.plot(x[1], JaipurSlow, **style[1])
ax.text(-1.175, JaipurSlow, 'Jaipur || b', ha='right', va='center')

### Fuego
FuegoLoc = FuegoLoc = (x[-1], (bulk[1] + JaipurSlow)/2.)
ax.add_artist(Ellipse(FuegoLoc, 0.06, 1., facecolor='none'))