-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathln_dLdx_sampling_20231028N0_IMG_f^1f^-1_toPng.gp
99 lines (99 loc) · 3.35 KB
/
ln_dLdx_sampling_20231028N0_IMG_f^1f^-1_toPng.gp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#Requirement
#
#G N U P L O T
# Version 5.2 patchlevel 8 last modified 2019-12-01
#
# Copyright (C) 1986-1993, 1998, 2004, 2007-2019
# Thomas Williams, Colin Kelley and many others
#============
#
#ln_dLdx_sampling_20231028N0_IMG_f^1f^-1_toPng.gp
#
set datafile separator ' ,';
#
set xlabel '{/Times=30 ln(1+{/:Italic dL}/{/:Italic dx})}';
set ylabel '{/Times=30 Frequencies}';
#
set tics font 'Times,20';
set key font 'Times,20';
#
set key title '{/Times {/:Italic f}({/:Italic x}) = A{/:Italic x}+B}';
set key right;
#---
#
#---
set tmargin at screen 0.95;
set lmargin at screen 0.25;
set rmargin at screen 0.95;
set bmargin at screen 0.20;
set ylabel offset -3.5,0.0;
#---
#
#============
#
#rgb color scale
# result in `rgbScaleGen.tcl`
# - Sode, Y. 2019. getColorSection/rgbScaleGen.tcl. the MIT License (See http://opensource.org/licenses/mit-license.php): https://github.com/YujiSODE/getColorSection
#
array rgbColors[5]=["#0000ff","#3366cc","#66cc99","#99cb65","#cc6532"];
#============
#
#f(x) = (Ax+B)^1*Q(0.2)
#(A, B) = (50.9704, -98.8064)
#rgb: rgbColors[2]
#
plot './ln_dLdx_f^1*Q20%_A50.9704B-98.8064_IMG/ln_dLdx_f^1*Q20%_A50.9704B-98.8064_DATA.csv' using 1:($2-$3):($2+$3) with filledcurves notitle fillstyle solid 0.5 fillcolor rgb rgbColors[2], '' using 1:2 with lines title '{/Times {/:Italic f}({/:Italic x})^{1}{/:Italic Q}}' linecolor rgb rgbColors[2];
#---
#
#f(x) = (Ax+B)^2*Q(0.2)
#(A, B) = (2.9851, -1.91661)
#rgb: rgbColors[3]
#
#replot './ln_dLdx_f^2*Q20%_A2.9851B-1.91661_IMG/ln_dLdx_f^2*Q20%_A2.9851B-1.91661_DATA.csv' using 1:($2-$3):($2+$3) with filledcurves notitle fillstyle solid 0.5 fillcolor rgb rgbColors[3], '' using 1:2 with lines title '{/Times {/:Italic f}({/:Italic x)^{2}{/:Italic Q}}' linecolor rgb rgbColors[3];
#---
#
#f(x) = (Ax+B)^3*Q(0.2)
#(A, B) = (0.950117, 0.819635)
#rgb: rgbColors[4]
#
#replot './ln_dLdx_f^3*Q20%_A0.950117B0.819635_IMG/ln_dLdx_f^3*Q20%_A0.950117B0.819635_DATA.csv' using 1:($2-$3):($2+$3) with filledcurves notitle fillstyle solid 0.5 fillcolor rgb rgbColors[4], '' using 1:2 with lines title '{/Times {/:Italic f}({/:Italic x})^{3}{/:Italic Q}}' linecolor rgb rgbColors[4];
#---
#
#f(x) = (Ax+B)^-1*Q(0.2)
#(A, B) = (A -0.0896782, B 0.452324)
#rgb: rgbColors[5]
#
replot './ln_dLdx_f^-1*Q20%_A-0.0896782B0.452324_IMG/ln_dLdx_f^-1*Q20%_A-0.0896782B0.452324_DATA.csv' using 1:($2-$3):($2+$3) with filledcurves notitle fillstyle solid 0.5 fillcolor rgb rgbColors[5], '' using 1:2 with lines title '{/Times {/:Italic f}({/:Italic x})^{-1}{/:Italic Q}}' linecolor rgb rgbColors[5];
#---
#
#sample data
#rgb: rgbColors[1]
# Curve 0 of 1, 100 points
# Curve title: "f(x)*Q(0.2): f(x) = (3x-2)^2, Q(p) = 1+p(2u-1), u = [0, 1], x = 2 to 5"
#
#plot with y error bars
replot './ln_dLdx_sampling_20231028N0_result_IMG/ln_dLdx_sampling_20231028N0_result_DATA.csv' using 1:2:3 with yerrorbars notitle pointtype -1 linecolor rgb '#000000', '' using 1:2 with points title '{/Times Sample}' pointtype 1 linecolor rgb rgbColors[1];
#============
#
#output: png
#sample, f^1 and f^-1 -> output
#------------
set terminal png size 600,600;
set output './ln_dLdx_sampling_20231028N0_f^1f^-1_IMG.png';
#
set sample 1000;
set key font 'Times,18';
set key right;
#
set xrange [-2.0**-1:2.0**3];
set yrange [0.0:2.0**11];
set xtics offset 0.0,-0.3;
set xlabel offset 0.0,-0.8;
set ylabel offset -1.5,0.0;
#
replot;
#============
#
#to reset terminal
set output;
#