Исходный код Python. Требует matplotlib и пакет thermocouples_reference.
из импорта pylab * из импорта thermocouples_reference * figtype = '.svg' saveopts = {} #'bbox_inches':'tight'} #, 'transparent':True, 'frameon':True}def doplot ( tclist , T , endlabels = True ) : fig = figure ( ) ax = axes ([ 0.17 , 0.14 , 0.80 , 0.83 ]) #T = linspace(lim[0],lim[1],2001 ) для letter , tc в tclist : print ( tc ) emf = tc.emf_mVC ( T , out_of_range = " nan " ) l = plot ( T , emf , label = tc.type ) [ 0 ] if endlabels : Tmax = tc.maxT_C ; emfmax = tc . emf_mVC ( Tmax ) текст ( Tmax , emfmax , tc . type , fontsize = 'x-small' , color = l . get_color (), va = 'center' ) ax . tick_params ( labelsize = "x-small " ) xlabel ( " Температура $T$ (град. C) " ) ylabel ( " $E(T)$ (мВ) " ) xlim ( amin ( T ), amax ( T )) рис . set_size_inches ( 3 , 3 ) рис . patch . set_alpha ( 0 ) grid ( ) если __name__ == '__main__' : ##### Низкая температура lowTcouples = [( k , thermocouples [ k ]) for k in list ( 'EJKNT' ) + [ 'AuFe 0.07' ]] doplot ( lowTcouples , linspace ( -273.015 , 40. , 2001 ), endlabels = False ) ylim ( -10.5 , 2.1 ) xticks ([ - 270 , -200 , -100 , 0 , 22 ] ) # двойная легенда ul = [ gca ( ) . lines [ i ] for i in [ 3 , 5 , 4 ] ] ll = [ gca ( ) . строки [ i ] для i в [ 2 , 1 , 0 ]] l1 = legend ( ul , [ l.get_label () для l в ul ] , размер шрифта = "x-small" , расположение = 'вверху слева' ) l2 = legend ( ll , [ l.get_label () для l в ll ] , размер шрифта = "x-small" , расположение = ' внизу справа' ) gca () . add_artist ( l1 ) savefig ( 'low_t_thermocouples' + figtype , ** saveopts ) ##### Средняя температура medTcouples = [( k , thermocouples [ k ]) for k in list ( 'EJKNTPM' ) + [ 'Au/Pt' , 'Pt/Pd' , ] ] doplot ( medTcouples , linspace ( -110 . , 1790. , 2001 )) ylim ( -6 , 82 ) xticks ([ 0 , 500 , 1000 , 1500 ]) gca () . texts [ 1 ] .set_ha ( 'center' ) # тип J gca ( ) . texts [ 1 ] .set_va ( ' bottom ' ) # тип J gca () . texts [ 2 ] .set_ha ( ' center' ) # тип K gca () . texts [ 2 ] .set_va ( 'bottom' ) # тип K gca ( ) . texts [ 5 ] .set_va ( 'top' ) # тип P gca () . lines [ 5 ] .set_zorder ( 1 ) # тип P gca () . texts [ 5 ] .set_text ( 'Type P' ) # тип P gca ( ) . texts [ 4 ] .set_ha ( ' right' ) # тип T gca () . texts [ 4 ] .set_va ( ' bottom' ) # тип T gca ( ) . lines [ 4 ] .set_zorder ( 9 ) # тип T gca () . texts [ - 2 ] . set_va ( 'bottom' ) # AuPt savefig ( 'med_t_thermocouples' + figtype , ** saveopts ) ##### Высокая температура highTcouples = [( k , thermocouples [ k ]) for k in list ( 'CDGBRS' ) + [ 'PtMo 5/0.1' , 'PtRh 40/20' , 'Pt/Pd' , 'IrRh 40/0' , ] ] doplot ( highTcouples , linspace ( -70 . , 2850. , 2421 )) ylim ( -2 , 49 ) gca () . texts [ 1 ] .set_ha ( ' center ' ) # тип D gca ( ) . texts [ 1 ] .set_va ( 'bottom' ) # тип D gca ( ) . texts [ 0 ] . set_va ( 'top' ) # тип C savefig ( 'high_t_thermocouples' + figtype , ** saveopts )