diff options
Revamp gnuplot plotting to generate better output
Using the pdfcairo terminal for generating fluid flow plots in gnuplot
using raw paraview-generated CSV exports generates high quality results.
Sadly the resulting files are both unoptimized and quite big which leads
to both large and unperformant documents (i.e. some PDF readers even crash)
As an alternative this new gnuplot structure generates the fluid plot
itself using the pngcairo terminal and includes the resulting
high-resolution PNG image into a normal pdfcairo plot. This works out
quite well.
As a side benefit the plot scripts are now much easier to maintain.
Diffstat (limited to 'img/common')
-rw-r--r-- | img/common/knudsen_fluid.gnuplot | 19 | ||||
-rw-r--r-- | img/common/knudsen_wrapper.gnuplot | 16 | ||||
-rw-r--r-- | img/common/moreland.pal | 36 | ||||
-rw-r--r-- | img/common/velocity_fluid.gnuplot | 19 | ||||
-rw-r--r-- | img/common/velocity_wrapper.gnuplot | 16 |
5 files changed, 106 insertions, 0 deletions
diff --git a/img/common/knudsen_fluid.gnuplot b/img/common/knudsen_fluid.gnuplot new file mode 100644 index 0000000..7ceb6b8 --- /dev/null +++ b/img/common/knudsen_fluid.gnuplot @@ -0,0 +1,19 @@ +set terminal pngcairo size 3520, 656 + +set output 'tmp/'.plotname.'.png' + +set palette defined (0 "dark-green", 0.5 "dark-green", 0.5 "yellow", 1.5 "yellow", 1.5 "red", 2 "red") + +set datafile separator ',' + +set size 1,1 +set margin 0,0,0,0 + +set yrange [0:4.1] +set xrange [0:22] +set cbrange [0:2] + +unset colorbox +unset key +unset tics +unset border diff --git a/img/common/knudsen_wrapper.gnuplot b/img/common/knudsen_wrapper.gnuplot new file mode 100644 index 0000000..5562b56 --- /dev/null +++ b/img/common/knudsen_wrapper.gnuplot @@ -0,0 +1,16 @@ +reset + +set term pdfcairo enh size 21cm, 5cm +set output 'static/'.plotname.'.pdf' + +set palette defined (0 "dark-green", 0.5 "dark-green", 0.5 "yellow", 1.5 "yellow", 1.5 "red", 2 "red") + +set size ratio -1 +set xtics 0,2,22 +set ytics 0,1,4 +set cbtics ("{/Symbol \243}0" 0, "1" 1, "{/Symbol \263}2" 2) +set cbrange [0:2] + +set cblabel "Verfeinerungskriterium" offset 1,0 + +plot 'tmp/'.plotname.'.png' binary filetype=png origin=(0.00625,0.00625) dx=0.00625 dy=0.00625 with rgbimage palette diff --git a/img/common/moreland.pal b/img/common/moreland.pal new file mode 100644 index 0000000..24b8cb9 --- /dev/null +++ b/img/common/moreland.pal @@ -0,0 +1,36 @@ +# See: https://github.com/Gnuplotting/gnuplot-palettes +set palette defined(\ +0 0.2314 0.2980 0.7529,\ +0.03125 0.2667 0.3529 0.8000,\ +0.0625 0.3020 0.4078 0.8431,\ +0.09375 0.3412 0.4588 0.8824,\ +0.125 0.3843 0.5098 0.9176,\ +0.15625 0.4235 0.5569 0.9451,\ +0.1875 0.4667 0.6039 0.9686,\ +0.21875 0.5098 0.6471 0.9843,\ +0.25 0.5529 0.6902 0.9961,\ +0.28125 0.5961 0.7255 1.0000,\ +0.3125 0.6392 0.7608 1.0000,\ +0.34375 0.6824 0.7882 0.9922,\ +0.375 0.7216 0.8157 0.9765,\ +0.40625 0.7608 0.8353 0.9569,\ +0.4375 0.8000 0.8510 0.9333,\ +0.46875 0.8353 0.8588 0.9020,\ +0.5 0.8667 0.8667 0.8667,\ +0.53125 0.8980 0.8471 0.8196,\ +0.5625 0.9255 0.8275 0.7725,\ +0.59375 0.9451 0.8000 0.7255,\ +0.625 0.9608 0.7686 0.6784,\ +0.65625 0.9686 0.7333 0.6275,\ +0.6875 0.9686 0.6941 0.5804,\ +0.71875 0.9686 0.6510 0.5294,\ +0.75 0.9569 0.6039 0.4824,\ +0.78125 0.9451 0.5529 0.4353,\ +0.8125 0.9255 0.4980 0.3882,\ +0.84375 0.8980 0.4392 0.3451,\ +0.875 0.8706 0.3765 0.3020,\ +0.90625 0.8353 0.3137 0.2588,\ +0.9375 0.7961 0.2431 0.2196,\ +0.96875 0.7529 0.1569 0.1843,\ +1 0.7059 0.0157 0.1490\ +) diff --git a/img/common/velocity_fluid.gnuplot b/img/common/velocity_fluid.gnuplot new file mode 100644 index 0000000..bd8e194 --- /dev/null +++ b/img/common/velocity_fluid.gnuplot @@ -0,0 +1,19 @@ +set terminal pngcairo size 3520, 656 + +set output 'tmp/'.plotname.'.png' + +load 'common/moreland.pal' + +set datafile separator ',' + +set size 1,1 +set margin 0,0,0,0 + +set yrange [0:4.1] +set xrange [0:22] +set cbrange [0:1.5] + +unset colorbox +unset key +unset tics +unset border diff --git a/img/common/velocity_wrapper.gnuplot b/img/common/velocity_wrapper.gnuplot new file mode 100644 index 0000000..534040e --- /dev/null +++ b/img/common/velocity_wrapper.gnuplot @@ -0,0 +1,16 @@ +reset + +set term pdfcairo enh size 21cm, 5cm +set output 'static/'.plotname.'.pdf' + +load 'common/moreland.pal' + +set size ratio -1 +set xtics 0,2,22 +set ytics 0,1,4 +set cbtics 0,0.5,1.5 +set cbrange [0:1.5] + +set cblabel "Geschwindigkeitsnorm" + +plot 'tmp/'.plotname.'.png' binary filetype=png origin=(0.00625,0.00625) dx=0.00625 dy=0.00625 with rgbimage palette |