Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gnuplot-设置函数_Gnuplot - Fatal编程技术网

Gnuplot-设置函数

Gnuplot-设置函数,gnuplot,Gnuplot,你能帮我看一下这些图表吗?我想将数据h.txt与函数f进行比较,将数据he.txt与函数g进行比较。它们应该有不同的宽度和相同的高度。我无法设置适当的高度和级别来查看两条线的峰值 konst1 = 1.2*10**7*(pi)**(0.5)*nuth_h konst2 = 22*10**9*(pi)**(0.5)*nuth_h f(x) = -konst1/((pi)**(0.5)*(nuth_h))*exp(-((x-nun_h)**2)/((nuth_h)**2))+12859000 g(

你能帮我看一下这些图表吗?我想将数据h.txt与函数f进行比较,将数据he.txt与函数g进行比较。它们应该有不同的宽度和相同的高度。我无法设置适当的高度和级别来查看两条线的峰值

konst1 = 1.2*10**7*(pi)**(0.5)*nuth_h
konst2 = 22*10**9*(pi)**(0.5)*nuth_h

f(x) = -konst1/((pi)**(0.5)*(nuth_h))*exp(-((x-nun_h)**2)/((nuth_h)**2))+12859000
g(x) = -konst2/((pi)**(0.5)*(nuth_he))*exp(-((x-nun_he)**2)/(nuth_he**2))+35663360
你能帮我设置一下上面的零件吗

reset session

c = 299792458
kB = 1.380649*10**(-23)
T = 10000
m_h = 1.67*10**(-27)
nun_h = 456805720119461.2
nuth_h = (2*kB*T/m_h)**(0.5)
m_he = 6.64424*10**(-27)
nun_he = 448925513626834.4
nuth_he = (2*kB*T/m_he)**(0.5)
konst1 = 1.2*10**7*(pi)**(0.5)*nuth_h
konst2 = 22*10**9*(pi)**(0.5)*nuth_h

f(x) = -konst1/((pi)**(0.5)*(nuth_h))*exp(-((x-nun_h)**2)/((nuth_h)**2))+12859000
g(x) = -konst2/((pi)**(0.5)*(nuth_he))*exp(-((x-nun_he)**2)/(nuth_he**2))+35663360

x0 = 456805720119461.2
set xrange[x0*(1-1e-10):x0*(1+1e-10)]
set xtics rotate by -90
set format x "%.0f"

set encoding iso_8859_1
set term pngcairo size 800,1200 enhanced font "Segoe UI,18"
set output "HHe.png"

set border lw 1.4
set title offset 0,-0.5
set tics out nomirror
set decimalsign ','
set key tc variable

Row1 = "set tmargin screen 0.95; set bmargin screen 0.62"   
Row2 = "set tmargin screen 0.47; set bmargin screen 0.11"  
Col1 = "set lmargin screen 0.22; set rmargin screen 0.95"   
set multiplot layout 2,1 rowsfirst 

@Row1; @Col1 
set title "{/:Bold=25 1}"          
set tics out nomirror
set format y "%3.3sx10^{%T}"
set format x "%3.0f"
#set xtics 1
set ylabel "{/:Italic F} (a. u.)"
set xlabel "{/:Italic {/Symbol l}} ({\305})"
#set xrange [4.5665*10**(-14):4.5695*10**(-14)]
set key at 6562,7.5e+6
set label "6562.82" tc rgb "black" at 6563.01,7e+7 
set object 1 rectangle from first 6562.2, graph 0 to first 6563.4, graph 1 fillcolor "khaki1"
set arrow from 6562.82,graph(0,0) to 6562.82,graph(1,1) nohead dt "-" lw 2 lc rgb "grey30"
set label "6562.820" tc rgb "grey30" at 6562.86,23e+6 font "Segoe UI,14"
plot 'h.txt' with lines lw 1.5 linecolor rgb "dark-red" title "{/:Bold 1}", f(x) with lines lw 2.5 linecolor rgb "medium-blue" title "{/:Bold Fit Gaussova profilu}"

@Row2; @Col1 
set title "{/:Bold=25 2}"   
set format y "%4.2sx10^{%T}"       
unset key
set tics out nomirror
set format x "%3.1f"
set object 1 rectangle from first 6677.88, graph 0 to first 6678.08, graph 1 fillcolor "khaki1"
set arrow from 6677.985,graph(0,0) to 6677.985,graph(1,1) nohead dt "-" lw 2 lc rgb "grey30"
set label "6677.985" tc rgb "grey30" at 6677.99,35.67e+6 font "Segoe UI,14"
plot 'he.txt' with lines lw 1.5 linecolor rgb "dark-red" title "{/:Bold 2}", g(x) with lines lw 2.5 linecolor rgb "medium-blue"
资料

h、 文本

he.txt

448952405055708.6250 35663360
448951060407750.0625 35663360
448949715767846.0625 35663360
448948371135996.7500 35663360
448947026512201.8125 35663360
448945681896461.3750 35663360
448944337288775.1875 35663360
448942992689143.3125 35663360
448941648097565.6250 35663360
448940303514042.0625 35663360
448938958938572.5625 35663360
448937614371157.0625 35663360
448936269811795.3750 35663360
448934925260487.6250 35663360
448933580717233.5625 35657272
448932236182033.2500 35644708
448930891654886.5000 35626056
448929547135793.3750 35594836
448928202624753.6875 35563224
448926858121767.4375 35544176
448925513626834.3750 35550264
448924169139954.6250 35582272
448922824661128.1250 35613488
448921480190354.6250 35638620
448920135727634.3125 35657272
448918791272966.8125 35663360
448917446826352.3125 35663360
448916102387790.5625 35663360
448914757957281.6250 35663360
448913413534825.3125 35663360
448912069120421.6875 35663360
448910724714070.5000 35663360
448909380315771.8125 35663360
448908035925525.4375 35663360
448906691543331.5000 35663360
448905347169189.6875 35663360
448904002803100.1875 35663360
448902658445062.6250 35663360
448901314095077.1875 35663360
448899969753143.6875 35663360
448898625419262.0625 35663360
448897281093432.3125 35663360
448895936775654.1875 35663360
448894592465927.8125 35663360
448893248164253.0000 35663360
448891903870629.6250 35663360

您可以在
[4.56667e+14:4.56945e+14]
范围内显示数据集
'h.txt'

如我所示,您还可以在非常窄的范围内显示函数
f(x)
<代码>[x0*(1-1e-10):x0*(1+1e-10)]带有
x0=456805720119461.2

set multiplot layout 2,1

set xrange[4.56667e+14:4.56945e+14]
plot 'h.txt'

x0 = 456805720119461.2
set xrange[x0*(1-1e-10):x0*(1+1e-10)]
set xtic rotate by -45
plot f(x)

unset multiplot
虽然第二个范围包括在第一个范围内,但第二个范围大约小7个数量级。 如何在同一个图中显示比另一个图窄17倍的峰值或倾角

set multiplot layout 2,1

set xrange[4.56667e+14:4.56945e+14]
plot 'h.txt'

x0 = 456805720119461.2
set xrange[x0*(1-1e-10):x0*(1+1e-10)]
set xtic rotate by -45
plot f(x)

unset multiplot