Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2014-04-05 20:39:03 (GMT)
committer Walter Bender <walter@sugarlabs.org>2014-04-05 20:39:03 (GMT)
commita20dfdae990c929e02bc6b76d05bf1d480b88cfe (patch)
tree935f10af0d0ac2d866a4e63bbf8b70e3f84155b8
parenta93292fbe4fbdfa2794860467407c5893bae68ef (diff)
add new sample program
-rw-r--r--NEWS3
-rwxr-xr-xTurtleArt/tasprite_factory.py8
-rw-r--r--global_temp_1880_2005.csv126
-rw-r--r--samples/math-global-tempuratures.tb53
-rw-r--r--samples/thumbnails/math-global-tempuratures.pngbin0 -> 3348 bytes
5 files changed, 185 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index c4335e8..8823fcf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
201
+ENHANCEMENT:
+* New sample program: plot global tempuratures
+
BUG FIXES:
* Fixed problem with turning off hover help (Alan Aguiar)
* Fixed problem with starting plugins from exported Python code
diff --git a/TurtleArt/tasprite_factory.py b/TurtleArt/tasprite_factory.py
index 21777df..1873fbd 100755
--- a/TurtleArt/tasprite_factory.py
+++ b/TurtleArt/tasprite_factory.py
@@ -1403,7 +1403,7 @@ def generator(datapath):
svg_str = svg.basic_block()
f.write(svg_str)
close_file(f)
-
+ '''
svg = SVG()
f = open_file(datapath, "box.svg")
svg.set_scale(2)
@@ -1411,7 +1411,7 @@ def generator(datapath):
svg_str = svg.basic_box()
f.write(svg_str)
close_file(f)
-
+ '''
svg = SVG()
f = open_file(datapath, "media.svg")
svg.set_scale(2)
@@ -1504,7 +1504,6 @@ def generator(datapath):
svg_str = svg.clamp()
f.write(svg_str)
close_file(f)
- '''
svg = SVG()
f = open_file(datapath, "clampn.svg")
@@ -1518,7 +1517,6 @@ def generator(datapath):
f.write(svg_str)
close_file(f)
- '''
svg = SVG()
f = open_file(datapath, "clampe.svg")
svg.set_scale(2)
@@ -1530,7 +1528,6 @@ def generator(datapath):
svg_str = svg.clamp()
f.write(svg_str)
close_file(f)
- '''
svg = SVG()
f = open_file(datapath, "clampb.svg")
@@ -1555,6 +1552,7 @@ def generator(datapath):
svg_str = svg.clamp_until()
f.write(svg_str)
close_file(f)
+ '''
def main():
diff --git a/global_temp_1880_2005.csv b/global_temp_1880_2005.csv
new file mode 100644
index 0000000..febf16d
--- /dev/null
+++ b/global_temp_1880_2005.csv
@@ -0,0 +1,126 @@
+13.75
+13.8
+13.77
+13.76
+13.7
+13.7
+13.75
+13.65
+13.74
+13.85
+13.63
+13.72
+13.68
+13.68
+13.67
+13.73
+13.83
+13.88
+13.75
+13.83
+13.9
+13.84
+13.73
+13.69
+13.66
+13.75
+13.8
+13.61
+13.66
+13.65
+13.67
+13.66
+13.66
+13.68
+13.85
+13.91
+13.7
+13.6
+13.68
+13.8
+13.81
+13.87
+13.76
+13.8
+13.79
+13.84
+13.99
+13.87
+13.89
+13.75
+13.93
+13.99
+13.94
+13.83
+13.95
+13.89
+13.96
+14.08
+14.11
+14.03
+14.05
+14.11
+14.03
+14.1
+14.2
+14.07
+13.96
+14.01
+13.96
+13.94
+13.85
+13.96
+14.03
+14.11
+13.9
+13.9
+13.83
+14.08
+14.08
+14.06
+13.99
+14.08
+14.04
+14.08
+13.79
+13.89
+13.97
+14
+13.96
+14.08
+14.03
+13.9
+14
+14.14
+13.92
+13.95
+13.84
+14.13
+14.02
+14.09
+14.18
+14.27
+14.05
+14.26
+14.09
+14.06
+14.13
+14.27
+14.31
+14.19
+14.38
+14.35
+14.13
+14.14
+14.24
+14.38
+14.3
+14.4
+14.57
+14.33
+14.33
+14.48
+14.56
+14.55
+14.49
+14.63
diff --git a/samples/math-global-tempuratures.tb b/samples/math-global-tempuratures.tb
new file mode 100644
index 0000000..77fcee1
--- /dev/null
+++ b/samples/math-global-tempuratures.tb
@@ -0,0 +1,53 @@
+[[0, ["start", 2.0], 546, 73, [null, 17]],
+[1, "loadheap", 546, 371, [18, 2, 30]],
+[2, ["string", "global_temp_1880_2005.csv"], 699, 371, [1, null]],
+[3, ["setxy2", 0], 258, 166, [10, 39, 6, 11]],
+[4, ["number", 10.0], 370, 250, [6, null]],
+[5, "pop", 370, 208, [6, null]],
+[6, ["product2", 0], 316, 208, [3, 5, 4]],
+[7, "xcor", 389, 518, [8, null]],
+[8, ["minus2", 0], 316, 518, [38, 7, 9]],
+[9, ["number", 6.0], 413, 560, [8, null]],
+[10, ["until", 217], 240, 140, [25, 12, 3, null]],
+[11, ["vspace", 20], 258, 250, [3, 48]],
+[12, "isheapempty2", 296, 658, [10, null]],
+[13, ["setxy2", 0], 546, 203, [16, 14, 15, 20]],
+[14, ["number", 300.0], 604, 203, [13, null]],
+[15, ["number", 0], 604, 245, [13, null]],
+[16, "penup", 546, 161, [17, 13]],
+[17, "clean", 546, 119, [0, 16]],
+[18, "setpensize", 546, 329, [20, 19, 1]],
+[19, ["number", 1.0], 648, 329, [18, null]],
+[20, "pendown", 546, 287, [13, 18]],
+[21, "show", 546, 455, [30, 22, 27]],
+[22, ["string", "2005"], 604, 455, [21, null]],
+[23, "show", 546, 665, [35, 24, 46]],
+[24, ["string", "1880"], 604, 665, [23, null]],
+[25, "hat", 240, 86, [null, 26, 10]],
+[26, ["string", "plot data"], 298, 98, [25, null]],
+[27, "stack", 546, 497, [21, 28, 31]],
+[28, ["string", "plot data"], 604, 497, [27, null]],
+[29, "black", 623, 413, [30, null]],
+[30, "setcolor", 546, 413, [1, 29, 21]],
+[31, "setcolor", 546, 539, [27, 32, 35]],
+[32, "black", 623, 539, [31, null]],
+[33, "red", 353, 398, [34, null]],
+[34, "setcolor", 276, 398, [48, 33, null]],
+[35, ["setxy2", 0], 546, 581, [31, 37, 36, 23]],
+[36, ["number", 0], 604, 623, [35, null]],
+[37, "xcor", 604, 581, [35, null]],
+[38, ["setxy2", 20], 258, 518, [48, 8, 40, null]],
+[39, "xcor", 316, 166, [3, null]],
+[40, "ycor", 316, 600, [38, null]],
+[41, "setcolor", 276, 458, [48, 42, null]],
+[42, "blue", 353, 458, [41, null]],
+[43, ["setxy2", 0], 546, 749, [46, 44, 45, null]],
+[44, ["number", 300.0], 604, 749, [43, null]],
+[45, ["number", 0], 604, 791, [43, null]],
+[46, "seth", 546, 707, [23, 47, 43]],
+[47, ["number", 90.0], 645, 707, [46, null]],
+[48, ["ifelse", [0, 0]],
+258, 332, [11, 49, 34, 41, 38]],
+[49, ["greater2", 0], 314, 298, [48, 50, 51, null]],
+[50, "ycor", 370, 298, [49, null]],
+[51, ["number", 140.0], 394, 340, [49, null]]]
diff --git a/samples/thumbnails/math-global-tempuratures.png b/samples/thumbnails/math-global-tempuratures.png
new file mode 100644
index 0000000..475920c
--- /dev/null
+++ b/samples/thumbnails/math-global-tempuratures.png
Binary files differ