Skip to content
Browse files

Add contouring example, from the Gri cookbook. Also, use more convent…

…ional # comments.

git-svn-id: http://svn.textmate.org/trunk/Bundles/Gri.tmbundle@1469 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information...
1 parent 0813419 commit 7f3779bc942dbcd9e4b2516519ba838eb7ac15f3 Dan Kelley committed
Showing with 62 additions and 4 deletions.
  1. +60 −0 Snippets/Contour (con).plist
  2. +2 −4 Snippets/Gri logo.plist
View
60 Snippets/Contour (con).plist
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>content</key>
+ <string># `date`
+# ${1:`niutil -readprop / /users/\\$USER realname`}
+
+# Read columnar data (x,y,z), convert to a grid, then contour.
+
+# Data from figure 5 of Koch et al., 1983, J. Climate
+# Appl. Met., volume 22, pages 1487-1503.
+open "http://gri.sourceforge.net/gridoc/examples/example5.dat"
+read columns x y z
+close
+set x size 12
+set x axis 0 12 2
+set y size 10
+set y axis 0 10 2
+set y margin 15
+draw axes
+set color rgb 0 0 .6 # dark blue
+set line width symbol 0.2
+set symbol size 0.2
+draw symbol bullet
+set font size 8
+draw values
+set color black
+set x grid 0 12 0.25
+set y grid 0 10 0.25
+
+# Uncomment one of the 'convert' lines below, to try
+# various gridding schemes.
+convert columns to grid # "default"
+#convert columns to grid objective # As default
+#convert columns to grid objective -1.4 -1.4 # As default
+#convert columns to grid objective -1.4 -1.4 5 1 # As default
+#convert columns to grid objective -1.4 -1.4 5 -1 # + fill grid
+#convert columns to grid objective -2 -2 # Average
+#convert columns to grid objective 2 2 #
+#convert columns to grid boxcar # Ugly
+#convert columns to grid boxcar -2 -2 # Still ugly
+
+set font size 12
+draw contour 0 40 10 2
+set line width rapidograph 3
+draw contour 0 40 10
+set color black
+draw title "N. Am. wind (Fig5 Koch et al, 1983)"
+</string>
+ <key>name</key>
+ <string>Contour (con)</string>
+ <key>scope</key>
+ <string>source.gri</string>
+ <key>tabTrigger</key>
+ <string>con</string>
+ <key>uuid</key>
+ <string>2046FFE7-A68E-4955-8FCA-C802F456792C</string>
+</dict>
+</plist>
View
6 Snippets/Gri logo.plist
@@ -3,11 +3,9 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>//
-// `date`
-// ${1:`niutil -readprop / /users/\\$USER realname`}
+ <string># `date`
+# ${1:`niutil -readprop / /users/\\$USER realname`}
-//
set x size 5
set y size 5
set y margin 20

0 comments on commit 7f3779b

Please sign in to comment.
Something went wrong with that request. Please try again.