-
Notifications
You must be signed in to change notification settings - Fork 1
/
shear_analyzer.jl
55 lines (40 loc) · 1.07 KB
/
shear_analyzer.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cd(@__DIR__)
using Plots
using DelimitedFiles
using LaTeXStrings
using Measures
function scatter_style(xl,yl)
scatter!(
ylabel=yl, xlabel=xl,
grid = :off,
box = :on,
foreground_color_legend = nothing,
fontfamily = "serif-roman",
font="CMU Serif",
xtickfontsize = 12,
ytickfontsize = 12,
xguidefontsize = 12,
yguidefontsize = 12,
thickness_scaling=1,
legendfontsize=10,
yguidefontrotation=0,
#legend_font_pointsize=14,
#legendtitlefontsize=14,
markersize=1,
legend=:topright,
margin=5mm
)
end
Nevents = 20
Ntime = 20
df = [readdlm("data/shearwave_1_$i.dat") for i in 1:Ntime]
for id in 1:Nevents
df .+= [readdlm("data/shearwave_$id"*"_$i.dat") for i in 1:Ntime]
end
df .*= 1.0/Nevents
plot()
for i in 1:Ntime
plot!(df[i][2:end], label="t="*string(round(20*df[i][1],digits=3) ))
end
scatter_style(L"y", L"\pi_x")
savefig("shear_relax.pdf")