Skip to content

Commit 3b8e9e4

Browse files
docs: Turtle.PieGraph examples ( Fixes PoshWeb#239 )
Updating examples
1 parent a82a7c6 commit 3b8e9e4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Types/Turtle/PieGraph.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@
44
.DESCRIPTION
55
This script uses turtle graphics to draw a pie graph based on the provided data.
66
.EXAMPLE
7-
turtle PieGraph 400 400 80 20 save ./80-20.svg
7+
turtle PieGraph 400 80 20 save ./80-20.svg
88
.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
1010
.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
1212
.EXAMPLE
13-
turtle PieGraph 400 400 @(
13+
turtle PieGraph 400 @(
1414
5,10,15,20,15,10,5 | Sort-Object -Descending
1515
) | Save-Turtle ./PieGraphDescending.svg
1616
.EXAMPLE
17-
turtle rotate (Get-Random -Max 360) PieGraph 400 400 @(
17+
turtle rotate (Get-Random -Max 360) PieGraph 400 @(
1818
5,10,15,20,15,10,5 | Sort-Object -Descending
1919
) | Save-Turtle ./PieGraphDescendingRotated.svg
2020
.EXAMPLE
21-
turtle PieGraph 200 200 (
21+
turtle PieGraph 200 (
2222
@(1..50) |
2323
Get-Random -Count (Get-Random -Minimum 5 -Maximum 20)
2424
) save ./RandomPieGraph.svg
25-
.EXAMPLE
25+
.EXAMPLE
2626
turtle rotate -90 piegraph 100 @(
2727
$allTokens = Get-Module Turtle |
2828
Split-Path |
@@ -107,16 +107,16 @@
107107
turtle PieGraph 200 200 @(1..50 | Get-Random -Count $n)
108108
) save ./RandomPieGraphMorph.svg
109109
.EXAMPLE
110-
turtle PieGraph 200 200 (
110+
turtle PieGraph 200 (
111111
@(1..50;-1..-50) |
112112
Get-Random -Count (Get-Random -Minimum 5 -Maximum 20)
113113
) save ./RandomPieGraphWithNegative.svg
114114
.EXAMPLE
115-
$randomNegativePie = turtle PieGraph 200 200 (
115+
$randomNegativePie = turtle PieGraph 200 (
116116
@(1..50;-1..-50) |
117117
Get-Random -Count 10
118118
)
119-
turtle width 200 height 200 morph @(
119+
turtle viewbox 200 morph @(
120120
$randomNegativePie
121121
turtle PieGraph 200 200 (
122122
@(1..50;-1..-50) |

0 commit comments

Comments
 (0)