Plot coordinate pairs: Difference between revisions

Content added Content deleted
(Replacing "gnuplot" with "gnuplotlib".)
Line 1,265: Line 1,265:
clear
clear
linewidth 0.5
linewidth 0.5
move 10 3
move 10 97
line 10 95
line 10 5
line 95 95
line 95 5
textsize 3
textsize 3
n = len x[]
n = len x[]
m = 0
m = 0
for i = 1 to n
for i = 1 to n
if y[i] > m
if y[i] > m
m = y[i]
m = y[i]
.
.
.
.
linewidth 0.1
linewidth 0.1
sty = m div 9
sty = m div 9
for i = 0 to 9
for i range0 10
move 2 94 - i * 10
move 2 4 + i * 10
text i * sty
text i * sty
move 10 95 - i * 10
move 10 5 + i * 10
line 95 95 - i * 10
line 95 5 + i * 10
.
.
stx = x[n] div 9
stx = x[n] div 9
for i = 0 to 9
for i range0 10
move i * 9 + 10 96.5
move i * 9 + 10 1
text i * stx
text i * stx
move i * 9 + 10 95
move i * 9 + 10 5
line i * 9 + 10 3
line i * 9 + 10 97
.
.
color 900
color 900
linewidth 0.5
linewidth 0.5
for i = 1 to n
for i = 1 to n
x = x[i] * 9 / stx + 10
x = x[i] * 9 / stx + 10
y = 100 - (y[i] / sty * 10 + 5)
y = y[i] / sty * 10 + 5
if i = 1
if i = 1
move x y
move x y
else
else
line x y
line x y
.
.
.
.
</syntaxhighlight>
</syntaxhighlight>