Jump to content

Plot coordinate pairs: Difference between revisions

Replacing "gnuplot" with "gnuplotlib".
(Replacing "gnuplot" with "gnuplotlib".)
Line 2,194:
=={{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.
Line 2,205:
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")
discard stdin.readChar # Needed as when the program exits, “gnuplot” is closed.</syntaxhighlight>
</syntaxhighlight>
 
===Using ggplotnim===
256

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.