├── grid.cfg ├── arrows.cfg ├── latex ├── grid.cfg ├── xyborder.cfg ├── xborder.cfg └── yborder.cfg ├── xyborder.cfg ├── noborder.cfg ├── README.md ├── xborder.cfg ├── yborder.cfg ├── array.cfg ├── mathematics.cfg └── localization.cfg /grid.cfg: -------------------------------------------------------------------------------- 1 | # Add light grid to plot 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 102 lc rgb '#808080' lt 0 lw 1 5 | set grid back ls 102 6 | -------------------------------------------------------------------------------- /arrows.cfg: -------------------------------------------------------------------------------- 1 | color_arrows = 'u ($1-dx($1,$2)/2.0):($2-dy($1,$2)/2.0):(dx($1,$2)):(dy($1,$2)):(v($1,$2)) with vectors head size 0.08,20,60 filled lc palette' 2 | -------------------------------------------------------------------------------- /latex/grid.cfg: -------------------------------------------------------------------------------- 1 | # Add light grid to plot 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 102 lc rgb '#d6d7d9' lt 0 lw 1 5 | set grid back ls 102 6 | -------------------------------------------------------------------------------- /xyborder.cfg: -------------------------------------------------------------------------------- 1 | # xy-border for next graph 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 101 lc rgb '#808080' lt 1 lw 1 5 | set border 3 front ls 101 6 | set tics nomirror out scale 0.75 7 | set format '%g' 8 | -------------------------------------------------------------------------------- /latex/xyborder.cfg: -------------------------------------------------------------------------------- 1 | # xy-border for next graph 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 101 lc rgb '#808080' lt 1 lw 1 5 | set border 3 front ls 101 6 | set tics nomirror out scale 0.75 7 | set format '$%g$' 8 | -------------------------------------------------------------------------------- /noborder.cfg: -------------------------------------------------------------------------------- 1 | # Remove border from graph 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set border 0 5 | set style line 101 lc rgb '#808080' lt 1 lw 1 6 | unset xlabel 7 | unset ylabel 8 | set format x '' 9 | set format y '' 10 | set tics scale 0 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Config-snippets for gnuplot 2 | =========================== 3 | 4 | This page provides a collection of small configuration snippets that will ease 5 | your daily plotting routine with gnuplot. 6 | 7 | For a detailed explanation, see: http://www.gnuplotting.org/?p=1994 8 | 9 | -------------------------------------------------------------------------------- /xborder.cfg: -------------------------------------------------------------------------------- 1 | # Only x-border for next graph 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 101 lc rgb '#808080' lt 1 lw 1 5 | set border 1 front ls 101 6 | unset ylabel 7 | set format x '%g' 8 | set format y '' 9 | set xtics nomirror out scale 0.75 10 | set ytics nomirror out scale 0 11 | -------------------------------------------------------------------------------- /yborder.cfg: -------------------------------------------------------------------------------- 1 | # Only y-border for next graph 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 101 lc rgb '#808080' lt 1 lw 1 5 | set border 2 front ls 101 6 | unset xlabel 7 | set format x '' 8 | set format y '%g' 9 | set xtics nomirror out scale 0 10 | set ytics nomirror out scale 0.75 11 | -------------------------------------------------------------------------------- /latex/xborder.cfg: -------------------------------------------------------------------------------- 1 | # Only x-border for next graph 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 101 lc rgb '#808080' lt 1 lw 1 5 | set border 1 front ls 101 6 | unset ylabel 7 | set format x '$%g$' 8 | set format y '' 9 | set xtics nomirror out scale 0.75 10 | set ytics nomirror out scale 0 11 | -------------------------------------------------------------------------------- /latex/yborder.cfg: -------------------------------------------------------------------------------- 1 | # Only y-border for next graph 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | set style line 101 lc rgb '#808080' lt 1 lw 1 5 | set border 2 front ls 101 6 | unset xlabel 7 | set format x '' 8 | set format y '$%g$' 9 | set xtics nomirror out scale 0 10 | set ytics nomirror out scale 0.75 11 | -------------------------------------------------------------------------------- /array.cfg: -------------------------------------------------------------------------------- 1 | # configuration file for plotting of secondary sources (aka loudspeakers) 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | 5 | # @array_active 6 | # plot filled points for every secondary source 7 | set style line 211 lc rgb '#000000' lt 1 lw 3 pt 7 ps 0.75 8 | array_active = 'u 1:2 ls 211' 9 | 10 | # @array_inactive 11 | # plot open points for every secondary source 12 | set style line 212 lc rgb '#000000' lt 3 lw 3 pt 65 ps 0.5 13 | array_inactive = 'u 1:2 ls 212' 14 | -------------------------------------------------------------------------------- /mathematics.cfg: -------------------------------------------------------------------------------- 1 | # definition of mathematical helper functions 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | 5 | # degree to radian conversion 6 | rad(phi) = phi/180.0*pi 7 | 8 | # radian to degree conversion 9 | deg(phi) = phi/pi*180.0 10 | 11 | # Bessel functions (after Bronstein 2001, eq. 9.54a) 12 | # besj0(x) and besj1(x) are build-in functions 13 | besj2(x) = 2*1/x * besj1(x) - besj0(x) 14 | besj3(x) = 2*2/x * besj2(x) - besj1(x) 15 | besj4(x) = 2*3/x * besj3(x) - besj2(x) 16 | besj5(x) = 2*4/x * besj4(x) - besj3(x) 17 | besj6(x) = 2*5/x * besj5(x) - besj4(x) 18 | -------------------------------------------------------------------------------- /localization.cfg: -------------------------------------------------------------------------------- 1 | # helper functions for drawing of arrows from localization results 2 | # 3 | # AUTHOR: Hagen Wierstorf 4 | 5 | # load mathematical helper functions like deg(), rad() 6 | load 'mathematics.cfg' 7 | 8 | # @localization_arrow 9 | # arrow drawn at the point the listener is sitting, pointing toward the 10 | # perceived direction 11 | set palette defined (\ 12 | 1 '#ffee00',\ 13 | 2 '#ff7000',\ 14 | 3 '#ee0000',\ 15 | 4 '#7f0000') 16 | arrow_size = 7 17 | arrow_x(phi) = (arrow_size+0.1)/50.0*cos(rad(phi)+pi/2) 18 | arrow_y(phi) = (arrow_size+0.1)/50.0*sin(rad(phi)+pi/2) 19 | localization_arrow = 'u ($1-arrow_x($3)):($2-arrow_y($3)):(2*arrow_x($3)):(2*arrow_y($3)):(abs($4)) with vectors head size 0.1,20,60 filled lc palette lw 3 lt 1' 20 | 21 | # @localization_grey_line 22 | # line going from the listener position towards the edge of the figure 23 | set style line 202 lc rgb '#d6d7d9' pt 7 ps 2 lt 1 lw 1 24 | grey_line_size = 500 25 | grey_line_x(phi) = (grey_line_size+0.1)/50.0*cos(rad(phi)+pi/2) 26 | grey_line_y(phi) = (grey_line_size+0.1)/50.0*sin(rad(phi)+pi/2) 27 | localization_grey_line = 'u 1:2:(grey_line_x($3)):(grey_line_y($3)) with vectors nohead ls 202' 28 | 29 | # @point_source 30 | # plot a point source (large grey point) at the specific point 31 | set_point_source(x,y) = sprintf('