Plot coordinate pairs: Difference between revisions
→{{header|EasyLang}}
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
|||
Line 1,259:
=={{header|EasyLang}}==
[https://easylang.online/apps/_plot_coord.html Run it]
<syntaxhighlight lang="text">
x[] = [ 0 1 2 3 4 5 6 7 8 9 ]
y[] = [ 2.7 2.8 31.4 38.1 58.0 76.2 100.5 130.0 149.3 180.0 ]
#
Line 1,270 ⟶ 1,271:
n = len x[]
m = 0
for i
m = y[i]
.
.
linewidth 0.1
sty = m div 9
for i
move 2 94 - i * 10
text i * sty
Line 1,281 ⟶ 1,284:
line 95 95 - i * 10
.
stx = x[n
for i
move i * 9 + 10 96.5
text i * stx
Line 1,290 ⟶ 1,293:
color 900
linewidth 0.5
for i
x = x[i] * 9 / stx + 10
y = 100 - (y[i] / sty * 10 + 5)
if i =
move x y
else
line x y
.
.
=={{header|EchoLisp}}==
|