Plot coordinate pairs: Difference between revisions

m
(add RPL)
 
(4 intermediate revisions by 3 users not shown)
Line 1,258:
 
=={{header|EasyLang}}==
[https://easylang.online/show/#cod=hVBBasMwELzrFQO9taBKVhxbh/YjRoeQKK3AlsEWqdzXd1dx2iQt1GCYndndWU3uHF7QQUGjgsEGNbZo0MLCiWVVK9nQ38JouYFppUbdSoVmKytopWQNbRQRemOlgW4ZO/EAse/9bhJ9iP4jHNI7qFUM48nTFGxTBIb1GdmaUPI5zeHTw4hI5r2PyJ0TA2EljuOEQEgjjYgCQDhi6YLDKwYu6eNOpriUQt64azGnhfQBh3CCXfdNu/jm6XrFI5fzajyR9Liy3/fdsKW3otCuSX5AKcmK7OeUyTB30f3jySOWNpU8LpZXJOX1R6u+s8xkuR978rBK3SX/O73zaRQf73vm8bKVpWWNsdBLeR1pP5dl8OvEFw== Run it]
[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,279 ⟶ 1,280:
sty = m div 9
for i range0 10
move 2 4 + i * 10
text i * sty
move 10 5 + i * 10
line 95 5 + i * 10
move 2 4 + i * 10
text i * sty
.
stx = x[n] div 9
for i range0 10
move i * 9 + 10 5
line i * 9 + 10 97
move i * 9 + 10 1
text i * stx
move i * 9 + 10 5
line i * 9 + 10 97
.
color 900
Line 1,296 ⟶ 1,297:
x = x[i] * 9 / stx + 10
y = y[i] / sty * 10 + 5
ifline ix = 1y
move x y
else
line x y
.
.
</syntaxhighlight>
Line 1,363 ⟶ 1,360:
 
{{FormulaeEntry|page=https://formulae.org/?script=examples/Plot_coordinate_pairs}}
 
'''Solution'''
 
[[File:Fōrmulæ - Plot coordinate pairs 01.png]]
 
[[File:Fōrmulæ - Plot coordinate pairs 02.png]]
 
=={{header|FreeBASIC}}==
Line 3,192 ⟶ 3,195:
=={{header|Wren}}==
{{libheader|DOME}}
<syntaxhighlight lang="ecmascriptwren">import "graphics" for Canvas, ImageData, Color
import "dome" for Window
import "math" for Point
2,058

edits