commit f0e16dc589a523d731dc130892c5b4fd2f0a2e3f
parent 6a52ba87010319b9931b502cd8e95f8f0d7bc26d
Author: Ivan Gankevich <igankevich@ya.ru>
Date: Sat, 21 Jan 2017 20:48:58 +0300
Translate graphs to Russian.
Diffstat:
4 files changed, 36 insertions(+), 21 deletions(-)
diff --git a/R/common.R b/R/common.R
@@ -1,10 +1,12 @@
source(file.path("R", "waves.R"))
source(file.path("R", "transform.R"))
-arma.qqplot_grid <- function (dir, params) {
- wave_params <- arma.load_wave_parameters(dir, params)
+arma.qqplot_grid <- function (dir, params, titles, ...) {
+ wave_params <- arma.load_wave_parameters(dir, params)
+ i <- 1
for (name in names(wave_params)) {
- arma.qqplot(wave_params[[name]])
+ arma.qqplot(wave_params[[name]], 100, titles[[i]], ...)
+ i <- i + 1
}
}
@@ -45,6 +47,7 @@ arma.skew_normal_1_plot <- function(x, params) {
d <- data[,i]
lines(x, d, lty=paste(params$linetypes[[i]]))
}
+ title(xlab="x", ylab="y")
}
@@ -60,6 +63,7 @@ arma.skew_normal_2_plot <- function(x, params) {
d <- data[,i]
lines(x, d, lty=paste(params$linetypes[[i]]))
}
+ title(xlab="x", ylab="y")
}
arma.fmt <- function(x, ndigits) {
diff --git a/R/waves.R b/R/waves.R
@@ -49,18 +49,17 @@ arma.load_wave_parameters <- function (
})
}
-arma.qqplot <- function (param, nsamples=100) {
- qdata <- param$qfunc(ppoints(nsamples))
+arma.qqplot <- function (param, nsamples=100, ttl, ...) {
+ qdata <- param$qfunc(ppoints(nsamples))
qqplot(
qdata,
param$data,
asp=1,
xlim=c(param$min, param$max),
- ylim=c(param$min, param$max),
- xlab="Expected",
- ylab="Estimated"
- )
- title(param$filename, line=-2)
+ ylim=c(param$min, param$max),
+ ...
+ )
+ title(ttl, line=-2)
qqline(param$data, distribution=param$qfunc)
}
diff --git a/phd-diss-ru.org b/phd-diss-ru.org
@@ -1430,7 +1430,7 @@ $\gamma_2$ --- эксцесс, $f$ --- ФПР, $F$ --- функция распр
распределения при различных параметрах показано на [[fig:skew-normal-1]].
#+name: fig:skew-normal-1
-#+begin_src R :results output graphics :exports results :file build/skew-normal-1.pdf
+#+begin_src R :results output graphics :exports results :file build/skew-normal-1-ru.pdf
source(file.path("R", "common.R"))
x <- seq(-3, 3, length.out=100)
params <- data.frame(
@@ -1477,7 +1477,7 @@ legend(
на [[fig:skew-normal-2]].
#+name: fig:skew-normal-2
-#+begin_src R :results output graphics :exports results :file build/skew-normal-2.pdf
+#+begin_src R :results output graphics :exports results :file build/skew-normal-2-ru.pdf
source(file.path("R", "common.R"))
x <- seq(-3, 3, length.out=100)
alpha <- c(0.00, 0.87, 2.25, 4.90)
@@ -1663,12 +1663,15 @@ cite:degtyarev2011modelling,degtyarev2013synoptic,boukhanovsky1997thesis
[[acf-slices]], [[standing-wave-distributions]], [[propagating-wave-distributions]].
#+name: propagating-wave-distributions
-#+begin_src R :results output graphics :exports results :file build/propagating-wave-qqplots.pdf
+#+begin_src R :results output graphics :exports results :file build/propagating-wave-qqplots-ru.pdf
source(file.path("R", "common.R"))
par(pty="s", mfrow=c(2, 2))
arma.qqplot_grid(
file.path("build", "propagating_wave"),
- c("elevation", "heights_y", "lengths_y", "periods")
+ c("elevation", "heights_y", "lengths_y", "periods"),
+ c("подъем", "высота по Y", "длина по Y", "период"),
+ xlab="x",
+ ylab="y"
)
#+end_src
@@ -1677,22 +1680,25 @@ arma.qqplot_grid(
[[file:build/propagating-wave-qqplots.pdf]]
#+name: standing-wave-distributions
-#+begin_src R :results output graphics :exports results :file build/standing-wave-qqplots.pdf
+#+begin_src R :results output graphics :exports results :file build/standing-wave-qqplots-ru.pdf
source(file.path("R", "common.R"))
par(pty="s", mfrow=c(2, 2))
arma.qqplot_grid(
file.path("build", "standing_wave"),
- c("elevation", "heights_y", "lengths_y", "periods")
+ c("elevation", "heights_y", "lengths_y", "periods"),
+ c("подъем", "высота по Y", "длина по Y", "период"),
+ xlab="x",
+ ylab="y"
)
#+end_src
#+caption: Спрямленные диаграммы для стоячих волн.
#+RESULTS: standing-wave-distributions
-[[file:build/standing-wave-qqplots.pdf]]
+[[file:build/standing-wave-qqplots-ru.pdf]]
#+name: acf-slices
#+header: :width 6 :height 9
-#+begin_src R :results output graphics :exports results :file build/acf-slices.pdf
+#+begin_src R :results output graphics :exports results :file build/acf-slices-ru.pdf
source(file.path("R", "common.R"))
propagating_acf <- read.csv(file.path("build", "propagating_wave", "acf.csv"))
standing_acf <- read.csv(file.path("build", "standing_wave", "acf.csv"))
@@ -1705,7 +1711,7 @@ for (i in seq(0, 4)) {
#+caption: Временные срезы АКФ для стоячих (слева) и прогрессивных (справа) волн.
#+RESULTS: acf-slices
-[[file:build/acf-slices.pdf]]
+[[file:build/acf-slices-ru.pdf]]
*** Верификация полей потенциалов скоростей
:PROPERTIES:
diff --git a/phd-diss.org b/phd-diss.org
@@ -1606,7 +1606,10 @@ source(file.path("R", "common.R"))
par(pty="s", mfrow=c(2, 2))
arma.qqplot_grid(
file.path("build", "propagating_wave"),
- c("elevation", "heights_y", "lengths_y", "periods")
+ c("elevation", "heights_y", "lengths_y", "periods"),
+ c("elevation", "height Y", "length Y", "period"),
+ xlab="x",
+ ylab="y"
)
#+end_src
@@ -1620,7 +1623,10 @@ source(file.path("R", "common.R"))
par(pty="s", mfrow=c(2, 2))
arma.qqplot_grid(
file.path("build", "standing_wave"),
- c("elevation", "heights_y", "lengths_y", "periods")
+ c("elevation", "heights_y", "lengths_y", "periods"),
+ c("elevation", "height Y", "length Y", "period"),
+ xlab="x",
+ ylab="y"
)
#+end_src