Genetic classification of igneous rock
(Irvine & Baragar, 1971)



Gnuplot's Script

# This script was provided by Mudith Karunaratne (Cambridge Univesity,
# Department of Material Science and Metallurgy) and Dr. Engelbert
# Buxbaum (Kuwait University, Health Sciences Center)
#
# latest update on 18.06.2000 by IWW
#

set size square
set angle degrees
set noborder
set xrange [-10:100]
set yrange [-10:100]
set noxtics
set noytics
set nokey

# plot triangular coordinate system

set linestyle 1 lt 3 lw 1 pt -1 ps 1
set linestyle 2 lt 5 lw 1 pt -1 ps 1

# x-axis
set arrow 1 from 0,0 to 100.0, 0.0 nohead linestyle 1
set arrow 2 from 10,0 to 55.0, 77.9 nohead linestyle 2
set arrow 3 from 20,0 to 60.0, 69.3 nohead linestyle 2
set arrow 4 from 30,0 to 65.0, 60.6 nohead linestyle 2
set arrow 5 from 40,0 to 70.0, 52.0 nohead linestyle 2
set arrow 6 from 50,0 to 75.0, 43.3 nohead linestyle 2
set arrow 7 from 60,0 to 80.0, 34.6 nohead linestyle 2
set arrow 8 from 70,0 to 85.0, 26.0 nohead linestyle 2
set arrow 9 from 80,0 to 90.0, 17.3 nohead linestyle 2
set arrow 10 from 90,0 to 95.0, 8.7 nohead linestyle 2

# y-axis
set arrow 11 from 100, 0.0 to 50.0, 86.6 nohead linestyle 1
set arrow 12 from 95, 8.7 to 5.0, 8.7 nohead linestyle 2
set arrow 13 from 90, 17.3 to 10.0, 17.3 nohead linestyle 2
set arrow 14 from 85, 26.0 to 15.0, 26.0 nohead linestyle 2
set arrow 15 from 80, 34.6 to 20.0, 34.6 nohead linestyle 2
set arrow 16 from 75, 43.3 to 25.0, 43.3 nohead linestyle 2
set arrow 17 from 70, 52.0 to 30.0, 52.0 nohead linestyle 2
set arrow 18 from 65, 60.6 to 35.0, 60.6 nohead linestyle 2
set arrow 19 from 60, 69.3 to 40.0, 69.3 nohead linestyle 2
set arrow 20 from 55, 77.9 to 45.0, 77.9 nohead linestyle 2

# z-axis
set arrow 21 from 50, 86.6 to 0,0 nohead linestyle 1
set arrow 22 from 5.0, 8.7 to 10,0 nohead linestyle 2
set arrow 23 from 10.0, 17.3 to 20,0 nohead linestyle 2
set arrow 24 from 15.0, 26.0 to 30,0 nohead linestyle 2
set arrow 25 from 20.0, 34.6 to 40,0 nohead linestyle 2
set arrow 26 from 25.0, 43.3 to 50,0 nohead linestyle 2
set arrow 27 from 30.0, 52.0 to 60,0 nohead linestyle 2
set arrow 28 from 35.0, 60.6 to 70,0 nohead linestyle 2
set arrow 29 from 40.0, 69.3 to 80,0 nohead linestyle 2
set arrow 30 from 45.0, 77.9 to 90,0 nohead linestyle 2

# gx(x,y) = x + y * cos(60)           # edge position is "z y x"

gx(x,y) = 100 - (x + y) + y * cos(60) # 100 - (x + y) will switch edge
                                        position to "x y z"
gy(x,y) = y * cos(30)

# Label of edges

set label 31 "A" at -5,-5 right font "Helvetica,24"       # label x-Axis
set label 32 "F" at 50,92.5 center font "Helvetica,24"    # label y-Axis
set label 33 "M" at 105, -5 left font "Helvetica,24"      # label z-Axis

# Label of points

set label 34 "R" at 19.3,32.8 center
set label 35 "D" at 28.0,41.5 center
set label 36 "A" at 33.4,47.4 center
set label 37 "BA" at 41.3,53.7 center
set label 38 "FB" at 51.5,58.8 center
set label 39 "B" at 64.3,48.9 center

set label 40 "R" at 19.8,19.2 center
set label 41 "D" at 32.5,27.8 center
set label 42 "A" at 39.0,32.1 center
set label 43 "BA" at 46.7,36.5 center
set label 44 "B" at 53.7,39.9 center

# Legend

set label 45 "Key" at 85,87 left

set label 46 "A" at 82,82 right
set label 47 "F" at 82,78 right
set label 48 "M" at 82,74 right
set label 49 "B" at 82,70 right
set label 50 "FB" at 82,66 right
set label 51 "BA" at 82,62 right
set label 52 "A" at 82,58 right
set label 53 "D" at 82,54 right
set label 54 "R" at 82,50 right

set label 55 'Na_2O+K_2O' at 85,82 left
set label 56 'FeO+Fe_2O_3' at 85,78 left
set label 57 "MgO" at 85,74 left
set label 58 "basalt" at 85,70 left
set label 59 "ferro-basalt" at 85,66 left
set label 60 "basaltic andesite" at 85,62 left
set label 61 "andesite" at 85,58 left
set label 62 "dacite" at 85,54 left
set label 63 "rhyolite" at 85,50 left

set label 64 "tholeiitic" at 75.0,34.6 rotate
set label 65 "calc-alkaline" at 72.5,30.3 rotate

# ---------------------------------------------------------
# the rotate command in gnuplot just rotate text into 90
# degree. When the text will be rotated into certain degree
# it should be modified in postscript file.
# ---------------------------------------------------------

plot "irvine1.dat" using (gx($1,$2)):(gy($1,$2)) with points 7, \
     "irvine1.dat" using (gx($1,$2)):(gy($1,$2)):(0.1) smooth acsplines, \
      notitle with lines 8, \
     "irvine2.dat" using (gx($1,$2)):(gy($1,$2)):(0.1) smooth acsplines, \
      notitle with lines 8, \
     "irvine3.dat" using (gx($1,$2)):(gy($1,$2)) with points 71, \
     "irvine3.dat" using (gx($1,$2)):(gy($1,$2)) with line 8

# -------------------------------------------------------------
# Coordinate of the points of Irvine & Baragar's classification
# -------------------------------------------------------------

# irvine1.dat

#A F M
63.2 35.0 1.8
49.5 45.0 5.5
40.7 51.8 7.5
29.2 59.1 11.7
16.0 65.0 19
8.9 53.6 37.5

# irvine2.dat

#A F M
64.7 31.7 3.6
51.0 40.0 9.0
35.0 50.0 15
21.3 56.2 22.5
15.0 50.0 35
10.1 40.8 49.1

# irvine3.dat

#A F M
67.7 25 7.3
50.0 35 15
41.0 40 18
30.8 45 24.2
21.8 49 29.2
 

This document was generated on 18 June 2000 using the texi2html translator version 1.51.