|
4 | 4 | .DESCRIPTION |
5 | 5 | This script uses turtle graphics to draw a pie graph based on the provided data. |
6 | 6 | .EXAMPLE |
7 | | - turtle PieGraph 400 400 80 20 save ./80-20.svg |
| 7 | + turtle PieGraph 400 80 20 save ./80-20.svg |
8 | 8 | .EXAMPLE |
9 | | - turtle PieGraph 400 400 5 10 15 20 15 10 5 | Save-Turtle ./PieGraph.svg |
| 9 | + turtle PieGraph 400 5 10 15 20 15 10 5 | Save-Turtle ./PieGraph.svg |
10 | 10 | .EXAMPLE |
11 | | - turtle width 400 height 400 PieGraph 400 400 @{value=20;fill='red'} @{value=40;fill='blue'} save ./PieGraphColor.svg |
| 11 | + turtle PieGraph 400 @{value=20;fill='red'} @{value=40;fill='blue'} save ./PieGraphColor.svg |
12 | 12 | .EXAMPLE |
13 | | - turtle PieGraph 400 400 @( |
| 13 | + turtle PieGraph 400 @( |
14 | 14 | 5,10,15,20,15,10,5 | Sort-Object -Descending |
15 | 15 | ) | Save-Turtle ./PieGraphDescending.svg |
16 | 16 | .EXAMPLE |
17 | | - turtle rotate (Get-Random -Max 360) PieGraph 400 400 @( |
| 17 | + turtle rotate (Get-Random -Max 360) PieGraph 400 @( |
18 | 18 | 5,10,15,20,15,10,5 | Sort-Object -Descending |
19 | 19 | ) | Save-Turtle ./PieGraphDescendingRotated.svg |
20 | 20 | .EXAMPLE |
21 | | - turtle PieGraph 200 200 ( |
| 21 | + turtle PieGraph 200 ( |
22 | 22 | @(1..50) | |
23 | 23 | Get-Random -Count (Get-Random -Minimum 5 -Maximum 20) |
24 | 24 | ) save ./RandomPieGraph.svg |
25 | | -.EXAMPLE |
| 25 | +.EXAMPLE |
26 | 26 | turtle rotate -90 piegraph 100 @( |
27 | 27 | $allTokens = Get-Module Turtle | |
28 | 28 | Split-Path | |
|
107 | 107 | turtle PieGraph 200 200 @(1..50 | Get-Random -Count $n) |
108 | 108 | ) save ./RandomPieGraphMorph.svg |
109 | 109 | .EXAMPLE |
110 | | - turtle PieGraph 200 200 ( |
| 110 | + turtle PieGraph 200 ( |
111 | 111 | @(1..50;-1..-50) | |
112 | 112 | Get-Random -Count (Get-Random -Minimum 5 -Maximum 20) |
113 | 113 | ) save ./RandomPieGraphWithNegative.svg |
114 | 114 | .EXAMPLE |
115 | | - $randomNegativePie = turtle PieGraph 200 200 ( |
| 115 | + $randomNegativePie = turtle PieGraph 200 ( |
116 | 116 | @(1..50;-1..-50) | |
117 | 117 | Get-Random -Count 10 |
118 | 118 | ) |
119 | | - turtle width 200 height 200 morph @( |
| 119 | + turtle viewbox 200 morph @( |
120 | 120 | $randomNegativePie |
121 | 121 | turtle PieGraph 200 200 ( |
122 | 122 | @(1..50;-1..-50) | |
|
0 commit comments