Plot coordinate pairs: Difference between revisions
Content added Content deleted
imported>Maxima enthusiast |
(add RPL) |
||
Line 2,866: | Line 2,866: | ||
https://www.dropbox.com/s/q6tra0cqoty4pya/Plot.jpg?dl=0 |
https://www.dropbox.com/s/q6tra0cqoty4pya/Plot.jpg?dl=0 |
||
=={{header|RPL}}== |
|||
{{works with|HP|48G}} |
|||
[[File:PlotPairs.png|thumb|alt=HP-48G emulator screenshot|HP-48G emulator screenshot]] |
|||
≪ → x y |
|||
≪ ERASE <span style="color:grey">@ clear graphics display</span> |
|||
x 0 + ≪ MIN ≫ STREAM x ≪ MAX ≫ STREAM XRNG <span style="color:grey">@ set x range</span> |
|||
y 0 + ≪ MIN ≫ STREAM y ≪ MAX ≫ STREAM YRNG <span style="color:grey">@ set y range</span> |
|||
1 x SIZE '''FOR''' j |
|||
x j GET y j GET R→C <span style="color:grey">@ generate coordinates pair </span> |
|||
'''IF''' j 1 > '''THEN''' SWAP OVER LINE '''END''' <span style="color:grey">@ draw a line from previous pair</span> |
|||
'''NEXT''' DROP |
|||
{ (0,0) 10 "x" "y" } AXES DRAX LABEL <span style="color:grey">@ draw axes and labels </span> |
|||
{ } PVIEW <span style="color:grey">@ display graphics </span> |
|||
≫ ≫ '<span style="color:blue">PLOTXY</span>' STO |
|||
{0 1 2 3 4 5 6 7 8 9} |
|||
{2.7 2.8 31.4 38.1 58.0 76.2 100.5 130.0 149.3 180.0} |
|||
<span style="color:blue">PLOTXY</span> |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |