-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testondata.jl split into computing function and drowing finction
- Loading branch information
Showing
4 changed files
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/usr/bin/env julia | ||
|
||
using JLD | ||
using SymmetricTensors | ||
using PyCall | ||
@pyimport matplotlib as mpl | ||
using PyPlot | ||
mpl.rc("text", usetex=true) | ||
mpl.rc("font", family="serif", size = 8) | ||
|
||
|
||
""" | ||
pltdiag() | ||
Plots a chart of superdiagonal elements of cumulants of and its theoretical values | ||
""" | ||
function pltdiag() | ||
tdiag = try load("datafortests.jld")["theoretical diag"] | ||
catch | ||
println("please run test/gandata.jl and test/testondata.jl") | ||
return () | ||
end | ||
cum = try load("cumulants.jld")["cumulants"] | ||
catch | ||
println("please run test/testondata.jl") | ||
return () | ||
end | ||
n = cum[1].dats | ||
fig, ax = subplots(figsize = (3., 2.3)) | ||
col = ["cyan", "brown", "green", "red", "blue", "black"] | ||
for order in (2,4,5,6) | ||
c = cum[order] | ||
ax[:plot](diag(c), "o", color = col[order], label = "$order cumulant", markersize=3) | ||
ax[:plot]([fill(tdiag[order], n)...], "--", color = col[order], label = "theoretical") | ||
end | ||
PyPlot.ylabel("superdiagonal elements", labelpad = -1) | ||
PyPlot.xlabel("superdiagonal number", labelpad = -3) | ||
ax[:legend](fontsize = 4.5, loc = 5) | ||
fig[:savefig]("diagcumels.eps") | ||
end | ||
|
||
|
||
|
||
function main() | ||
pltdiag() | ||
end | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters