Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/utils/plot.gp
2055 views
1
# set term pdfcairo color enhanced font ",8" fontscale 1.0 lw 0.5 size 7cm,5cm
2
set term pdfcairo color enhanced font ",8" fontscale 1.0 lw 0.5 size 14cm,10cm
3
4
# Set defaults
5
if (!exists("infile")) infile="solution_000000000.txt"
6
if (!exists("eqn")) eqn="linear_scalar_advection"
7
ext = ".pdf"
8
9
# Legend
10
set grid
11
12
# Axes and labels
13
set ylabel ""
14
set xlabel "x"
15
16
# Line styles
17
set style line 2 lw 3 lc rgb "black"
18
set style line 3 lw 3 lc rgb "black" dt 3 pt 4 ps 0.6
19
set style line 4 lw 3 lc rgb "black" dt (12,12) pt 2 ps 0.6
20
set style line 5 lw 3 lc rgb "black" dt (6,9) pt 6 ps 0.6
21
set style line 6 lw 3 lc rgb "black" dt (18,6,3,6) pt 8 ps 0.6
22
set style line 7 lw 3 lc rgb "black" dt (9,8,3,8) pt 10 ps 0.6
23
24
# Skip first line in data file...
25
set key autotitle columnhead
26
27
set out infile.ext
28
if (eqn eq "linear_scalar_advection") {
29
plot infile u 1:2 w l lw 3
30
}
31
if (eqn eq "euler") {
32
plot infile u 1:2 w l lw 3, \
33
'' u 1:3 w l lw 3, \
34
'' u 1:4 w l lw 3
35
}
36
37