Jump to content

Plot coordinate pairs: Difference between revisions

Rename Perl 6 -> Raku, alphabetize, minor clean-up
m (→‎{{header|Perl}}: improved handling of image output)
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
Line 323:
 
</pre>
 
=={{header|Ada}}==
 
Line 376 ⟶ 377:
end PlotCoords;
</lang>
 
=={{header|ALGOL 68}}==
{{works with|ALGOL 68|Revision 1 - extensions to standard used - PRAGMA READ and Currying}}
Line 1,428 ⟶ 1,430:
}
</lang>
 
=={{header|jq}}==
Using R (non-interactive mode)
Line 1,850 ⟶ 1,853:
$plot->Render(Image => $img, Xoff => 50, Yoff => 350);
$img->write(file => 'qsort-range-10-9.png');</lang>
 
=={{header|Perl 6}}==
{{works with|Rakudo|2018.03}}
Generate an SVG image file.
<lang perl6>use SVG;
use SVG::Plot;
 
my @x = 0..9;
my @y = (2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0);
 
say SVG.serialize: SVG::Plot.new(
width => 512,
height => 512,
x => @x,
x-tick-step => { 1 },
min-y-axis => 0,
values => [@y,],
title => 'Coordinate Pairs',
).plot(:lines);</lang>
[[File:Coordinate-pairs-perl6.svg]]
 
=={{header|Phix}}==
Line 2,189 ⟶ 2,172:
opens a new window with this image
[[File:LinesRacket.png]]
 
=={{header|Perl 6Raku}}==
(formerly Perl 6)
{{works with|Rakudo|2018.03}}
Generate an SVG image file.
<lang perl6>use SVG;
use SVG::Plot;
 
my @x = 0..9;
my @y = (2.7, 2.8, 31.4, 38.1, 58.0, 76.2, 100.5, 130.0, 149.3, 180.0);
 
say SVG.serialize: SVG::Plot.new(
width => 512,
height => 512,
x => @x,
x-tick-step => { 1 },
min-y-axis => 0,
values => [@y,],
title => 'Coordinate Pairs',
).plot(:lines);</lang>
[[File:Coordinate-pairs-perl6.svg]]
 
=={{header|REXX}}==
Line 2,712 ⟶ 2,716:
plot_coordinate_pairs x, y
End Sub</lang>
 
=={{header|XPL0}}==
XPL0 does not provide a library routine for plotting graphs. An issue
10,333

edits

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