Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
classifydiag:micas_tischendorf [2015/09/11 09:26]
admin
classifydiag:micas_tischendorf [2018/11/12 15:07] (текущий)
Строка 1: Строка 1:
-====== ​Классификация слюд в системе FeAl/​MgLi ​======+====== ​True and brittle micas composition,​ Tischendorf,​ 2007 ======
  
-Классификация по статье ​True and brittle micas: composition and solid-solution series. ​G. TISCHENDORF,​ H.-J. FORSTER2, B. GOTTESMANN, M. RIEDER+True and brittle micas: composition and solid-solution series.
  
-<code>+=== Details === 
 + 
 +| Reference | <ref:​tischendorf2007>​ | 
 +| Data | mineral | 
 +| Input | wtp | 
 + 
 +<​use:​classifydiag.micas_tischendorf>​ 
 +<​test:​classifydiag.micas_tischendorf>​ 
 + 
 +<WRAP center round todo 60%> 
 +  * <​del>​заголовок</​del>​ 
 +  * <​del>​краткое описание</​del>​ 
 +  * <​del>​статья</​del>​ 
 +  * <​del>​ссылка</​del>​ 
 +  * <​del>​карточка</​del>​ 
 +  * подробное описание 
 +  * <​del>​код</​del>​ 
 +  * тест 
 +</​WRAP>​ 
 + 
 +=== Source === 
 + 
 +<Code linenums lang-r>
 require('​ggplot2'​);​ require('​ggplot2'​);​
 source('​recalc_ms_tpf_realc0.r'​);​ source('​recalc_ms_tpf_realc0.r'​);​
Строка 9: Строка 31:
 classifydiag.micas_tischendorf <- function (wtp_data, annotate=T, labels=F, ...) classifydiag.micas_tischendorf <- function (wtp_data, annotate=T, labels=F, ...)
 {  ​ {  ​
-font_size=3;​ +ds <- selectNames(recalc.ms_tpf_realc0(wtp_data),​c('​Name',​'​Mg_pfu','​Li_pfu','​Fe_pfu','​Al_c4_pfu'​));​
-line_height=0.7;​ +
-ds <- selectNames(recalc.ms_tpf_realc0(wtp_data),​c('​Mg_pfu','​Li_pfu','​Fe_pfu','​Al_c4_pfu'​));​+
  
-end_members ​<- data.frame(x=c(0,​-1,​-2,​0,​0,​2,​3,​0), ​y=c(3,​2,​-1,​-3,​-1.8,​-1,​0,​1), lab=c('​ann','','​pol','​hyp-mus','​mus','​eas','​phl','​sid'​));+pts <- data.frame(Name=ds$Name,​ 
 +                  X=ds$Mg_pfu-ds$Li_pfu,​ 
 +                  Y=ds$Fe_pfu-ds$Al_c4_pfu);​ 
 +                   
 +emembers <- data.frame(Label=c('​ann','','​pol','​hyp-mus','​mus','​eas','​phl','​sid'​),​ 
 +                     X=c(0,​-1,​-2,​0,​0,​2,​3,​0),​ 
 +                     Y=c(3,​2,​-1,​-3,​-1.8,​-1,​0,​1));​
  
-<- ggplot(ds, aes(x=Mg_pfu-Li_pfu,y=Fe_pfu-Al_c4_pfu)) + +lines <- data.frame(X1 c( 0, -1, -2   0  2, 3), 
-  geom_point() + +                    ​Y1 ​c3 2-1  -3 -1, 0), 
-  geom_point(data=end_members,aes(x=x,y=y),shape = 25) + +                    X2 = c(-1, -2,  ​0, ​   2,   3, 0), 
-  ​geom_text(data=end_members,​aes(x=x,y=y,label=lab)size=font_sizelineheight=line_height,​ hjust=-0.4vjust=0) + +                    Y2 = c( 2, -1, -3,   ​-1, ​  0, 3));  ​
-  ​theme_bw() + +
-  xlim(c(-2,3)) + +
-  ylim(c(-3,3)) +  +
-  xlab("​Li <-> Mg"​)+ +
-  ylab("​Al_iv <-> Fe_tot"​); +
-  +
  
 +marks  <- data.frame(Label=c("​Phlogopite-\n-Annite",​ "​Siderophyllilte-\n-Ploylithionite",​ "​Muscovite\n(Celadonite)"​),​
 +                     ​X=c(1,​ -0.25, 0),
 +                     ​Y=c(2,​ 0.5, -1.25));
  
-if (labels+limits <- c(-2,3,-3,3); 
-{ + 
-    ​p ​<- p + geom_text(aes(label=Name),hjust=0, vjust=0, size=font_size,​ lineheight=line_height); + 
-}+labels ​<- c("Li <-> Mg""Al_iv <-> Fe_tot"​);
   ​   ​
-  ​ +ret <- c(); 
-return(p);+ 
 +ret$type <- "​diagram";​ 
 +ret$points <- pts; 
 +ret$limits <- limits; 
 +ret$marks <- rbind(marks,​emembers);​ 
 +ret$lines <- lines; 
 +ret$labels ​ <- labels; 
 + 
 +return(ret);
 } }
 +</​Code>​
  
-</code>+{{tag>classifydiag mineral}}
  • classifydiag/micas_tischendorf.1441963618.txt.gz
  • Последние изменения: 2018/11/12 15:08
  • (внешнее изменение)