Plot coordinate pairs: Difference between revisions

m
(Added solution for Action!)
 
(19 intermediate revisions by 11 users not shown)
Line 13:
=={{header|AArch64 Assembly}}==
{{works with|as|Raspberry Pi 3B version Buster 64 bits}}
<syntaxhighlight lang="aarch64 assembly">
<lang AArch64 Assembly>
/* ARM assembly AARCH64 Raspberry PI 3B */
/* program areaPlot64.s */
Line 295:
.include "../includeARM64.inc"
 
</syntaxhighlight>
</lang>
{{Output}}
<pre>
Line 326:
=={{header|Action!}}==
{{libheader|Action! Tool Kit}}
<langsyntaxhighlight Actionlang="action!">INCLUDE "D2:REAL.ACT" ;from the Action! Tool Kit
 
DEFINE PTR="CARD"
Line 517:
DO UNTIL CH#$FF OD
CH=$FF
RETURN</langsyntaxhighlight>
{{out}}
[https://gitlab.com/amarok8bit/action-rosetta-code/-/raw/master/images/Plot_coordinate_pairs.png Screenshot from Atari 8-bit computer]
Line 526:
{{libheader|GtkAda}}
[[Image:Gtkada_plot.png|thumb|right|100px|Example GtkAda plot]]
<langsyntaxhighlight lang="ada">
with Gtk.Main;
with Gtk.Window; use Gtk.Window;
Line 573:
Gtk.Main.Main;
end PlotCoords;
</syntaxhighlight>
</lang>
 
=={{header|ALGOL 68}}==
Line 580:
{{wont work with|ELLA ALGOL 68|Any (with appropriate job cards) - tested with release [http://sourceforge.net/projects/algol68/files/algol68toc/algol68toc-1.8.8d/algol68toc-1.8-8d.fc9.i386.rpm/download 1.8-8d] - due to extensive use of '''format'''[ted] ''transput''.}}
[[Image:Plot_coordinate_pairs-Algol68.gif|thumb|right|100px|Example Algol68 plot]]
'''File: Plot_coordinate_pairs.a68'''<langsyntaxhighlight lang="algol68">#!/usr/bin/algol68g-full --script #
# -*- coding: utf-8 -*- #
 
Line 616:
);
 
PR READ "postlude/exception.a68" PR</langsyntaxhighlight>
 
=={{header|AutoHotkey}}==
Line 622:
{{works with|AutoHotkey_L}}(AutoHotkey1.1+)
{{libheader|GDIP}}
<langsyntaxhighlight AutoHotkeylang="autohotkey">#SingleInstance, Force
#NoEnv
SetBatchLines, -1
Line 690:
Exit:
Gdip_Shutdown(pToken)
ExitApp</langsyntaxhighlight>
 
=={{header|BBC BASIC}}==
{{works with|BBC BASIC for Windows}}
[[Image:Coordinate_pair_bbc.gif|right]]
<langsyntaxhighlight lang="bbcbasic"> DIM x(9), y(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 723:
DRAW 100*x(i%),4*y(i%)
ENDIF
NEXT</langsyntaxhighlight>
 
=={{header|C}}==
Line 730:
 
{{libheader|libplot}}
<langsyntaxhighlight lang="c">#include <stdio.h>
#include <stdlib.h>
#include <math.h>
Line 846:
pl_flushpl();
pl_closepl();
}</langsyntaxhighlight>
 
No one would use the previous code to produce a plot (that looks [http://i40.tinypic.com/f2t0l0.png this way]; instead, normally we produce data through a program, then we plot the data using e.g. [[Plot x, y arrays#gnuplot|gnuplot]] or other powerful tools; the result (with gnuplot and without enhancement) could look [http://i41.tinypic.com/2qivbsn.png like this] instead.
Line 852:
===Writing EPS===
[[File:plot-2d-c.png|center]]Following code creates a plot in EPS format, with auto scaling and line/symbol/color controls. Plotting function loosely follows Matlab command style. Not thorough by any means, just to give an idea on how this kind of things can be coded.
<langsyntaxhighlight Clang="c">#include <stdio.h>
#include <math.h>
#include <string.h>
Line 982:
plot(x, y, N, "r-o");
return 0;
}</langsyntaxhighlight>
 
=={{header|C++}}==
[[File:plot_cpp.png|300px]]
<langsyntaxhighlight lang="cpp">
#include <windows.h>
#include <string>
Line 1,210:
}
//--------------------------------------------------------------------------------------------------
</syntaxhighlight>
</lang>
 
=={{header|Clojure}}==
{{libheader|incanter}}
<langsyntaxhighlight lang="clojure">(use '(incanter core stats charts))
(def x (range 0 10))
(def y '(2.7 2.8 31.4 38.1 58.0 76.2 100.5 130.0 149.3 180.0))
(view (xy-plot x y))
</syntaxhighlight>
</lang>
 
{{Out}}
Line 1,227:
{{Trans|Go}}
Boost.Process is part of [https://github.com/MaiconSoft/DelphiBoostLib DelphiBoostLib].
<syntaxhighlight lang="delphi">
<lang Delphi>
program Plot_coordinate_pairs;
 
Line 1,255:
plot.Free;
readln;
end.</langsyntaxhighlight>
 
=={{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]
 
<lang>x[] = [ 0 1 2 3 4 5 6 7 8 9 ]
<syntaxhighlight>
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 ]
#
clear
clear_screen
set_linewidthlinewidth 0.5
move_penmove 10 397
draw_lineline 10 955
draw_lineline 95 955
textsize 3
set_textsize 3
n = len x[]
m = 0
for i range= 1 to n
if y[i] > m
m = y[i]
.
.
set_linewidthlinewidth 0.1
sty = m div 9
for i rangerange0 10
move_pen 2move 9410 -5 + i * 10
draw_text line 95 5 + i * sty10
move_pen 10move 952 -4 + i * 10
draw_line 95 95 -text i * 10sty
.
stx = x[n - 1] div 9
for i rangerange0 10
move_pen move i * 9 + 10 96.5
draw_text line i * stx9 + 10 97
move_pen move i * 9 + 10 951
draw_line text i * 9 + 10 3stx
.
set_colorcolor 900
set_linewidthlinewidth 0.5
for i range= 1 to n
x = x[i] * 9 / stx + 10
y = 100 - (y[i] / sty * 10 + 5)
if iline =x 0y
.
move_pen x y
</syntaxhighlight>
else
draw_line x y
.
.</lang>
 
=={{header|EchoLisp}}==
Resulting image [http://www.echolalie.org/echolisp/images/plot-coordinates.png here].
<langsyntaxhighlight lang="scheme">
(lib 'plot)
 
Line 1,314 ⟶ 1,313:
(plot-grid 1 20)
(plot-text " Rosetta plot coordinate pairs" 0 10 "white")
</syntaxhighlight>
</lang>
=={{header|Erlang}}==
Using [https://github.com/psyeugenic/eplot Eplot] to produce PNG.
 
<syntaxhighlight lang="erlang">
<lang Erlang>
-module( plot_coordinate_pairs ).
 
Line 1,332 ⟶ 1,331:
PNG = egd_chart:graph( [{File, lists:zip(Xs, Ys)}] ),
file:write_file( File ++ ".png", PNG ).
</syntaxhighlight>
</lang>
 
The result looks like [https://github.com/ebengt/rosettacode/blob/master/graphs/plot_coordinate_pairs.png this].
Line 1,339 ⟶ 1,338:
Using the [http://www.ffconsultancy.com/products/fsharp_for_visualization/ F# for Visualization] library:
[[Image:FSViz.png|300px|thumb|right|alt text]]
<langsyntaxhighlight lang="fsharp">#r @"C:\Program Files\FlyingFrog\FSharpForVisualization.dll"
 
let x = Seq.map float [|0; 1; 2; 3; 4; 5; 6; 7; 8; 9|]
Line 1,346 ⟶ 1,345:
open FlyingFrog.Graphics
 
Plot([Data(Seq.zip x y)], (0.0, 9.0))</langsyntaxhighlight>
 
=={{header|Factor}}==
{{works with|Factor|0.99 2019-01-23}}
<langsyntaxhighlight lang="factor">USING: accessors assocs colors.constants kernel sequences ui
ui.gadgets ui.gadgets.charts ui.gadgets.charts.lines ;
 
Line 1,356 ⟶ 1,355:
line new COLOR: blue >>color
9 <iota> { 2.7 2.8 31.4 38.1 58 76.2 100.5 130 149.3 180 } zip
>>data add-gadget "Coordinate pairs" open-window</langsyntaxhighlight>
 
=={{header|Fōrmulæ}}==
 
{{FormulaeEntry|page=https://formulae.org/?script=examples/Plot_coordinate_pairs}}
Fōrmulæ programs are not textual, visualization/edition of programs is done showing/manipulating structures but not text. Moreover, there can be multiple visual representations of the same program. Even though it is possible to have textual representation &mdash;i.e. XML, JSON&mdash; they are intended for storage and transfer purposes more than visualization and edition.
 
'''Solution'''
 
[[File:Fōrmulæ - Plot coordinate pairs 01.png]]
Programs in Fōrmulæ are created/edited online in its [https://formulae.org website], However they run on execution servers. By default remote servers are used, but they are limited in memory and processing power, since they are intended for demonstration and casual use. A local server can be downloaded and installed, it has no limitations (it runs in your own computer). Because of that, example programs can be fully visualized and edited, but some of them will not run if they require a moderate or heavy computation/memory resources, and no local server is being used.
 
[[File:Fōrmulæ - Plot coordinate pairs 02.png]]
In '''[https://formulae.org/?example=Plot_coordinate_pairs this]''' page you can see the program(s) related to this task and their results.
 
=={{header|FreeBASIC}}==
{{trans|Liberty BASIC}}
===Text mode===
<langsyntaxhighlight lang="freebasic">Dim As Integer i, x(9), y(9)
For i = 0 To 9
x(i) = i
Line 1,398 ⟶ 1,399:
Locate (21 - (y(i)/ 10)), (x(i) * 4) + 2 : Print "."
Next i
Sleep</langsyntaxhighlight>
 
 
=={{header|gnuplot}}==
[[Image:Plotxy-gnuplot.png|thumb|right|200px|Example gnuplot output]]
<langsyntaxhighlight lang="gnuplot">unset key # Only one data set, so the key is uninformative
 
plot '-' # '-' can be replaced with a filename, to read data from that file.
Line 1,416 ⟶ 1,417:
8 149.3
9 180.0
e</langsyntaxhighlight>
 
<br clear=right>
Line 1,425 ⟶ 1,426:
 
A program can of course supply commands and data to gnuplot as prepared files. For the spirit of controlling plotting with the native language however, this example shows how commands and data can be prepared programatically and supplied to gnuplot through stdin.
<langsyntaxhighlight lang="go">package main
 
import (
Line 1,454 ⟶ 1,455:
w.Close()
g.Wait()
}</langsyntaxhighlight>
===gonum/plot===
{{libheader|gonum/plot}}
[[File:GoPoints.png|right|Go plot]]
<langsyntaxhighlight lang="go">package main
 
import (
Line 1,489 ⟶ 1,490:
log.Fatal(err)
}
}</langsyntaxhighlight>
 
=={{header|Groovy}}==
Line 1,495 ⟶ 1,496:
[[File:GroovyPlotDemo.png|300px|thumb|right|Screenshot of groovy solution]]
 
<langsyntaxhighlight lang="groovy">import groovy.swing.SwingBuilder
import javax.swing.JFrame
import org.jfree.chart.ChartFactory
Line 1,522 ⟶ 1,523:
widget(chart())
}
}</langsyntaxhighlight>
 
=={{header|Haskell}}==
gnuplot is a package from [http://hackage.haskell.org/packages/hackage.html HackageDB].
<langsyntaxhighlight lang="haskell">import Graphics.Gnuplot.Simple
 
pnts = [2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0]
 
doPlot = plotPathStyle [ ( Title "plotting dots" )]
(PlotStyle Points (CustomStyle [])) (zip [0..] pnts)</langsyntaxhighlight>
 
=={{header|HicEst}}==
<langsyntaxhighlight HicEstlang="hicest">REAL :: n=10, x(n), y(n)
 
x = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
Line 1,541 ⟶ 1,542:
WINDOW(WINdowhandle=wh, Width=-300, Height=-300, X=1, TItle='Rosetta')
AXIS(WINdowhandle=wh, Title='x values', Yaxis, Title='y values')
LINE(X=x, Y=y, SymbolDiameter=2)</langsyntaxhighlight>
[[File:HicEst_plot_coordinate_pairs.png]]
 
=={{header|Icon}} and {{header|Unicon}}==
[[File:Plotpoints-unicon.gif|thumb|right|Sample Output]]
<langsyntaxhighlight Iconlang="icon">link printf,numbers
 
procedure main()
Line 1,631 ⟶ 1,632:
every q[i := 1 to *q] := pix - q[i]
return P
end</langsyntaxhighlight>
 
{{libheader|Icon Programming Library}}
Line 1,639 ⟶ 1,640:
=={{header|J}}==
{{libheader|plot}}
<langsyntaxhighlight lang="j">require 'plot'
X=: i.10
Y=: 2.7 2.8 31.4 38.1 58.0 76.2 100.5 130.0 149.3 180.0
'dot; pensize 2.4' plot X;Y</langsyntaxhighlight>
[http://www.jsoftware.com/jwiki/RosettaCode/ExamplePlot1 Output of plot.]
 
Line 1,650 ⟶ 1,651:
=={{header|Java}}==
 
<langsyntaxhighlight Javalang="java"> import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
Line 1,739 ⟶ 1,740:
}
}
</syntaxhighlight>
</lang>
 
=={{header|jq}}==
Line 1,746 ⟶ 1,747:
 
jq is designed to interoperate with other tools, and in this section we illustrate how jq can be used with R in a simple pipeline: jq will produce a stream of CSV data that will be piped into R operating in non-interactive mode. Assuming the jq and R programs are respectively in plot.jq and plot.R, the pipeline would look like this:
<langsyntaxhighlight lang="sh">jq -n -M -r -f plot.jq | R CMD BATCH plot.R</langsyntaxhighlight>
The above would produce the plot as a .pdf file.
 
'''plot.jq'''
<langsyntaxhighlight lang="jq"># NOTE: This definition of transpose can be omitted
# if your version of jq includes transpose as a builtin.
#
Line 1,769 ⟶ 1,770:
def plot(x;y): "A,B", ( [x,y] | transpose | map( @csv ) | .[]);
 
plot(x;y)</langsyntaxhighlight>
'''plot.R'''
<langsyntaxhighlight Rlang="r">mydata <- read.table( file("stdin"), header=TRUE, sep=",")
 
x = mydata$A # x-axis
Line 1,778 ⟶ 1,779:
main="Scatterplot Example",
xlab="x-axis label", # x-axis label
ylab="y-axis label" ) # y-axis label</langsyntaxhighlight>
 
=={{header|Julia}}==
Using Plots library with PlotlyJS as backend:
 
<langsyntaxhighlight lang="julia">using Plots
plotlyjs()
 
Line 1,790 ⟶ 1,791:
 
p = scatter(x, y)
savefig(p, "/tmp/testplot.png")</langsyntaxhighlight>
 
=={{header|Kotlin}}==
{{libheader|JFreeChart}}
{{trans|Groovy}}
<langsyntaxhighlight lang="scala">// Version 1.2.31
 
import org.jfree.chart.ChartFactory
Line 1,833 ⟶ 1,834:
}
}
}</langsyntaxhighlight>
 
{{out}}
Line 1,841 ⟶ 1,842:
 
=={{header|Lambdatalk}}==
<langsyntaxhighlight lang="scheme">
1) define X & Y:
 
Line 1,878 ⟶ 1,879:
 
4) the result can be seen in http://lambdaway.free.fr/lambdawalks/?view=plot4
</syntaxhighlight>
</lang>
 
=={{header|Liberty BASIC}}==
First version writes directly to LB's console window.
<syntaxhighlight lang="lb">
<lang lb>
'Plotting coordinate pairs MainWin - Style
For i = 0 To 9
Line 1,917 ⟶ 1,918:
 
End
</syntaxhighlight>
</lang>
The second version uses the more typical graphic window approach, and is written to enable easy adaptation to other data sets.
<syntaxhighlight lang="lb">
<lang lb>
nomainwin
 
Line 1,983 ⟶ 1,984:
sy = offsetY-y*scaleY 'y is inverted
end function
</syntaxhighlight>
</lang>
[http://www.diga.me.uk/PlotCoordPairs.gif LB screen]
 
=={{header|LiveCode}}==
Displaying the plot with vector graphics
<syntaxhighlight lang="livecode">
on plotGraphic
local tCoordinates
local x = "0, 1, 2, 3, 4, 5, 6, 7, 8, 9"
local y = "2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0"
if there is a graphic "graph" then delete graphic "graph"
repeat with i = 1 to the number of items of x
put item i of x into item 1 of line i of tCoordinates
put item i of y into item 2 of line i of tCoordinates
end repeat
create graphic "graph"
set the style of graphic "graph" to "polygon"
set the points of graphic "graph" to tCoordinates
repeat with i = 1 to the number of lines of tCoordinates
put the top of grc "graph" + the height of grc "graph" - item 2 of line i of tCoordinates into item 2 of line i of tCoordinates
end repeat
set the points of graphic "graph" to tCoordinates
set the height of graphic "graph" to 200
set the width of graphic "graph" to 300
set the loc of grc "graph" to the loc of this card
end plotGraphic
</syntaxhighlight>
[https://www.mediafire.com/view/xhi8oq1fawagzbt Result with Vector Graphics]
 
Displaying the plot with the Line Graph widget
<syntaxhighlight lang="livecode">
on plotLineGraph
local tCoordinates
local x = "0, 1, 2, 3, 4, 5, 6, 7, 8, 9"
local y = "2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0"
if there is a widget "graph" then delete widget "graph"
repeat with i = 1 to the number of items of x
put item i of x into item 1 of line i of tCoordinates
put item i of y into item 2 of line i of tCoordinates
end repeat
create widget "graph" as "com.livecode.widget.linegraph"
set the graphData of widget "graph" to tCoordinates
set the height of widget "graph" to 250
set the width of widget "graph" to 350
set the loc of widget "graph" to the loc of this card
end plotLineGraph
</syntaxhighlight>
[https://www.mediafire.com/view/8wj0l5l5blmd9dg/line_graph.jpg Result with Line Graph Widget]
 
=={{header|Lua}}==
{{libheader|LÖVE}}
 
<langsyntaxhighlight lang="lua">
w_width = love.graphics.getWidth()
w_height = love.graphics.getHeight()
Line 2,035 ⟶ 2,084:
end
</syntaxhighlight>
</lang>
 
=={{header|M2000 Interpreter}}==
Line 2,042 ⟶ 2,091:
Result image [https://4.bp.blogspot.com/-8XdIVaW79lU/W_iCUBmj92I/AAAAAAAAHbA/TxMl_P22yckQ1Wdi4zsu6k_QVNRZpqJCgCLcBGAs/s1600/graph222.png here]
 
<syntaxhighlight lang="m2000 interpreter">
<lang M2000 Interpreter>
Module Pairs {
\\ written in version 9.5 rev. 13
Line 2,115 ⟶ 2,164:
}
Pairs
</syntaxhighlight>
</lang>
 
=={{header|Maple}}==
<langsyntaxhighlight Maplelang="maple">x := Vector([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]):
y := Vector([2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0]):
plot(x,y,style="point");</langsyntaxhighlight>
 
=={{header|Mathematica}}/{{header|Wolfram Language}}==
<langsyntaxhighlight Mathematicalang="mathematica">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};
ListPlot[{x, y} // Transpose]</langsyntaxhighlight>
{{out}}
[http://i43.tinypic.com/2a689yw.png]
 
=={{header|MATLAB}}==
<langsyntaxhighlight MATLABlang="matlab">>> 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];
>> plot(x,y,'.-')</langsyntaxhighlight>
 
=={{header|Maxima}}==
 
<syntaxhighlight lang="maxima">
<lang maxima>(%i1) ".." (m, n) := makelist (i, i, m, n); infix ("..")$
".." (m, n) := makelist (i, i, m, n); infix ("..")$
(%i2) x: 0 .. 9$ y:[2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0]$
x: 0 .. 9$
(%i3) plot2d(['discrete, x, y], [style, [points,5,1,1]], [gnuplot_term, png], [gnuplot_out_file, "qsort-range-10-9.png"])$</lang>
y:[2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0]$
wxplot2d(['discrete, x, y], [style, [points,5,1,1]], [gnuplot_term, png], [gnuplot_out_file, "qsort-range-10-9.png"])$
</syntaxhighlight>
[http://img28.picoodle.com/img/img28/4/2/7/f_qsortrange1m_1b7f493.png qsort-range-10-9.png]
Line 2,144 ⟶ 2,196:
=={{header|Nim}}==
===Using gnuplot===
{{libheader|gnuplotgnuplotlib.nim}}
There exists two libraries providing a Nim interface to “gnuplot” (the GNU plotting program), which are named “gnuplot” and “gnuplotlib”. We have chosen the firstsecond one hereas butit theis secondbe whichmore iscomplete newerand seemsmore alsoconvenient to be more completeuse.
 
The library launches “gnuplot” which does the plotting. From “gnuplot”, it is possible to save the drawing into a PDF, a SVG or an image (BMP, PNG) file.
 
<langsyntaxhighlight Nimlang="nim">import gnuplot
 
let
Line 2,155 ⟶ 2,207:
y = [2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0]
 
withGnuPlot:
plot(x, y, "Coordinate pairs")
plot(x, y, "Coordinate pairs")
discard stdin.readChar # Needed as when the program exits, “gnuplot” is closed.</lang>
</syntaxhighlight>
 
===Using ggplotnim===
{{libheader|ggplotnim}}
This library doesn’t use an external process to does the plotting. It uses a syntax mostly compliant with “ggplot2” syntax.
<langsyntaxhighlight Nimlang="nim">import ggplotnim
 
let
Line 2,173 ⟶ 2,226:
geomLine() +
themeOpaque() +
ggsave("coordinate_pairs.png")</langsyntaxhighlight>
 
=={{header|OCaml}}==
<langsyntaxhighlight lang="ocaml">#load "graphics.cma"
open Graphics
 
Line 2,195 ⟶ 2,248:
ignore(wait_next_event [Key_pressed]);
close_graph();
;;</langsyntaxhighlight>
 
Using the [http://forge.ocamlcore.org/projects/archimedes/ Archimedes] library,
one can write:
[[Image:Archimedes.png|300px|thumb|right|Archimedes plot (graphics output).]]
<langsyntaxhighlight lang="ocaml">
module A = Archimedes
 
Line 2,211 ⟶ 2,264:
A.Array.y vp y;
A.close vp
</syntaxhighlight>
</lang>
 
=={{header|Octave}}==
<langsyntaxhighlight lang="octave">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];
plot(x,y,"o");
pause;</langsyntaxhighlight>
 
=={{header|Ol}}==
<langsyntaxhighlight lang="scheme">
; define input arrays
(define x '(0 1 2 3 4 5 6 7 8 9))
Line 2,235 ⟶ 2,288:
(map glVertex2f x y)
(glEnd)))
</syntaxhighlight>
</lang>
 
=={{header|PARI/GP}}==
<syntaxhighlight lang ="parigp">plothraw(vx, vy)</langsyntaxhighlight>
 
=={{header|Perl}}==
 
===GD::Graph library===
 
{{libheader|GD::Graph}}
<langsyntaxhighlight lang="perl">use GD::Graph::points;
 
@data = (
Line 2,248 ⟶ 2,304:
[2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0],
);
$graph = GD::Graph::points->new(400, 300);
$gd = $graph->plot(\@data) or die $graph->error;
 
$graph = GD::Graph::points->new(400, 300);
# Save as image.
open my $fh, '>', "qsort-range-10-9.png";
$format = $graph->export_format;
open my $fh, '>', "qsort-range-10-9.$format";
binmode $fh;
print $fh $gdgraph->$formatplot(\@data)->png;
close $fh;</syntaxhighlight>
 
===Imager::Plot library===
{{libheader|Imager::Plot}}
<langsyntaxhighlight lang="perl">use Imager;
use Imager::Plot;
 
Line 2,286 ⟶ 2,340:
$img->box(filled => 1, color => 'white');
$plot->Render(Image => $img, Xoff => 50, Yoff => 350);
$img->write(file => 'qsort-range-10-9.png');</langsyntaxhighlight>
 
=={{header|PhixProcessing}}==
<syntaxhighlight lang="java">
{{libheader|Phix/pGUI}}
//Aamrun, 26th June 2022
Output same as BBC BASIC
<lang Phix>-- demo\rosetta\Plot_coordinate_pairs.exw
include pGUI.e
 
int x[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
Ihandle dlg, canvas
float y[] = {2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0};
cdCanvas cddbuffer, cdcanvas
 
size(300,300);
constant x = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9},
surface.setTitle("Rosetta Plot");
y = {2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0}
 
stroke(#ff0000);
function redraw_cb(Ihandle /*ih*/, integer /*posx*/, integer /*posy*/)
integer {width, height} = IupGetIntInt(canvas, "DRAWSIZE")
atom cx,cy,nx,ny
atom {w,h} = {(width-60)/9,(height-60)/180}
cdCanvasActivate(cddbuffer)
cx = 30+x[1]*w
cy = 30+y[1]*h
for i=2 to length(x) do
cdCanvasSetForeground(cddbuffer, CD_BLACK)
nx = 30+(i-1)*w
ny = 30+(i-1)*20*h
{} = cdCanvasTextAlignment(cddbuffer, CD_NORTH)
cdCanvasText(cddbuffer, nx, 25, sprintf("%d",(i-1)))
{} = cdCanvasTextAlignment(cddbuffer, CD_EAST)
cdCanvasText(cddbuffer, 25, ny, sprintf("%3d",(i-1)*20))
cdCanvasSetForeground(cddbuffer, CD_GRAY)
cdCanvasLine(cddbuffer,30,ny,width-30,ny)
cdCanvasLine(cddbuffer,nx,30,nx,height-30)
cdCanvasSetForeground(cddbuffer, CD_BLUE)
nx = 30+floor(x[i]*w)
ny = 30+floor(y[i]*h)
cdCanvasLine(cddbuffer,cx,cy,nx,ny)
cx = nx
cy = ny
end for
cdCanvasSetForeground(cddbuffer, CD_BLACK)
cdCanvasLine(cddbuffer,30,30,width-30,30)
cdCanvasLine(cddbuffer,30,30,30,height-30)
cdCanvasFlush(cddbuffer)
return IUP_DEFAULT
end function
 
for(int i=0;i<x.length;i++){
function map_cb(Ihandle ih)
ellipse(x[i],y[i],3,3);
cdcanvas = cdCreateCanvas(CD_IUP, ih)
}
cddbuffer = cdCreateCanvas(CD_DBUFFER, cdcanvas)
cdCanvasSetBackground(cddbuffer, CD_WHITE)
return IUP_DEFAULT
end function
 
</syntaxhighlight>
procedure main()
IupOpen()
 
=={{header|Phix}}==
canvas = IupCanvas(NULL)
{{libheader|Phix/pGUI}}
IupSetAttribute(canvas, "RASTERSIZE", "340x340") -- initial size
Output same as BBC BASIC, you can run this online [http://phix.x10.mx/p2js/Plot_coordinate_pairs.htm here].
IupSetCallback(canvas, "MAP_CB", Icallback("map_cb"))
<!--<syntaxhighlight lang="phix">(phixonline)-->
 
<span style="color: #000080;font-style:italic;">--
dlg = IupDialog(canvas)
-- demo\rosetta\Plot_coordinate_pairs.exw
IupSetAttribute(dlg, "TITLE", "Plot coordinate pairs")
-- ======================================
IupSetCallback(canvas, "ACTION", Icallback("redraw_cb"))
--</span>
 
<span style="color: #008080;">with</span> <span style="color: #008080;">javascript_semantics</span>
IupMap(dlg)
<span style="color: #008080;">include</span> <span style="color: #000000;">pGUI</span><span style="color: #0000FF;">.</span><span style="color: #000000;">e</span>
IupSetAttribute(canvas, "RASTERSIZE", NULL) -- release the minimum limitation
<span style="color: #008080;">include</span> <span style="color: #000000;">IupGraph</span><span style="color: #0000FF;">.</span><span style="color: #000000;">e</span>
IupShowXY(dlg,IUP_CENTER,IUP_CENTER)
IupMainLoop()
<span style="color: #008080;">constant</span> <span style="color: #000000;">x</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{</span><span style="color: #000000;">0</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">1</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">2</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">3</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">4</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">5</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">6</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">7</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">8</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">9</span><span style="color: #0000FF;">},</span>
IupClose()
<span style="color: #000000;">y</span> <span style="color: #0000FF;">=</span> <span style="color: #0000FF;">{</span><span style="color: #000000;">2.7</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">2.8</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">31.4</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">38.1</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">58.0</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">76.2</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">100.5</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">130.0</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">149.3</span><span style="color: #0000FF;">,</span> <span style="color: #000000;">180.0</span><span style="color: #0000FF;">}</span>
end procedure
 
<span style="color: #008080;">function</span> <span style="color: #000000;">get_data</span><span style="color: #0000FF;">(</span><span style="color: #004080;">Ihandle</span> <span style="color: #000000;">graph</span><span style="color: #0000FF;">)</span> <span style="color: #008080;">return</span> <span style="color: #0000FF;">{{</span><span style="color: #000000;">x</span><span style="color: #0000FF;">,</span><span style="color: #000000;">y</span><span style="color: #0000FF;">,</span><span style="color: #004600;">CD_BLUE</span><span style="color: #0000FF;">}}</span> <span style="color: #008080;">end</span> <span style="color: #008080;">function</span>
main()</lang>
<span style="color: #7060A8;">IupOpen</span><span style="color: #0000FF;">()</span>
<span style="color: #004080;">Ihandle</span> <span style="color: #000000;">graph</span> <span style="color: #0000FF;">=</span> <span style="color: #000000;">IupGraph</span><span style="color: #0000FF;">(</span><span style="color: #000000;">get_data</span><span style="color: #0000FF;">),</span>
<span style="color: #000000;">dlg</span> <span style="color: #0000FF;">=</span> <span style="color: #7060A8;">IupDialog</span><span style="color: #0000FF;">(</span><span style="color: #000000;">graph</span><span style="color: #0000FF;">,</span><span style="color: #008000;">`TITLE="Plot coordinate pairs"`</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">IupSetAttributes</span><span style="color: #0000FF;">(</span><span style="color: #000000;">dlg</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"RASTERSIZE=320x240,MINSIZE=320x200"</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">IupSetAttributes</span><span style="color: #0000FF;">(</span><span style="color: #000000;">graph</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"XTICK=1,XMIN=0,XMAX=9"</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">IupSetAttributes</span><span style="color: #0000FF;">(</span><span style="color: #000000;">graph</span><span style="color: #0000FF;">,</span><span style="color: #008000;">"YTICK=20,YMIN=0,YMAX=180"</span><span style="color: #0000FF;">)</span>
<span style="color: #7060A8;">IupShow</span><span style="color: #0000FF;">(</span><span style="color: #000000;">dlg</span><span style="color: #0000FF;">)</span>
<span style="color: #008080;">if</span> <span style="color: #7060A8;">platform</span><span style="color: #0000FF;">()!=</span><span style="color: #004600;">JS</span> <span style="color: #008080;">then</span>
<span style="color: #7060A8;">IupMainLoop</span><span style="color: #0000FF;">()</span>
<span style="color: #7060A8;">IupClose</span><span style="color: #0000FF;">()</span>
<span style="color: #008080;">end</span> <span style="color: #008080;">if</span>
<!--</syntaxhighlight>-->
 
=={{header|PicoLisp}}==
[[Image: Plotxy-picoLisp.png|thumb|right|200px|Example picoLisp output]]
<langsyntaxhighlight PicoLisplang="picolisp">(load "@lib/ps.l")
 
(scl 1)
Line 2,395 ⟶ 2,426:
 
(plot "plot.ps" 300 200 (2.7 2.8 31.4 38.1 58.0 76.2 100.5 130.0 149.3 180.0))
(call 'display "plot.ps")</langsyntaxhighlight>
 
=={{header|PostScript}}==
<syntaxhighlight lang="postscript">
<lang PostScript>
/x [0 1 2 3 4 5 6 7 8 9] def
/y [2.7 2.8 31.4 38.1 58.0 76.2 100.5 130.0 149.3 180.0] def
Line 2,410 ⟶ 2,441:
}repeat
stroke
</syntaxhighlight>
</lang>
 
=={{header|PureBasic}}==
<langsyntaxhighlight PureBasiclang="purebasic">Structure PlotData
x.i
y.f
Line 2,503 ⟶ 2,534:
serie_y:
Data.f 2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0
EndDataSection</langsyntaxhighlight>
[[File:PureBasic PlotData.png]]
 
Line 2,513 ⟶ 2,544:
 
Interactive session:
<langsyntaxhighlight lang="python">>>> 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 2,519 ⟶ 2,550:
>>> pylab.plot(x, y, 'bo')
>>> pylab.savefig('qsort-range-10-9.png')
</syntaxhighlight>
</lang>
See some other examples:
* [http://matplotlib.org/examples/pylab_examples/simple_plot.html simple plot]
Line 2,526 ⟶ 2,557:
 
==={{libheader|VPython}}===
<langsyntaxhighlight lang="python">
from visual import *
from visual.graph import *
Line 2,555 ⟶ 2,586:
label(display=plot1.display, text="Look here",
pos=(6,100.5), xoffset=30,yoffset=-20 )
</syntaxhighlight>
</lang>
 
=={{header|R}}==
R has several different plotting paradigms. First we define the data.
<langsyntaxhighlight Rlang="r">x <- c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
y <- c(2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0)</langsyntaxhighlight>
===Base graphics===
<syntaxhighlight lang R="r">plot(x,y)</langsyntaxhighlight>
===Lattice/grid graphics===
{{libheader|lattice}}
<langsyntaxhighlight Rlang="r">library(lattice)
xyplot(y~x)</langsyntaxhighlight>
===Grammar of graphics===
{{libheader|ggplot2}}
<langsyntaxhighlight Rlang="r">library(ggplot2)
qplot(x,y)</langsyntaxhighlight>
 
=={{header|Racket}}==
Racket has a built-in plotting library
<langsyntaxhighlight Racketlang="racket">#lang racket
(require plot)
 
Line 2,581 ⟶ 2,612:
 
(plot-new-window? #t)
(plot (points (map vector x y)))</langsyntaxhighlight>
 
This opens a new window with this image (with interactive zooming)
Line 2,587 ⟶ 2,618:
 
And this
<langsyntaxhighlight Racketlang="racket">#lang racket
(require plot)
 
Line 2,594 ⟶ 2,625:
 
(plot-new-window? #t)
(plot (lines (map vector x y)))</langsyntaxhighlight>
 
opens a new window with this image
Line 2,603 ⟶ 2,634:
{{works with|Rakudo|2018.03}}
Generate an SVG image file.
<syntaxhighlight lang="raku" perl6line>use SVG;
use SVG::Plot;
 
Line 2,617 ⟶ 2,648:
values => [@y,],
title => 'Coordinate Pairs',
).plot(:lines);</langsyntaxhighlight>
[[File:Coordinate-pairs-perl6.svg]]
 
Line 2,624 ⟶ 2,655:
===without point labels===
Example usage:
<langsyntaxhighlight lang="rexx">/*REXX program plots X,Y coördinate pairs of numbers with plain (ASCII) characters.*/
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 2,632 ⟶ 2,663:
end /*j*/ /*$≡ 0,2.7 1,2.8 2,31.4 3,38.1 ··· */
call '$PLOT' $ /*invoke the REXX program: $PLOT */
exit rc /*stick a fork in it, we're all done. */</langsyntaxhighlight>
{{out|output|text=&nbsp; when using the default input:}}
<pre>
Line 2,685 ⟶ 2,716:
 
===with point labels===
<langsyntaxhighlight lang="rexx">/*REXX program plots X,Y coördinate pairs of numbers with plain (ASCII) characters.*/
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 2,693 ⟶ 2,724:
end /*j*/ /*$≡ 0,2.7 1,2.8 2,31.4 3,38.1 ··· */
call '$PLOT' $ '(LABELDatapoints' /*invoke the REXX program: $PLOT */
exit rc /*stick a fork in it, we're all done. */</langsyntaxhighlight>
{{out|output|text=&nbsp; when using the default input:}}
<pre>
Line 2,758 ⟶ 2,789:
 
=={{header|Ring}}==
<langsyntaxhighlight lang="ring">
# Project : Plot coordinate pairs
 
Line 2,834 ⟶ 2,865:
label1 { setpicture(p1) show() }
return
</syntaxhighlight>
</lang>
Output:
 
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}}==
Line 2,844 ⟶ 2,894:
[[File:Ruby.plotxy.png|300px|thumb|right|gnuplot of x,y arrays]]
 
<langsyntaxhighlight lang="ruby">require 'gnuplot'
 
x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Line 2,855 ⟶ 2,905:
end
end
end</langsyntaxhighlight>
 
=={{header|Scala}}==
{{libheader|Scala}}
<langsyntaxhighlight Scalalang="scala">import scala.swing.Swing.pair2Dimension
import scala.swing.{ MainFrame, Panel, Rectangle }
import java.awt.{ Color, Graphics2D, geom }
Line 2,964 ⟶ 3,014:
contents = ui
}
}</langsyntaxhighlight>
 
=={{header|Scilab}}==
<langsyntaxhighlight lang="scilab">--> 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];
--> plot2d(x,y)</langsyntaxhighlight>
 
=={{header|Sidef}}==
{{trans|Perl}}
<langsyntaxhighlight lang="ruby">require('GD::Graph::points')
 
var data = [
Line 2,984 ⟶ 3,034:
 
var format = 'png'
File("qsort-range.#{format}").write(gd.(format), :raw)</langsyntaxhighlight>
 
=={{header|Stata}}==
<langsyntaxhighlight lang="stata">clear
input x y
0 2.7
Line 3,002 ⟶ 3,052:
 
lines y x
graph export image.png</langsyntaxhighlight>
 
=={{header|Tcl}}==
Line 3,009 ⟶ 3,059:
[[File:Tcl_Plotxy.png|thumb|right|150px|Screenshot for Tcl code]]
This solution does not use existing plotting packages, but constructs the graphics from bare-metal Tk code.
<langsyntaxhighlight Tcllang="tcl">package require Tk
 
# The actual plotting engine
Line 3,064 ⟶ 3,114:
package require Img
set im [image create photo -data .c]
$im write plotxy.png -format PNG</langsyntaxhighlight>
Of course, if we were generating an encapsulated postscript version, we would be able to do that directly.
 
Line 3,072 ⟶ 3,122:
[[File:Plotxy-TI-89.png|thumb|right|200px|TI-89 screenshot]]
 
<langsyntaxhighlight lang="ti89b">FnOff
PlotsOff
NewPlot 1, 1, x, y
ZoomData</langsyntaxhighlight>
 
=={{header|Ursala}}==
Line 3,083 ⟶ 3,133:
Here's the way to do it just as a quick check (all default settings
and dots connected with straight lines).
<langsyntaxhighlight Ursalalang="ursala">#import std
#import flo
#import fit
Line 3,093 ⟶ 3,143:
#output dot'tex' latex_document+ plot
 
main = visualization[curves: <curve[points: ~&p/x y]>]</langsyntaxhighlight>
([http://i25.tinypic.com/33oi74j.jpg output])
 
Line 3,101 ⟶ 3,151:
labeled.
 
<langsyntaxhighlight Ursalalang="ursala">main =
 
visualization[
Line 3,117 ⟶ 3,167:
scattered: true,
points: ~&p/x y,
attributes: {'linecolor': 'black'}]>]</langsyntaxhighlight>
([http://i32.tinypic.com/x1x6cz.jpg output])
 
=={{header|VBA}}==
Using Excel
<langsyntaxhighlight lang="vb">Private Sub plot_coordinate_pairs(x As Variant, y As Variant)
Dim chrt As Chart
Set chrt = ActiveSheet.Shapes.AddChart.Chart
Line 3,141 ⟶ 3,191:
y = [{2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0}]
plot_coordinate_pairs x, y
End Sub</langsyntaxhighlight>
 
=={{header|Wren}}==
{{libheader|DOME}}
<langsyntaxhighlight ecmascriptlang="wren">import "graphics" for Canvas, ImageData, Color
import "dome" for Window
import "math" for Point
Line 3,209 ⟶ 3,259:
}
 
var Game = PlotCoordinates.new(500, 500)</langsyntaxhighlight>
 
=={{header|XPL0}}==
Line 3,218 ⟶ 3,268:
[[File:PlotXPL0.png|140px|thumb|right|Output]]
 
<langsyntaxhighlight XPL0lang="xpl0">include c:\cxpl\codes; \intrinsic 'code' declarations
 
def ScrW=640, ScrH=480, VidMode=$101;
Line 3,251 ⟶ 3,301:
if ChIn(1) then []; \wait for key
SetVid(3); \restore text
]</langsyntaxhighlight>
 
=={{header|Yorick}}==
<langsyntaxhighlight lang="yorick">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];
window, 0;
plmk, y, x;
window, 1;
plg, y, x, marks=0;</langsyntaxhighlight>
<gallery>
File:Plotxy-yorick-plmk.png|Output with plmk
Line 3,270 ⟶ 3,320:
 
A program can of course supply commands and data to gnuplot as prepared files. For the spirit of controlling plotting with the native language however, this example shows how commands and data can be prepared programmatically and supplied to gnuplot through stdin.
<langsyntaxhighlight lang="zkl">#<<<
cmd:=0'|
#set term wxt # X11
Line 3,292 ⟶ 3,342:
gnuplot:=System.popen("gnuplot","w");
gnuplot.write(cmd); gnuplot.flush();
ask("Hit return to finish"); gnuplot.close();</langsyntaxhighlight>
1,969

edits