Это старая версия документа!


Диаграмма классификации горных пород

Диаграмма классификации горных пород.

Подробнее

Информация о публикации
Ссылка
Рассчитать

Код метода

require('ggplot2');

classifydiag.wholerock_type_rus <- function (wtp_data, annotate=T, labels=F, ...)
{  
  curve_1 <- data.frame(si=c(45,78), nak=c(0,4));
  curve_2 <- data.frame(si=c(39,53,64,78), nak=c(1,5,7.5,8));
  curve_3 <- data.frame(si=c(35.5,44,48,56.5,61,65,69,72,78), nak=c(1.5,4,5.5,11.5,12.5,12,10,9.5,9));
  curve_4st <- data.frame(si=c(31,32,33.2), nak=c(5,5.8,6.7));
  curve_4 <- data.frame(si=c(33.2,33.7,34.7,36,38,42,46,53,57,62,66,72,78), nak=c(6.7,9.5,12,14,16.5,19,20,19,17,13.5,12,11,10));
  curve_5 <- data.frame(si=c(54,59,64,66,67,69.5,71,75,78), nak=c(7.75,9,10,10.1,10,9,8.5,8.2,8.1));
  
  font_size=3;
  line_height=0.7;
  
  p <- ggplot(wtp_data, aes(x=SiO2_wtp,y=Na2O_wtp+K2O_wtp)) + geom_point() +
  geom_vline(xintercept = 44) + geom_vline(xintercept = 53) + geom_vline(xintercept = 64) +
  geom_line(data=data.frame(spline(curve_1, n = 20, method = "natural")), aes(x=x,y=y))+
  geom_line(data=data.frame(spline(curve_2, n = 20, method = "natural")), aes(x=x,y=y))+
  geom_line(data=data.frame(spline(curve_3, n = 100, method = "natural")), aes(x=x,y=y))+
  geom_line(data=data.frame(spline(curve_4st, n = 100, method = "natural")), aes(x=x,y=y))+
  geom_line(data=data.frame(spline(curve_4, n = 100, method = "natural")), aes(x=x,y=y))+
  geom_line(data=data.frame(spline(curve_5, n = 100, method = "natural")), aes(x=x,y=y))+
  theme_bw()+
  xlim(c(30,80)) +
  ylim(c(0,21)) +
  xlab('SiO2, wt%')+
  ylab('Na2O+K2O, wt%');
  
  if (labels)
  {
      p <- p + geom_text(aes(label=Name),hjust=0, vjust=0, size=font_size, lineheight=line_height);
  }
  
  if (annotate)
  {
      ants <- data.frame(
          x=c(37,48.5,58,71,35,39,42,41.5,40),
          y=c(21,21,21,21,1,1.7,1.4,1,0.5),
          label=c("Ультраосновные","Основные","Средние","Кислые","Кимберлиты","Слюдяные\nпириты","Пикриты","Перидотиты","Дуниты")
      )

      p <- p+ geom_text(data=ants,aes(x=x,y=y,label=label),size=font_size, lineheight=line_height);
    
      p <- p+       
      annotate("text", x = 36.5, y = 6.5, label = "Мелилитовые\nвулканические и\nплутонические\nпороды", size=font_size, lineheight=line_height)+
      annotate("text", x = 39.5, y = 14.5, label = "Фельдшпатоидные\nбесполевошпатовые\nвулканические и\nплутонические\nпороды", size=font_size, lineheight=line_height)+
      annotate("text", x = 46.5, y = 17.5, label = "Фельдшпатоидные\nсиениты", size=font_size, lineheight=line_height)+
      annotate("text", x = 47.5, y = 11.5, label = "Фельдшпатоидные\nбазальтоиды", size=font_size, lineheight=line_height)+
      annotate("text", x = 48, y = 9.5, label = "Фельдшпатоидные\nгабброиды", size=font_size, lineheight=line_height)+
      annotate("text", x = 47, y = 4.25, label = "Субщелочные базальты\nанортозиты\nгаббро", size=font_size, lineheight=line_height)+
      annotate("text", x = 51, y = 6.5, label = "Трахибазальты", size=font_size, lineheight=line_height)+
      annotate("text", x = 50, y = 3, label = "Анортозиты,\nизвестково-щелочные\nбазальты, толеитовые\nбазальт, габбро", size=font_size, lineheight=line_height)+
      annotate("text", x = 55.5, y = 15.25, label = "Фонолиты", size=font_size, lineheight=line_height)+
      annotate("text", x = 57, y = 14.5, label = "Фельдшпатоидные\nсиениты", size=font_size, lineheight=line_height)+
      annotate("text", x = 61, y = 11.5, label = "Щелочные трахиты,\nсиениты", size=font_size, lineheight=line_height)+
      annotate("text", x = 61, y = 10.0, label = "Трахиты,\nсиениты", size=font_size, lineheight=line_height)+
      annotate("text", x = 66, y = 10.0, label = "Кварцевые\nсиениты", size=font_size, lineheight=line_height)+
      annotate("text", x = 56, y = 8.2, label = "Трахиандезито-\nбазальты", size=font_size, lineheight=line_height)+
      annotate("text", x = 60.5, y = 9.25, label = "Трахи-\nандезиты", size=font_size, lineheight=line_height)+
      annotate("text", x = 56, y = 7.5, label = "Моноциты", size=font_size, lineheight=line_height)+
      annotate("text", x = 61, y = 8.5, label = "Кварцевые\nмоноциты", size=font_size, lineheight=line_height)+
      annotate("text", x = 59, y = 7.25, label = "Субщелочные диориты\nкварцевые диориты", size=font_size, lineheight=line_height)+
      annotate("text", x = 56, y = 4.5, label = "Андезитобазальты\nдиориты", size=font_size, lineheight=line_height)+
      annotate("text", x = 60.75, y = 5.5, label = "Андезиты\nкварцевые\nдиориты", size=font_size, lineheight=line_height)+
      annotate("text", x = 70, y = 10.75, label = "Пантеллериты", size=font_size, lineheight=line_height)+
      annotate("text", x = 66, y = 9, label = "Трахидациты", size=font_size, lineheight=line_height)+
      annotate("text", x = 73.5, y = 10.25, label = "Комендиты", size=font_size, lineheight=line_height)+
      annotate("text", x = 73.5, y = 9.5, label = "Щелочные граниты", size=font_size, lineheight=line_height)+
      annotate("text", x = 68.5, y = 8.5, label = "Субщелочные граниты", size=font_size, lineheight=line_height)+
      annotate("text", x = 71.5, y = 9, label = "Трахириадациты", size=font_size, lineheight=line_height)+
      annotate("text", x = 75, y = 8.5, label = "Лейкограниты", size=font_size, lineheight=line_height)+
      annotate("text", x = 66, y = 5.5, label = "Дациты\nгранодиариты", size=font_size, lineheight=line_height)+
      annotate("text", x = 70, y = 6, label = "Риодациты,\nграниты", size=font_size, lineheight=line_height)+
      annotate("text", x = 76, y = 6, label = "Риолиты,\nлейкограниты", size=font_size, lineheight=line_height);
  }
  
  return (p);
}
  • classifydiag/wholerock_type_rus.1443097050.txt.gz
  • Последние изменения: 2018/11/12 15:08
  • (внешнее изменение)