Plot coordinate pairs: Difference between revisions

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 ]
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 range= 1 to n
m = higherif y[i] > m
m = y[i]
.
.
linewidth 0.1
sty = m div 9
for i range= 100 to 9
move 2 94 - i * 10
text i * sty
Line 1,281 ⟶ 1,284:
line 95 95 - i * 10
.
stx = x[n - 1] div 9
for i range= 100 to 9
move i * 9 + 10 96.5
text i * stx
Line 1,290 ⟶ 1,293:
color 900
linewidth 0.5
for i range= 1 to n
x = x[i] * 9 / stx + 10
y = 100 - (y[i] / sty * 10 + 5)
if i = 01
move x y
else
line x y
.
.
.</syntaxhighlight>
 
=={{header|EchoLisp}}==
1,980

edits