Различия
Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
classifydiag:cpx_morimoto_kitamura [2016/01/29 13:04] admin |
classifydiag:cpx_morimoto_kitamura [2018/11/12 15:07] (текущий) |
||
---|---|---|---|
Строка 1: | Строка 1: | ||
- | ====== Q-J diagram Morimoto and Kitamura, 1983 ====== | + | ====== Px: Q-J Diagram, Morimoto, 1988 ====== |
Classifiaction of pyroxene in Q-J system. | Classifiaction of pyroxene in Q-J system. | ||
Строка 5: | Строка 5: | ||
=== Details === | === Details === | ||
- | ^ Article | Morimoto, N., Kitamura, M., 1983. Q–J diagram for classification of pyroxens. Journal of the Japanese Association of Mineralogy, Petrology, and Economic Geology 78, 141. | | + | | Reference | <ref:morimoto1988> | |
- | ^[[:ppy:mod_classifydiag#cpx_morimoto_kitamura|Построить]] ^ ^ | + | | Data | mineral | |
+ | | Input | wtp | | ||
+ | |||
+ | <use:classifydiag.cpx_morimoto_kitamura> | ||
+ | <test:classifydiag.cpx_morimoto_kitamura> | ||
+ | |||
+ | <WRAP center round todo 60%> | ||
+ | * <del>заголовок</del> | ||
+ | * <del>краткое описание</del> | ||
+ | * <del>статья</del> | ||
+ | * <del>ссылка</del> | ||
+ | * <del>карточка</del> | ||
+ | * подробное описание | ||
+ | * <del>код</del> | ||
+ | * тест | ||
+ | </WRAP> | ||
=== Код метода === | === Код метода === | ||
<Code linenums lang-r> | <Code linenums lang-r> | ||
- | require('ggplot2'); | ||
- | source('recalc_cpx_sturm.r'); | ||
- | classifydiag.cpx_morimoto_kitamura <- function (wtp_data, annotate=T, labels=F, ...) | + | source("recalc_cpx_sturm.r"); |
- | { | + | |
- | font_size=3; | + | |
- | line_height=0.7; | + | |
- | ds <- selectNames(recalc.cpx_sturm(wtp_data),c('Name','Ca_pfu','Mg_pfu','Fe_M2_pfu','Na_pfu')); | + | |
- | ds$J <- 2*ds$Na_pfu; | + | classifydiag.cpx_morimoto_kitamura <- function (wtp_data, annotate=T, ...){ |
- | ds$Q <- ds$Ca_pfu + ds$Fe_M2_pfu + ds$Mg_pfu; | + | |
- | txts <- data.frame(Label=c('Quad','Ca-Na','Na','Other','Jo,Ka,\nPe,Es','En,Fs,Df,\nHd,Wo'), | + | ds <- selectNames(recalc.cpx_sturm(wtp_data), |
- | J=c(0.1,0.9,1.5,0.3,0,0.0), | + | c("Name", "Ca_pfu", "Mg_pfu", "Fe_M2_pfu", "Na_pfu")); |
- | Q=c(1.5,0.9,0.2,0.5,1,2)); | + | |
- | p <- ggplot(ds, aes(x=J,y=Q)) + | + | pts <- data.frame(Name=ds$Name, |
- | geom_point() + | + | X=2 * ds$Na_pfu, |
- | theme_bw() + | + | Y=ds$Ca_pfu + ds$Fe_M2_pfu + ds$Mg_pfu); |
- | xlim(c(0,2)) + | + | |
- | ylim(c(0,2)) + | + | marks <- data.frame(Label=c("Quad", "Ca-Na", "Na", "Other", |
- | geom_abline(intercept = 0, slope = 0.25) + | + | "Jo,Ka,\nPe,Es", "En,Fs,Df,\nHd,Wo"), |
- | geom_abline(intercept = 0, slope = 4) + | + | X=c(0.1, 0.9, 1.5, 0.3, 0.0, 0.0), |
- | geom_abline(intercept = 1.5, slope = -1) + | + | Y=c(1.5, 0.9, 0.2, 0.5, 1.0, 2.0)); |
- | geom_abline(intercept = 2.0, slope = -1) + | + | |
- | xlab("J")+ | + | limits <- c(0,2,0,2); |
- | ylab("Q")+ | + | |
- | geom_text(data=txts, aes(label=Label), size=font_size, lineheight=line_height); | + | lines <- data.frame(X1 = c(0.0, 0.0, 2.0, 1.5), |
- | + | Y1 = c(0.0, 0.0, 0.0, 0.0), | |
- | if (labels) | + | X2 = c(2.0, 0.5, 0.0, 0.0), |
- | { | + | Y2 = c(0.5, 2.0, 2.0, 1.5)); |
- | p <- p + geom_text(aes(label=Name),hjust=0, vjust=0, size=font_size, lineheight=line_height); | + | |
- | } | + | labels <- c("J", "Q"); |
- | + | ||
- | + | ret <- c(); | |
- | return(p); | + | |
+ | ret$type <- "diagram"; | ||
+ | ret$points <- pts; | ||
+ | ret$limits <- limits; | ||
+ | ret$marks <- marks; | ||
+ | ret$lines <- lines; | ||
+ | ret$labels <- labels; | ||
+ | |||
+ | return(ret); | ||
} | } | ||
</Code> | </Code> | ||
+ | |||
+ | {{tag>classifydiag mineral}} |