Skip to content

Commit 9bfc23d

Browse files
committed
Fix bad source formatting
1 parent dc4670c commit 9bfc23d

File tree

11 files changed

+1374
-1375
lines changed

11 files changed

+1374
-1375
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ palette:scale-scheme
3636

3737
#### Colors can be represented as NetLogo colors or RGB or RGBA colors
3838

39-
* A NetLogo color (NLC or NL color) is a number in the range 0 to 140, with the exception of 140 itself, other values are ‘wrapped.'
39+
* A NetLogo color (NLC or NL color) is a number in the range 0 to 140, with the exception of 140 itself, other values are ‘wrapped.'
4040
- NetLogo colors are shades of a base color which has units digit 5, and is in the middle of the shade range.
4141
* An RGB color is a list of 3 numbers.
4242
- The numbers represent red, green and blue and are in the range 0 to 255.
@@ -765,7 +765,7 @@ Let *max-range* be the maximum of *range1* and *range2*. If *number* is greater
765765
766766
;; colors each patch with a color proportional to the gradient
767767
```
768-
768+
769769

770770

771771
### `palette:scheme-colors`

USING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ palette:scale-scheme
2525

2626
#### Colors can be represented as NetLogo colors or RGB or RGBA colors
2727

28-
* A NetLogo color (NLC or NL color) is a number in the range 0 to 140, with the exception of 140 itself, other values are ‘wrapped.'
28+
* A NetLogo color (NLC or NL color) is a number in the range 0 to 140, with the exception of 140 itself, other values are ‘wrapped.'
2929
- NetLogo colors are shades of a base color which has units digit 5, and is in the middle of the shade range.
3030
* An RGB color is a list of 3 numbers.
3131
- The numbers represent red, green and blue and are in the range 0 to 255.

demo/Color Gradient Example.nlogox

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ to full-scale-color
1111
__clear-all-and-reset-ticks
1212
ask patches
1313
[
14-
let normalized-value (pxcor + (pycor * world-width)) /
15-
(world-width * world-height)
16-
let patch-value normalized-value * 10 + 5
14+
let normalized-value (pxcor + (pycor * world-width)) /
15+
(world-width * world-height)
16+
let patch-value normalized-value * 10 + 5
1717
set plabel round patch-value
1818
; change the color name to see another hue
19-
set pcolor scale-color (red - 5) patch-value 0 10
19+
set pcolor scale-color (red - 5) patch-value 0 10
2020
]
2121
end
2222

@@ -29,12 +29,12 @@ to tint-scale-color
2929
__clear-all-and-reset-ticks
3030
ask patches
3131
[
32-
let normalized-value (pxcor + (pycor * world-width)) /
33-
(world-width * world-height)
34-
let patch-value normalized-value * 10 + 5
32+
let normalized-value (pxcor + (pycor * world-width)) /
33+
(world-width * world-height)
34+
let patch-value normalized-value * 10 + 5
3535
set plabel round patch-value
3636
; note the change from the range1 of full-scale-color from 0 to -10
37-
set pcolor scale-color (red - 5) patch-value -10 10
37+
set pcolor scale-color (red - 5) patch-value -10 10
3838
]
3939
end
4040

@@ -47,12 +47,12 @@ to shade-scale-color
4747
__clear-all-and-reset-ticks
4848
ask patches
4949
[
50-
let normalized-value (pxcor + (pycor * world-width)) /
51-
(world-width * world-height)
52-
let patch-value normalized-value * 10 + 5
50+
let normalized-value (pxcor + (pycor * world-width)) /
51+
(world-width * world-height)
52+
let patch-value normalized-value * 10 + 5
5353
set plabel round patch-value
5454
; note the change in the range2 of full-scale-color from 10 to 20
55-
set pcolor scale-color (red - 5) patch-value 0 20
55+
set pcolor scale-color (red - 5) patch-value 0 20
5656
]
5757
end
5858

@@ -65,11 +65,11 @@ to simple-rgb-gradient
6565
__clear-all-and-reset-ticks
6666
ask patches
6767
[
68-
let normalized-value (pxcor + (pycor * world-width)) /
69-
(world-width * world-height)
70-
let patch-value normalized-value * 255 + 128
68+
let normalized-value (pxcor + (pycor * world-width)) /
69+
(world-width * world-height)
70+
let patch-value normalized-value * 255 + 128
7171
set plabel round patch-value
72-
set pcolor ( list ( 255 - patch-value ) 0 patch-value )
72+
set pcolor ( list ( 255 - patch-value ) 0 patch-value )
7373
]
7474
end
7575

@@ -83,11 +83,11 @@ to palette-rgb-gradient
8383
__clear-all-and-reset-ticks
8484
ask patches
8585
[
86-
let normalized-value (pxcor + (pycor * world-width)) /
87-
(world-width * world-height)
88-
let patch-value normalized-value * 10 + 5
86+
let normalized-value (pxcor + (pycor * world-width)) /
87+
(world-width * world-height)
88+
let patch-value normalized-value * 10 + 5
8989
set plabel round patch-value
90-
set pcolor palette:scale-gradient
90+
set pcolor palette:scale-gradient
9191
[ [ 255 0 0 ] [0 0 255] ] patch-value 0 10
9292
]
9393
end
@@ -101,11 +101,11 @@ to rgb-multi-gradient
101101
__clear-all-and-reset-ticks
102102
ask patches
103103
[
104-
let normalized-value (pxcor + (pycor * world-width)) /
105-
(world-width * world-height)
106-
let patch-value normalized-value * 10 + 5
104+
let normalized-value (pxcor + (pycor * world-width)) /
105+
(world-width * world-height)
106+
let patch-value normalized-value * 10 + 5
107107
set plabel round patch-value
108-
set pcolor palette:scale-gradient
108+
set pcolor palette:scale-gradient
109109
[ [ 255 0 0 ] [ 255 255 0 ] [0 0 255]] patch-value 0 10
110110
]
111111
end
@@ -118,12 +118,12 @@ to normal-scale-scheme
118118
;; of the procedure.)
119119
__clear-all-and-reset-ticks
120120
ask patches
121-
[
122-
let normalized-value (pxcor + (pycor * world-width)) /
123-
(world-width * world-height)
121+
[
122+
let normalized-value (pxcor + (pycor * world-width)) /
123+
(world-width * world-height)
124124
let patch-value normalized-value * 10 + 5
125125
set plabel precision patch-value 1
126-
set pcolor palette:scale-scheme
126+
set pcolor palette:scale-scheme
127127
"Sequential" "Reds" 9 patch-value 0 10
128128
]
129129
end
@@ -137,11 +137,11 @@ to rgb-color-scale-gradient
137137
__clear-all-and-reset-ticks
138138
ask patches
139139
[
140-
let normalized-value (pxcor + (pycor * world-width)) /
141-
(world-width * world-height)
142-
let patch-value normalized-value * 10 + 5
140+
let normalized-value (pxcor + (pycor * world-width)) /
141+
(world-width * world-height)
142+
let patch-value normalized-value * 10 + 5
143143
set plabel round patch-value
144-
set pcolor palette:scale-gradient
144+
set pcolor palette:scale-gradient
145145
[ [ 255 0 0 ] [ 255 255 255 ] [0 0 255]] patch-value 0 10
146146
]
147147
end
@@ -155,15 +155,15 @@ to netlogo-color-scale-gradient
155155
__clear-all-and-reset-ticks
156156
ask patches
157157
[
158-
let normalized-value (pxcor + (pycor * world-width)) /
159-
(world-width * world-height)
160-
let patch-value normalized-value * 10 + 5
158+
let normalized-value (pxcor + (pycor * world-width)) /
159+
(world-width * world-height)
160+
let patch-value normalized-value * 10 + 5
161161
set plabel round patch-value
162162
; netlogo red is different than [ 255 0 0 ] it is [215 50 41]
163-
let red-netlogo extract-rgb red
163+
let red-netlogo extract-rgb red
164164
; netLogo blue is different than [ 0 0 255 ] it is [52 93 169
165-
let blue-netlogo extract-rgb blue
166-
set pcolor palette:scale-gradient
165+
let blue-netlogo extract-rgb blue
166+
set pcolor palette:scale-gradient
167167
( list red-netlogo [ 255 255 255 ] blue-netlogo ) patch-value 0 10
168168
]
169169
end
@@ -177,8 +177,8 @@ to scheme-color-scale-gradient
177177
__clear-all-and-reset-ticks
178178
ask patches
179179
[
180-
let normalized-value (pxcor + (pycor * world-width)) /
181-
(world-width * world-height)
180+
let normalized-value (pxcor + (pycor * world-width)) /
181+
(world-width * world-height)
182182
let patch-value normalized-value * 10 + 5
183183
set plabel round patch-value
184184
set pcolor palette:scale-gradient palette:scheme-colors "Divergent" "Spectral" 9 patch-value 0 10
@@ -216,7 +216,7 @@ Chantge the colors of the gradients.
216216

217217
## RELATED MODELS
218218

219-
This section could give the names of models in the NetLogo Models Library or elsewhere
219+
This section could give the names of models in the NetLogo Models Library or elsewhere
220220

221221
## CREDITS AND REFERENCES
222222

demo/Scale-Gradient Example.nlogox

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ In this particular example the gradient is taking the value of ( pxcor + (pycor
8787

8888
SCALE-GRADIENT [ [r g b] [r g b]] value range1 range2
8989

90-
where the first [r g b] list is the initial color
91-
and the second [r g b] list is the final color.
90+
where the first [r g b] list is the initial color
91+
and the second [r g b] list is the final color.
9292

9393
The syntax and behavior is similar to the SCALE-COLOR primitive otherwise:
9494

0 commit comments

Comments
 (0)