Exemplo n.º 1
0
                          left=0.08,
                          right=0.95,
                          bottom=0.05,
                          top=0.95,
                          wspace=0.18,
                          hspace=0.3)
    ax1 = fig.add_subplot(gs[0, 0])
    #ax3 = fig.add_subplot(gs[1,0])
    #ax4 = fig.add_subplot(gs[1,1])
    xs = np.linspace(0, 50, 51)

    lines = {}
    lines['P'], = ax1.plot([], [], marker='+', linestyle='', label='Branche P')
    lines['R'], = ax1.plot([], [], marker='+', linestyle='', label='Branche R')
    lines['ref'], = ax1.plot([], [],
                             marker='',
                             linestyle='-',
                             label='$\omega_0$')

    textsR = []
    textsP = []
    for x in xs:
        textsR.append(ax1.text(0, 0, str('{}'.format(int(x)))))
        textsP.append(ax1.text(0, 0, str('{}'.format(int(x + 1)))))
    ax1.set_xlabel('E')
    ax1.legend(loc='upper right')
    param_widgets = widgets.make_param_widgets(
        parameters, plot_data, slider_box=[0.07, 0.96, 0.8, 0.03])
    #fig.suptitle(r"Énergie d'ionisation sans couplage e-e", fontsize=16)
    plt.show()
Exemplo n.º 2
0
    ax4.set_xlabel('time (arbitrary unit)')
    ax4.set_ylabel(' T (K)')
    ax4.set_ylim(min(Teb) - 5., max(Teb) + 5.)

    lines = {}
    lines['cooling'], = ax4.plot([], [], label='T(t)')
    #Plotting horizontal lines for the dew point
    lines['dewl'], = ax1.plot([], [], color='#cccccc')
    lines['dewr'], = ax4.plot([], [], color='#cccccc')
    #Plotting horizontal lines for the ebullition point
    lines['ebl'], = ax1.plot([], [], color='#cccccc')
    lines['ebr'], = ax4.plot([], [], color='#cccccc')
    #Plotting an horizontal line for the value of x0
    lines['x'], = ax1.plot([], [], color='#cccccc')

    param_widgets = widgets.make_param_widgets(
        parameters, plot_data, slider_box=[0.35, 0.93, 0.4, 0.05])
    #choose_widget = widgets.make_choose_plot(lines, box=[0.015, 0.25, 0.2, 0.15])
    #reset_button = widgets.make_reset_button(param_widgets)

    #plt.tight_layout()
    plt.show()

    #ax2 = plt.subplot(2,2,2)
    #ax2.plot(TempRange,compSys[0], label='molar liquid phase amount')
    #ax2.plot(TempRange,compSys[1], label='xB')
    #ax2.plot(TempRange,compSys[2], label='yB')
    #ax2.plot(TempRange,nBl, label='nB(l)')
    #ax2.plot(TempRange,nBg, label='nB(g)')
    #Verification of the total quantity of Benzene
    #ax2.plot(TempRange,nBg+nBl, label='nBtot')
    #ax2.legend(loc='upper right')
Exemplo n.º 3
0
                          facecolor='black',
                          fill=True,
                          transform=fig.transFigure))
    rects['FeSCNeq'] = ax.add_patch(
        patches.Rectangle((0.88, 0.545),
                          0,
                          0.03,
                          edgecolor='#000000',
                          facecolor='black',
                          fill=True,
                          transform=fig.transFigure))

    lines = {}
    #Q for all values of xis
    lines['Q'], = ax1.plot([], [], color='#cccccc')
    #equilibrium value of Q
    lines['eq'], = ax1.plot([], [], marker='o', color='#cccccc')
    #value of Q for given xi
    lines['Qsingle'], = ax1.plot([], [], marker='o', color='red')

    param_widgets = widgets.make_param_widgets(
        parameters, plot_data, slider_box=[0.07, 0.85, 0.85, 0.15])

    #print(dir(param_widgets))
    #print(param_widgets['xi'])
    #choose_widget = widgets.make_choose_plot(lines, box=[0.015, 0.25, 0.2, 0.15])
    #reset_button = widgets.make_reset_button(param_widgets)

    #plt.tight_layout()
    plt.show()