Plot coordinate pairs: Difference between revisions
Content added Content deleted
(Added Wren) |
(Plot coordinate pairs en FreeBASIC) |
||
Line 1,168: | Line 1,168: | ||
The option to show Fōrmulæ programs and their results is showing images. Unfortunately images cannot be uploaded in Rosetta Code. |
The option to show Fōrmulæ programs and their results is showing images. Unfortunately images cannot be uploaded in Rosetta Code. |
||
=={{header|FreeBASIC}}== |
|||
{{trans|Liberty BASIC}} |
|||
===Text mode=== |
|||
<lang freebasic>Dim As Integer i, x(9), y(9) |
|||
For i = 0 To 9 |
|||
x(i) = i |
|||
Next i |
|||
y(0) = 2.7 |
|||
y(1) = 2.8 |
|||
y(2) = 31.4 |
|||
y(3) = 38.1 |
|||
y(4) = 58.0 |
|||
y(5) = 76.2 |
|||
y(6) = 100.5 |
|||
y(7) = 130.0 |
|||
y(8) = 149.3 |
|||
y(9) = 180.0 |
|||
Locate 22, 4 |
|||
For i = 0 To 9 |
|||
Locate 22, ((i * 4) + 2) : Print i |
|||
Next i |
|||
For i = 0 To 20 Step 2 |
|||
Locate (21 - i), 0 : Print (i * 10) |
|||
Next i |
|||
Color 14 |
|||
For i = 0 To 9 |
|||
Locate (21 - (y(i)/ 10)), (x(i) * 4) + 2 : Print "." |
|||
Next i |
|||
Sleep</lang> |
|||
=={{header|gnuplot}}== |
=={{header|gnuplot}}== |