├── .gitignore ├── cdtudcolors.gp ├── colors-qualitative-clusterd.gp ├── colors-qualitative-paired.gp ├── colors-sequential-Gray.gp ├── colors-sequential-darkBlue.gp ├── colors-sequential-darkGreen.gp ├── colors-sequential-darkPurpel.gp ├── colors-sequential-lightBlue.gp ├── colors-sequential-lightGreen.gp ├── colors-sequential-lightOrange.gp ├── colors-sequential-lightPurpel.gp ├── defaults.gp ├── help ├── data.dat ├── test-colorsPNG.png ├── test-defaultsPNG.png ├── test-latexPNG.png ├── test-layoutsPNG.png ├── test-linestypesPNG.png └── test.gp ├── latex.gp ├── layout-centerAxis.gp ├── layout-default.gp ├── layout-empty.gp ├── layout-emptyCenterAxis.gp ├── paletteMatlab.gp ├── paletteMoreland.gp ├── readme.markdown ├── template-default.gp ├── texHeader.tex └── unset-layout.gp /.gitignore: -------------------------------------------------------------------------------- 1 | help/*.pdf 2 | help/*.tex 3 | help/output.list -------------------------------------------------------------------------------- /cdtudcolors.gp: -------------------------------------------------------------------------------- 1 | # 2 | # cdtudcolors.gp 3 | # 4 | # 5 | # Created by Tobias Heß on 2011-04-28. 6 | # Copyright 2011 TU Dresden. All rights reserved. 7 | # 8 | 9 | # Grau 10 | GRAY_100 = "#000000" 11 | GRAY_90 = "#1A1A1A" 12 | GRAY_80 = "#333333" 13 | GRAY_70 = "#4D4D4D" 14 | GRAY_60 = "#666666" 15 | GRAY_50 = "#808080" 16 | GRAY_40 = "#999999" 17 | GRAY_30 = "#B3B3B3" 18 | GRAY_20 = "#CCCCCC" 19 | GRAY_10 = "#E6E6E6" 20 | 21 | # Hausfarbe 22 | HKS41_100 = "#0B2A51" 23 | HKS41_90 = "#1D355B" 24 | HKS41_80 = "#2F4067" 25 | HKS41_70 = "#3F4F74" 26 | HKS41_60 = "#515D80" 27 | HKS41_50 = "#636C8E" 28 | HKS41_40 = "#777F9E" 29 | HKS41_30 = "#8B94B1" 30 | HKS41_20 = "#A8AFC7" 31 | HKS41_10 = "#CDD4E2" 32 | 33 | # 1 Auszeichung 34 | HKS44_100 = "#0059A3" 35 | HKS44_90 = "#1A64AA" 36 | HKS44_80 = "#346FB2" 37 | HKS44_70 = "#4C7AB9" 38 | HKS44_60 = "#6185C0" 39 | HKS44_50 = "#7392C9" 40 | HKS44_40 = "#87A1D2" 41 | HKS44_30 = "#9CB1DB" 42 | HKS44_20 = "#B8C6E6" 43 | HKS44_10 = "#D8E0F2" 44 | 45 | # 2 Auszeichnung 46 | HKS36_100 = "#51297F" 47 | HKS36_90 = "#5D3C89" 48 | HKS36_80 = "#694C93" 49 | HKS36_70 = "#755C9D" 50 | HKS36_60 = "#826CA7" 51 | HKS36_50 = "#907CB2" 52 | HKS36_40 = "#9F8DBE" 53 | HKS36_30 = "#B1A1CB" 54 | HKS36_20 = "#C5B9DA" 55 | HKS36_10 = "#E2DAEC" 56 | 57 | # 3 Auszeichung 58 | HKS33_100 = "#811A78" 59 | HKS33_90 = "#8A3383" 60 | HKS33_80 = "#92488E" 61 | HKS33_70 = "#9C5A98" 62 | HKS33_60 = "#A56BA3" 63 | HKS33_50 = "#B07CAE" 64 | HKS33_40 = "#BB8EBB" 65 | HKS33_30 = "#C8A2C8" 66 | HKS33_20 = "#E3BBDC" 67 | HKS33_10 = "#F4E0E8" 68 | 69 | # 4 Auszeichung 70 | HKS57_100 = "#007A47" 71 | HKS57_90 = "#008252" 72 | HKS57_80 = "#098A5C" 73 | HKS57_70 = "#199367" 74 | HKS57_60 = "#3E9D72" 75 | HKS57_50 = "#5BA87C" 76 | HKS57_40 = "#76B58A" 77 | HKS57_30 = "#8FC398" 78 | HKS57_20 = "#B0D4AC" 79 | HKS57_10 = "#D3E7C5" 80 | 81 | # 5 Auszeichung 82 | HKS65_100 = "#22AD36" 83 | HKS65_90 = "#43B24C" 84 | HKS65_80 = "#59B85F" 85 | HKS65_70 = "#6DBF6F" 86 | HKS65_60 = "#7EC67F" 87 | HKS65_50 = "#8DCC8F" 88 | HKS65_40 = "#A2D5A0" 89 | HKS65_30 = "#B4DCB2" 90 | HKS65_20 = "#CCE7C8" 91 | HKS65_10 = "#E3F2E1" 92 | 93 | # Ausnahme 94 | HKS07_100 = "#E87B14" 95 | HKS07_90 = "#EB8B38" 96 | HKS07_80 = "#EF9C51" 97 | HKS07_70 = "#F1A861" 98 | HKS07_60 = "#F3B471" 99 | HKS07_50 = "#F5C180" 100 | HKS07_40 = "#F7D293" 101 | HKS07_30 = "#F9DDA4" 102 | HKS07_20 = "#FBE9BE" 103 | HKS07_10 = "#FDF2D1" 104 | 105 | 106 | # Standardfarben 107 | 108 | GRIDCOLOR = "#000000" 109 | TEXTCOLOR = "#000000" 110 | 111 | COLOR0 = "#000000" 112 | COLOR1 = HKS44_100 113 | COLOR2 = HKS33_100 114 | COLOR3 = HKS65_100 115 | COLORX = HKS07_100 116 | -------------------------------------------------------------------------------- /colors-qualitative-clusterd.gp: -------------------------------------------------------------------------------- 1 | #TUD QUALITTIVE CLUSTERD COLORS 2 | 3 | NUMOFLINETYPES=7 4 | 5 | load 'cdtudcolors.gp' 6 | 7 | set linetype 1 linecolor rgb HKS44_100 8 | set linetype 2 linecolor rgb HKS65_100 9 | set linetype 3 linecolor rgb HKS33_100 10 | set linetype 4 linecolor rgb HKS07_100 11 | set linetype 5 linecolor rgb HKS41_100 12 | set linetype 6 linecolor rgb HKS57_100 13 | set linetype 7 linecolor rgb HKS36_100 dashtype 1 14 | 15 | 16 | set palette maxcolors 7 17 | set palette defined (0 HKS44_100 ,\ 18 | 1 HKS65_100 ,\ 19 | 2 HKS33_100 ,\ 20 | 3 HKS07_100 ,\ 21 | 4 HKS41_100 ,\ 22 | 5 HKS57_100 ,\ 23 | 6 HKS36_100 ) -------------------------------------------------------------------------------- /colors-qualitative-paired.gp: -------------------------------------------------------------------------------- 1 | #TUD QUALITTIVE PAIRED COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=7 6 | 7 | set linetype 1 linecolor rgb HKS44_100 8 | set linetype 2 linecolor rgb HKS41_100 9 | set linetype 3 linecolor rgb HKS65_100 10 | set linetype 4 linecolor rgb HKS57_100 11 | set linetype 5 linecolor rgb HKS33_100 12 | set linetype 6 linecolor rgb HKS36_100 13 | set linetype 7 linecolor rgb HKS07_100 14 | 15 | set palette maxcolors 7 16 | set palette defined (0 HKS44_100 ,\ 17 | 1 HKS41_100 ,\ 18 | 2 HKS65_100 ,\ 19 | 3 HKS57_100 ,\ 20 | 4 HKS33_100 ,\ 21 | 5 HKS36_100 ,\ 22 | 6 HKS07_100 ) -------------------------------------------------------------------------------- /colors-sequential-Gray.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | load 'cdtudcolors.gp' 8 | 9 | set linetype 1 linecolor rgb "#252525" 10 | set linetype 2 linecolor rgb "#636363" 11 | set linetype 3 linecolor rgb "#969696" 12 | set linetype 4 linecolor rgb "#CCCCCC" 13 | set linetype 5 linecolor rgb "#F7F7F7" 14 | 15 | set palette defined (0 "#252525" ,\ 16 | 1 "#636363" ,\ 17 | 2 "#969696" ,\ 18 | 3 "#CCCCCC" ,\ 19 | 4 "#F7F7F7" ) -------------------------------------------------------------------------------- /colors-sequential-darkBlue.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | set linetype 1 linecolor rgb HKS41_100 8 | set linetype 2 linecolor rgb HKS41_80 9 | set linetype 3 linecolor rgb HKS41_60 10 | set linetype 4 linecolor rgb HKS41_40 11 | set linetype 5 linecolor rgb HKS41_20 12 | 13 | set palette defined (0 HKS41_100 ,\ 14 | 1 HKS41_90 ,\ 15 | 2 HKS41_80 ,\ 16 | 3 HKS41_70 ,\ 17 | 4 HKS41_60 ,\ 18 | 5 HKS41_50 ,\ 19 | 6 HKS41_40 ,\ 20 | 7 HKS41_30 ,\ 21 | 8 HKS41_20 ) -------------------------------------------------------------------------------- /colors-sequential-darkGreen.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | set linetype 1 linecolor rgb HKS57_100 8 | set linetype 2 linecolor rgb HKS57_80 9 | set linetype 3 linecolor rgb HKS57_60 10 | set linetype 4 linecolor rgb HKS57_40 11 | set linetype 5 linecolor rgb HKS57_20 12 | 13 | set palette defined (0 HKS57_100 ,\ 14 | 1 HKS57_90 ,\ 15 | 2 HKS57_80 ,\ 16 | 3 HKS57_70 ,\ 17 | 4 HKS57_60 ,\ 18 | 5 HKS57_50 ,\ 19 | 6 HKS57_40 ,\ 20 | 7 HKS57_30 ,\ 21 | 8 HKS57_20 ) -------------------------------------------------------------------------------- /colors-sequential-darkPurpel.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | load 'cdtudcolors.gp' 8 | 9 | set linetype 1 linecolor rgb HKS36_100 10 | set linetype 2 linecolor rgb HKS36_80 11 | set linetype 3 linecolor rgb HKS36_60 12 | set linetype 4 linecolor rgb HKS36_40 13 | set linetype 5 linecolor rgb HKS36_20 14 | 15 | set palette defined (0 HKS36_100 ,\ 16 | 1 HKS36_90 ,\ 17 | 2 HKS36_80 ,\ 18 | 3 HKS36_70 ,\ 19 | 4 HKS36_60 ,\ 20 | 5 HKS36_50 ,\ 21 | 6 HKS36_40 ,\ 22 | 7 HKS36_30 ,\ 23 | 8 HKS36_20 ) -------------------------------------------------------------------------------- /colors-sequential-lightBlue.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | set linetype 1 linecolor rgb HKS44_100 8 | set linetype 2 linecolor rgb HKS44_80 9 | set linetype 3 linecolor rgb HKS44_60 10 | set linetype 4 linecolor rgb HKS44_40 11 | set linetype 5 linecolor rgb HKS44_20 12 | 13 | set palette defined (0 HKS44_100 ,\ 14 | 1 HKS44_90 ,\ 15 | 2 HKS44_80 ,\ 16 | 3 HKS44_70 ,\ 17 | 4 HKS44_60 ,\ 18 | 5 HKS44_50 ,\ 19 | 6 HKS44_40 ,\ 20 | 7 HKS44_30 ,\ 21 | 8 HKS44_20 ) -------------------------------------------------------------------------------- /colors-sequential-lightGreen.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | set linetype 1 linecolor rgb HKS65_100 8 | set linetype 2 linecolor rgb HKS65_80 9 | set linetype 3 linecolor rgb HKS65_60 10 | set linetype 4 linecolor rgb HKS65_40 11 | set linetype 5 linecolor rgb HKS65_20 12 | 13 | set palette defined (0 HKS65_100 ,\ 14 | 1 HKS65_90 ,\ 15 | 2 HKS65_80 ,\ 16 | 3 HKS65_70 ,\ 17 | 4 HKS65_60 ,\ 18 | 5 HKS65_50 ,\ 19 | 6 HKS65_40 ,\ 20 | 7 HKS65_30 ,\ 21 | 8 HKS65_20 ) -------------------------------------------------------------------------------- /colors-sequential-lightOrange.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | set linetype 1 linecolor rgb HKS07_100 8 | set linetype 2 linecolor rgb HKS07_80 9 | set linetype 3 linecolor rgb HKS07_60 10 | set linetype 4 linecolor rgb HKS07_40 11 | set linetype 5 linecolor rgb HKS07_20 12 | 13 | set palette defined (0 HKS07_100 ,\ 14 | 1 HKS07_90 ,\ 15 | 2 HKS07_80 ,\ 16 | 3 HKS07_70 ,\ 17 | 4 HKS07_60 ,\ 18 | 5 HKS07_50 ,\ 19 | 6 HKS07_40 ,\ 20 | 7 HKS07_30 ,\ 21 | 8 HKS07_20 ) -------------------------------------------------------------------------------- /colors-sequential-lightPurpel.gp: -------------------------------------------------------------------------------- 1 | # CD TU COLORS 2 | 3 | load 'cdtudcolors.gp' 4 | 5 | NUMOFLINETYPES=5 6 | 7 | set linetype 1 linecolor rgb HKS44_100 8 | set linetype 2 linecolor rgb HKS44_80 9 | set linetype 3 linecolor rgb HKS44_60 10 | set linetype 4 linecolor rgb HKS44_40 11 | set linetype 5 linecolor rgb HKS44_20 12 | 13 | set palette defined (0 HKS44_100 ,\ 14 | 1 HKS44_90 ,\ 15 | 2 HKS44_80 ,\ 16 | 3 HKS44_70 ,\ 17 | 4 HKS44_60 ,\ 18 | 5 HKS44_50 ,\ 19 | 6 HKS44_40 ,\ 20 | 7 HKS44_30 ,\ 21 | 8 HKS44_20 ) -------------------------------------------------------------------------------- /defaults.gp: -------------------------------------------------------------------------------- 1 | # 2 | # General Variables and Defaults Settings for my Gnuplot 3 | # 4 | # Created by Tobias Heß on 2014-07-04. 5 | # 6 | 7 | 8 | # Init Variables 9 | if (!exists('GRIDCOLOR')) { 10 | GRIDCOLOR = "#000000" 11 | } 12 | if (!exists('TEXTCOLOR')) { 13 | TEXTCOLOR = "#000000" 14 | } 15 | if (!exists('LINEWIDTH')) { 16 | LINEWIDTH = 3 17 | } 18 | if (!exists('POINTSIZE')) { 19 | POINTSIZE = 0.5 20 | } 21 | if (!exists('LOCALE')) { 22 | LOCALE = system('echo $LANG') 23 | } 24 | 25 | set locale LOCALE 26 | set decimalsign locale LOCALE 27 | 28 | POINTTYPE1 = 7 29 | POINTTYPE2 = 5 30 | POINTTYPE3 = 9 31 | POINTTYPE4 = 13 32 | POINTTYPE5 = 11 33 | POINTTYPE6 = 7 34 | POINTTYPE7 = 2 35 | POINTSIZE1 = 1.0*POINTSIZE 36 | POINTSIZE2 = 0.9*POINTSIZE 37 | POINTSIZE3 = 1.2*POINTSIZE 38 | POINTSIZE4 = 1.1*POINTSIZE 39 | POINTSIZE5 = 1.2*POINTSIZE 40 | POINTSIZE6 = 1.0*POINTSIZE 41 | POINTSIZE7 = 0.9*POINTSIZE 42 | 43 | set linetype 1 linecolor rgb "#A6CEE3" linewidth LINEWIDTH pointtype POINTTYPE1 pointsize POINTSIZE1 44 | set linetype 2 linecolor rgb "#1F78B4" linewidth LINEWIDTH pointtype POINTTYPE2 pointsize POINTSIZE2 45 | set linetype 3 linecolor rgb "#B2DF8A" linewidth LINEWIDTH pointtype POINTTYPE3 pointsize POINTSIZE3 46 | set linetype 4 linecolor rgb "#33A02C" linewidth LINEWIDTH pointtype POINTTYPE4 pointsize POINTSIZE4 47 | set linetype 5 linecolor rgb "#FB9A99" linewidth LINEWIDTH pointtype POINTTYPE5 pointsize POINTSIZE5 48 | set linetype 6 linecolor rgb "#000000" linewidth LINEWIDTH dashtype 1 pointtype POINTTYPE6 pointsize POINTSIZE6 49 | set linetype 7 linecolor rgb "#000000" linewidth LINEWIDTH dashtype 2 pointtype POINTTYPE7 pointsize POINTSIZE7 50 | set linetype cycle 7 51 | 52 | 53 | 54 | 55 | load "layout-default.gp" 56 | 57 | # for Latex Terminals load the latex settings 58 | if (strstrt(GPVAL_TERM, 'latex') > 0) { 59 | load "latex.gp" 60 | } 61 | 62 | -------------------------------------------------------------------------------- /help/data.dat: -------------------------------------------------------------------------------- 1 | 1 1 1 2 | 1 2 2 3 | 1 3 3 4 | 1 4 4 5 | 1 5 5 6 | 1 6 6 7 | 1 7 7 8 | 1 8 8 9 | 2 1 1 10 | 2 2 2 11 | 2 3 3 12 | 2 4 4 13 | 2 5 5 14 | 2 6 6 15 | 2 7 7 16 | 2 8 8 -------------------------------------------------------------------------------- /help/test-colorsPNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hesstobi/Gnuplot-Templates/940e7edbda57efb1650b2e40054cad079962eb3f/help/test-colorsPNG.png -------------------------------------------------------------------------------- /help/test-defaultsPNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hesstobi/Gnuplot-Templates/940e7edbda57efb1650b2e40054cad079962eb3f/help/test-defaultsPNG.png -------------------------------------------------------------------------------- /help/test-latexPNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hesstobi/Gnuplot-Templates/940e7edbda57efb1650b2e40054cad079962eb3f/help/test-latexPNG.png -------------------------------------------------------------------------------- /help/test-layoutsPNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hesstobi/Gnuplot-Templates/940e7edbda57efb1650b2e40054cad079962eb3f/help/test-layoutsPNG.png -------------------------------------------------------------------------------- /help/test-linestypesPNG.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hesstobi/Gnuplot-Templates/940e7edbda57efb1650b2e40054cad079962eb3f/help/test-linestypesPNG.png -------------------------------------------------------------------------------- /help/test.gp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/gnuplot 2 | ####################################################### 3 | # 4 | # Test-Figures for this templates 5 | # 6 | ######################################################## 7 | 8 | reset 9 | 10 | # Terminal 11 | set terminal cairolatex pdf color size 20cm,10cm 12 | 13 | # Basis Settings 14 | load "defaults.gp" 15 | 16 | set xrange [0:10] 17 | set yrange [0:10] 18 | set key outside 19 | 20 | set output 'test-defaults.tex' 21 | plot for [i=-1:7] 9-i*x*0.1 with lines lt i title 'linetype '.i 22 | 23 | load "layout-empty.gp" 24 | 25 | set terminal cairolatex pdf size 20cm,3cm 26 | 27 | set ytics 1,1,1 scale 0.0 28 | set for [i=1:7] ytics add (''.i -i) 29 | set sample 3 30 | set tmargin 2.5 31 | 32 | set output 'test-linestypes.tex' 33 | 34 | set multiplot layout 1,3 35 | 36 | set label 1 '\textbf{Dashed Lines}' at graph 0.5,graph 1 center offset 0,2 37 | plot for [i=1:7] -1*i with lines lt i dt i title 'linetype '.i 38 | 39 | set label 1 '\textbf{Linespoints}' 40 | plot for [i=1:7] -1*i with linespoints lt i title 'linetype '.i 41 | 42 | unset multiplot 43 | 44 | 45 | set terminal cairolatex pdf size 20cm,12cm 46 | set output 'test-colors.tex' 47 | COLORSTYLES = system('basename `ls ./../colors*`') 48 | 49 | set multiplot layout 4,3 50 | 51 | 52 | do for [file in COLORSTYLES] { 53 | set label 1 '\textbf{'.file.'}' 54 | load file 55 | plot for [i=1:NUMOFLINETYPES] -1*i with linespoints lt i title 'linetype '.i 56 | 57 | } 58 | 59 | unset multiplot 60 | 61 | reset 62 | load "defaults.gp" 63 | 64 | LAYOUTS = "layout-default.gp layout-centerAxis.gp layout-emptyCenterAxis.gp layout-empty.gp " 65 | 66 | set terminal cairolatex pdf size 20cm,20cm 67 | 68 | set output 'test-layouts.tex' 69 | 70 | f(x,i) = cos(x - 1.0 + i/10.0) 71 | set xrange [-pi/4:pi] 72 | 73 | set multiplot layout 2,2 74 | 75 | do for [file in LAYOUTS] { 76 | set label 1 '\textbf{'.file.'}' at graph 0.5,graph 1 center offset 0,2 77 | load file 78 | set tmargin 4 79 | plot for [i=1:4] f(x,i) with lines lt i notitle 80 | } 81 | 82 | unset multiplot 83 | 84 | reset 85 | load "defaults.gp" 86 | load "layout-empty.gp" 87 | load "latex.gp" 88 | 89 | set terminal cairolatex pdf size 20cm,6cm 90 | 91 | set output 'test-latex.tex' 92 | 93 | set label 1 "arrowLabel('Label'): ".arrowLabel('Label') at 0,0 left 94 | set label 2 "shortLabel('U','V'): ".shortLabel('U','V') at 0,-1 left 95 | set label 3 "shortArrowLabel('U','V'): ".shortArrowLabel('U','V') at 0,-2 left 96 | set label 4 "longLabel('Spannung','U','V'): ".longLabel('Spannung','U','V') at 0,-3 left 97 | set label 5 "longArrowLabel('Spannung','U','V'): ".longArrowLabel('Spannung','U','V') at 0,-4 left 98 | set label 6 "shortPuLabel('U','Ur'): ".shortPuLabel('U','U_\bez{r}') at 0,-5 left 99 | set label 7 "shortPuArrowLabel('U','Ur'): ".shortPuArrowLabel('U','U_\bez{r}') at 0,-6 left 100 | set label 8 "longPuLabel('Spannung','U','Ur'): ".longPuLabel('Spannung','U','U_\bez{r}') at 0,-7 left 101 | set label 9 "longPuArrowLabel('Spannung','U','Ur'): ".longPuArrowLabel('Spannung','U','U_\bez{r}') at 0,-8 left 102 | 103 | set yrange [-8:0] 104 | set xrange [0:1] 105 | 106 | plot 1/0 notitle 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /latex.gp: -------------------------------------------------------------------------------- 1 | # Settings for Latex Terminals 2 | 3 | set format "\\num{%g}" # Set number fomrat to siunitx 4 | 5 | # Lables 6 | 7 | arrowLabel(str) = sprintf("%s {\\tikz[baseline] \\draw[-latex,thick] (0,0.5ex) -- (7ex,0.5ex);}",str) 8 | 9 | shortLabel(symb,unit) = sprintf("$%s$ in \\si{%s}",symb,unit) 10 | shortArrowLabel(symb,unit) = arrowLabel(shortLabel(symb,unit)) 11 | 12 | longLabel(desc,symb,unit) = sprintf("%s %s",desc,shortLabel(symb,unit)) 13 | longArrowLabel(desc,symb,unit) = arrowLabel(longLabel(desc,symb,unit)) 14 | 15 | shortPuLabel(symb,unit) = sprintf("$\\nicefrac{%s}{%s}$",symb,unit) 16 | shortPuArrowLabel(symb,unit) = arrowLabel(shortPuLabel(symb,unit)) 17 | 18 | longPuLabel(desc,symb,unit) = sprintf("%s %s",desc,shortPuLabel(symb,unit)) 19 | longPuArrowLabel(desc,symb,unit) = arrowLabel(longPuLabel(desc,symb,unit)) 20 | 21 | if (LOCALE eq 'de_de') { 22 | shortLabel(symb,unit) = sprintf("$\\nicefrac{%s}{\\si{%s}}$",symb,unit) 23 | } 24 | 25 | -------------------------------------------------------------------------------- /layout-centerAxis.gp: -------------------------------------------------------------------------------- 1 | 2 | load 'layout-empty.gp' 3 | 4 | set grid noxtics ytics lt 0 lw 2 linecolor rgb GRIDCOLOR 5 | 6 | set xtics axis scale 1,0.5 7 | set ytics axis scale 1,0.5 8 | 9 | set xtics add ("" 0) 10 | set ytics add ("" 0) 11 | 12 | set arrow 100 from graph 0, first 0 to graph 1.02, first 0 size graph 0.02,15,60 filled ls -1 lw 2 13 | set arrow 200 from first 0, graph 0 to first 0, graph 1.02 size graph 0.02,15,60 filled ls -1 lw 2 14 | 15 | set label 100 "100: xlabel" at graph 1.02, first 0 offset 0,-3 right 16 | set label 200 "200: ylabel" at first 0, graph 1.02 offset -3,-0.5 right -------------------------------------------------------------------------------- /layout-default.gp: -------------------------------------------------------------------------------- 1 | # My Default Layout 2 | 3 | load "unset-layout.gp" 4 | 5 | # Tics 6 | set xtics nomirror in scale 1,0.5 offset 0,0 autofreq textcolor rgb TEXTCOLOR 7 | set ytics mirror in scale 1,0.5 offset 0,0 autofreq textcolor rgb TEXTCOLOR 8 | 9 | # Key 10 | set key inside right top Left revers samplen 2 spacing 1.3 textcolor rgb TEXTCOLOR 11 | 12 | # Grid 13 | set grid noxtics ytics lt 0 lw 2 linecolor rgb GRIDCOLOR 14 | set mxtics 5 15 | set mytics 5 16 | 17 | # Border 18 | set border 11 lt -1 lw 2 linecolor rgb GRIDCOLOR 19 | 20 | # Labels 21 | set label 200 '200: ylabel' at screen 0, graph 0.5 center offset 1,0 textcolor rgb TEXTCOLOR rotate by 90 22 | set label 201 '' at screen 1, graph 0.5 center offset -1,0 textcolor rgb TEXTCOLOR rotate by 90 23 | set label 100 '100: xlabel' at graph 0.5, graph 0 center offset 0,-3 textcolor rgb TEXTCOLOR 24 | set label 101 '' at graph 0.5, graph 1 center offset 0,3 textcolor rgb TEXTCOLOR 25 | 26 | set xlabel '' offset 0,0.0 textcolor rgb TEXTCOLOR 27 | set ylabel '' offset 0,0.0 textcolor rgb TEXTCOLOR 28 | 29 | #Margin 30 | set lmargin 8 31 | set bmargin 4 32 | 33 | 34 | # Ranges 35 | set xrange [*<10:*] 36 | set yrange [*<10:*] 37 | set zrange [*<10:*] 38 | 39 | -------------------------------------------------------------------------------- /layout-empty.gp: -------------------------------------------------------------------------------- 1 | # Layout with no gird/key/lable/tics... 2 | 3 | load 'unset-layout.gp' 4 | -------------------------------------------------------------------------------- /layout-emptyCenterAxis.gp: -------------------------------------------------------------------------------- 1 | 2 | load 'layout-empty.gp' 3 | 4 | set arrow 100 from graph 0, first 0 to graph 1.02, first 0 size graph 0.02,15,60 filled ls -1 lw 2 5 | set arrow 200 from first 0, graph 0 to first 0, graph 1.02 size graph 0.02,15,60 filled ls -1 lw 2 6 | 7 | set label 100 "100: xlabel" at graph 1.02, first 0 offset 0,-1 right 8 | set label 200 "200: ylabel" at first 0, graph 1.02 offset -1,-0.5 right -------------------------------------------------------------------------------- /paletteMatlab.gp: -------------------------------------------------------------------------------- 1 | # Matlab defautl color map 2 | # http://www.gunplotting.org/matlab-colorbar-with-gnuplot/ 3 | 4 | 5 | set palette defined ( 0 "#000090",\ 6 | 1 "#000fff",\ 7 | 2 "#0090ff",\ 8 | 3 "#0fffee",\ 9 | 4 "#90ff70",\ 10 | 5 "#ffee00",\ 11 | 6 "#ff7000",\ 12 | 7 "#ee0000",\ 13 | 8 "#7f0000") 14 | -------------------------------------------------------------------------------- /paletteMoreland.gp: -------------------------------------------------------------------------------- 1 | # New default color palette after Moreland (2009) 2 | # see: http://www.sandia.gov/~kmorel/documents/ColorMaps/ 3 | # For the gnuplot implementation have a look at 4 | # http://bastian.rieck.ru/blog/posts/2012/gnuplot_better_colour_palettes/ 5 | set palette defined(\ 6 | 0 0.2314 0.2980 0.7529,\ 7 | 0.03125 0.2667 0.3529 0.8000,\ 8 | 0.0625 0.3020 0.4078 0.8431,\ 9 | 0.09375 0.3412 0.4588 0.8824,\ 10 | 0.125 0.3843 0.5098 0.9176,\ 11 | 0.15625 0.4235 0.5569 0.9451,\ 12 | 0.1875 0.4667 0.6039 0.9686,\ 13 | 0.21875 0.5098 0.6471 0.9843,\ 14 | 0.25 0.5529 0.6902 0.9961,\ 15 | 0.28125 0.5961 0.7255 1.0000,\ 16 | 0.3125 0.6392 0.7608 1.0000,\ 17 | 0.34375 0.6824 0.7882 0.9922,\ 18 | 0.375 0.7216 0.8157 0.9765,\ 19 | 0.40625 0.7608 0.8353 0.9569,\ 20 | 0.4375 0.8000 0.8510 0.9333,\ 21 | 0.46875 0.8353 0.8588 0.9020,\ 22 | 0.5 0.8667 0.8667 0.8667,\ 23 | 0.53125 0.8980 0.8471 0.8196,\ 24 | 0.5625 0.9255 0.8275 0.7725,\ 25 | 0.59375 0.9451 0.8000 0.7255,\ 26 | 0.625 0.9608 0.7686 0.6784,\ 27 | 0.65625 0.9686 0.7333 0.6275,\ 28 | 0.6875 0.9686 0.6941 0.5804,\ 29 | 0.71875 0.9686 0.6510 0.5294,\ 30 | 0.75 0.9569 0.6039 0.4824,\ 31 | 0.78125 0.9451 0.5529 0.4353,\ 32 | 0.8125 0.9255 0.4980 0.3882,\ 33 | 0.84375 0.8980 0.4392 0.3451,\ 34 | 0.875 0.8706 0.3765 0.3020,\ 35 | 0.90625 0.8353 0.3137 0.2588,\ 36 | 0.9375 0.7961 0.2431 0.2196,\ 37 | 0.96875 0.7529 0.1569 0.1843,\ 38 | 1 0.7059 0.0157 0.1490\ 39 | ) 40 | -------------------------------------------------------------------------------- /readme.markdown: -------------------------------------------------------------------------------- 1 | ## What is this for? 2 | 3 | This are my default definitions for plotting and working effective with gnuplot. 4 | 5 | ## Installation 6 | 7 | Too install the templates just store is somewhere on your computer and let Gnuplot know about it. I store these file in the Application Support Folder. To do same type and execute following in the console: 8 | 9 | $ cd ~/Library/Application Support/ 10 | $ git clone https://github.com/hesstobi/Gnuplot-Templates.git Gnuplot 11 | 12 | And than add this folder to the GNUPLOT\_LIB Enviroment Variable by adding following line to your .bash_profile 13 | 14 | export GNUPLOT_LIB="$HOME/Library/Application Support/Gnuplot:$GNUPLOT_LIB" 15 | 16 | ## Usage 17 | 18 | ### Essentials Defaults 19 | 20 | All essential default are saved in the `default.gp` and the `layout-default.gp`. Simple 21 | 22 | load 'defaults.gp' 23 | 24 | to use the settings. Here is example plot with this layout: 25 | 26 | ![Default Layout](help/test-defaultsPNG.png) 27 | 28 | #### Settings 29 | 30 | You can easily change some settings by defining the following variables before you load the defaults 31 | 32 | * TEXTCOLOR 33 | * GRIDCOLOR 34 | * LINEWIDTH 35 | * POINTSIZE 36 | * LOCALE 37 | 38 | The LOCALE is set by default to the $LANG environment variable. By over writing the value the decimalsign and foramting of dates is adapted. 39 | 40 | #### Labels 41 | 42 | For better control over the position of the x and y-labels there predefined labels for each axes. 43 | 44 | Axes | Label-ID 45 | ------------- | ------------- 46 | x | 100 47 | x2 | 101 48 | y | 200 49 | y2 | 201 50 | 51 | Use them in conjunction with `bmargin`, `tmargin`, `rmargin` and `lmargin` 52 | 53 | #### Line Types 54 | 55 | Since Gnuplot 5.0 the color and the dash-type are separated in the settings. To use dashes lines just define the `dashtype` in the plot command. 56 | 57 | For plot with `points` or `linepoints` some nice point-types are preset in the line-type definition. To overwrite these just define the `pointtype` in the plot command 58 | 59 | **Exambles** 60 | 61 | ![Test LinestypesPNG](help/test-linestypesPNG.png) 62 | 63 | 64 | ### Color Themes 65 | 66 | This Templates are including a nice set of different color themes. To use one of them run 67 | 68 | load 'colors-[theme].gp' 69 | 70 | ![Test ColorsPNG](help/test-colorsPNG.png) 71 | 72 | 73 | ### More Layouts 74 | 75 | The pictures showes the predefiend layouts of this template set. To use one of them run 76 | 77 | load 'layout-[layout].gp' 78 | 79 | The layout-default is load with the `defaults.gp` 80 | 81 | ![Test LayoutsPNG](help/test-layoutsPNG.png) 82 | 83 | 84 | ### Latex 85 | 86 | By loading `latex.gp` the format is set to `\\num{%g}` and these label function are set: 87 | 88 | ![Test LatexPNG](help/test-latexPNG.png) 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /template-default.gp: -------------------------------------------------------------------------------- 1 | #*###################################################### 2 | #* Help 3 | #*###################################################### 4 | #* 5 | #* Here you can define your default gnuplot template. 6 | #* In this template you can use with #{varname} these 7 | #* variables : 8 | #* name - the name of the file 9 | #* project - the project name 10 | #* author - your name 11 | #* date - the current date 12 | #* year - the current year 13 | #* copy - the copyright holder 14 | #* 15 | #* Lines beginning with #* will be not displayed in the 16 | #* resulting file. Thus these can used for commenting 17 | #* this file 18 | #* 19 | #!/usr/bin/gnuplot 20 | ####################################################### 21 | # 22 | # #{name} 23 | # #{project} 24 | # 25 | # Created by #{author} on #{date}. 26 | # Copyright #{year} #{copy}. All rights reserved. 27 | # 28 | ######################################################## 29 | 30 | reset 31 | 32 | ######################################################## 33 | # Terminal 34 | ######################################################## 35 | # 36 | # Size 37 | # - 16cm,10cm A4-Page normal FigSize 38 | # - 13.5cm,7.9cm PowerPoint-Presentation Size 11/16 39 | set terminal cairolatex pdf color size 16cm,10cm 40 | # posible Options: 41 | # {eps | pdf} 42 | # {standalone | input} 43 | # {blacktext | colortext | colourtext} 44 | # {header
| noheader} 45 | # {mono|color} 46 | # {{no}transparent} {{no}crop} {background } 47 | # {font } {fontscale } 48 | # {linewidth } {rounded|butt} {dashlength
} 49 | # {size {unit},{unit}} 50 | 51 | 52 | ######################################################## 53 | # Loading Layouts 54 | ######################################################## 55 | 56 | # Layout 57 | # GRIDCOLOR = "#000000" 58 | # TEXTCOLOR = "#000000" 59 | # POINTSIZE = 1 60 | # LINEWIDTH = 1 61 | # LOCALE = de_de 62 | load 'defaults.gp' 63 | 64 | ######################################################## 65 | # Plot 66 | ######################################################## 67 | set output '#{name}.tex' 68 | 69 | set label 100 longArrowLabel('desc','symb','unit') 70 | set label 200 longArrowLabel('desc','symb','unit') 71 | 72 | 73 | plot ${0:sin(x)} with lines -------------------------------------------------------------------------------- /texHeader.tex: -------------------------------------------------------------------------------- 1 | \usepackage[utf8]{inputenc} 2 | \usepackage[T1]{fontenc} 3 | \usepackage{lmodern} 4 | \usepackage[]{siunitx} \addto\extrasgerman{\sisetup{locale = DE}} 5 | \usepackage{nicefrac} 6 | \usepackage{ieehsymb} 7 | \usepackage{eurosym} 8 | \usepackage{tikz} 9 | \usetikzlibrary{arrows} 10 | \renewcommand{\familydefault}{\sfdefault} -------------------------------------------------------------------------------- /unset-layout.gp: -------------------------------------------------------------------------------- 1 | unset xtics 2 | unset ytics 3 | unset mxtics 4 | unset mytics 5 | unset key 6 | unset grid 7 | unset border 8 | unset xlabel 9 | unset ylabel 10 | unset label 100 11 | unset label 101 12 | unset label 200 13 | unset label 201 14 | unset arrow 100 15 | unset arrow 200 16 | 17 | unset lmargin 18 | unset bmargin 19 | unset tmargin 20 | unset rmargin 21 | 22 | 23 | 24 | 25 | set xrange [*:*] 26 | set yrange [*:*] 27 | set zrange [*:*] --------------------------------------------------------------------------------