mirror of
https://github.com/sharkdp/bat.git
synced 2025-08-19 04:17:31 +02:00
19
tests/syntax-tests/highlighted/gnuplot/test.gp
Normal file
19
tests/syntax-tests/highlighted/gnuplot/test.gp
Normal file
@@ -0,0 +1,19 @@
|
||||
[38;2;249;38;114mset[0m[38;2;249;38;114m [0m[38;2;249;38;114mterminal[0m[38;2;249;38;114m pngcairo enhanced[0m
|
||||
[38;2;249;38;114mset[0m[38;2;249;38;114m [0m[38;2;249;38;114moutput[0m[38;2;249;38;114m [0m[38;2;230;219;116m"[0m[38;2;230;219;116m/tmp/polynomial.png[0m[38;2;230;219;116m"[0m
|
||||
|
||||
[38;2;249;38;114mset[0m[38;2;249;38;114m [0m[38;2;249;38;114mgrid[0m
|
||||
|
||||
[38;2;249;38;114mset[0m[38;2;249;38;114m [0m[38;2;249;38;114mxrange[0m[38;2;249;38;114m [0m[38;2;249;38;114m[[0m[38;2;190;132;255m-5[0m[38;2;249;38;114m:[0m[38;2;190;132;255m5[0m[38;2;249;38;114m][0m
|
||||
[38;2;249;38;114mset[0m[38;2;249;38;114m [0m[38;2;249;38;114myrange[0m[38;2;249;38;114m [0m[38;2;249;38;114m[[0m[38;2;190;132;255m-5[0m[38;2;249;38;114m:[0m[38;2;190;132;255m10[0m[38;2;249;38;114m][0m
|
||||
|
||||
[38;2;249;38;114mset[0m[38;2;249;38;114m [0m[38;2;249;38;114msamples[0m[38;2;249;38;114m [0m[38;2;190;132;255m10000[0m
|
||||
|
||||
[38;2;249;38;114mset[0m[38;2;249;38;114m [0m[38;2;249;38;114mkey[0m[38;2;249;38;114m [0m[38;2;190;132;255mbottom[0m[38;2;249;38;114m [0m[38;2;190;132;255mright[0m
|
||||
|
||||
[38;2;255;255;255mf[0m[38;2;248;248;242m(x) = [0m[38;2;190;132;255m1.0[0m[38;2;248;248;242m / [0m[38;2;190;132;255m14.0[0m[38;2;248;248;242m * ((x+[0m[38;2;190;132;255m4[0m[38;2;248;248;242m) * (x+[0m[38;2;190;132;255m1[0m[38;2;248;248;242m) * (x[0m[38;2;190;132;255m-1[0m[38;2;248;248;242m) * (x[0m[38;2;190;132;255m-3[0m[38;2;248;248;242m)) + [0m[38;2;190;132;255m0.5[0m
|
||||
|
||||
[38;2;249;38;114mplot[0m[38;2;248;248;242m \[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mf[0m[38;2;248;248;242m(x) [0m[38;2;190;132;255mtitle[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mpolynomial of degree 4[0m[38;2;230;219;116m"[0m[38;2;248;248;242m \[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mwith[0m[38;2;248;248;242m [0m[38;2;249;38;114mlines[0m[38;2;248;248;242m \[0m
|
||||
[38;2;248;248;242m [0m[38;2;190;132;255mlinewidth[0m[38;2;248;248;242m [0m[38;2;190;132;255m2[0m[38;2;248;248;242m \[0m
|
||||
[38;2;248;248;242m [0m[38;2;190;132;255mlinetype[0m[38;2;248;248;242m rgb [0m[38;2;230;219;116m'[0m[38;2;230;219;116m#0077ff[0m[38;2;230;219;116m'[0m
|
19
tests/syntax-tests/source/gnuplot/test.gp
Normal file
19
tests/syntax-tests/source/gnuplot/test.gp
Normal file
@@ -0,0 +1,19 @@
|
||||
set terminal pngcairo enhanced
|
||||
set output "/tmp/polynomial.png"
|
||||
|
||||
set grid
|
||||
|
||||
set xrange [-5:5]
|
||||
set yrange [-5:10]
|
||||
|
||||
set samples 10000
|
||||
|
||||
set key bottom right
|
||||
|
||||
f(x) = 1.0 / 14.0 * ((x+4) * (x+1) * (x-1) * (x-3)) + 0.5
|
||||
|
||||
plot \
|
||||
f(x) title "polynomial of degree 4" \
|
||||
with lines \
|
||||
linewidth 2 \
|
||||
linetype rgb '#0077ff'
|
Reference in New Issue
Block a user