-
Notifications
You must be signed in to change notification settings - Fork 1
/
vertical-graph-tester.raku
executable file
·54 lines (44 loc) · 1.6 KB
/
vertical-graph-tester.raku
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env raku
use lib 'lib';
use Terminal::Graphing::BarChart::Vertical;
say "X and Y axis\n";
my $x_and_y_axis_graph = Terminal::Graphing::BarChart::Vertical.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
graph_height => 10,
x_axis_labels => <a b c d e f g h i j k>,
y_axis_labels => <0 1 2 3 4 5 6 7 8 9>
);
$x_and_y_axis_graph.print();
say "\n\nX and Y axis without space between columns\n";
$x_and_y_axis_graph = Terminal::Graphing::BarChart::Vertical.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
graph_height => 10,
x_axis_labels => <a b c d e f g h i j k>,
y_axis_labels => <0 1 2 3 4 5 6 7 8 9>,
space_between_columns => False
);
$x_and_y_axis_graph.print();
say "\n\nJust Y axis\n";
my $y_axis_graph = Terminal::Graphing::BarChart::Vertical.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
graph_height => 10,
y_axis_labels => <0 1 2 3 4 5 6 7 8 9>,
space_between_columns => True
);
$y_axis_graph.print();
say "\n\nWide X axis labels\n";
$x_and_y_axis_graph = Terminal::Graphing::BarChart::Vertical.new(
data => [0, 10, 20, 30],
graph_height => 10,
x_axis_labels => <alpha beta charlie delta>,
y_axis_labels => <0 1 2 3 4 5 6 7 8 9>
);
$x_and_y_axis_graph.print();
say "\n\nWide Y axis labels\n";
$x_and_y_axis_graph = Terminal::Graphing::BarChart::Vertical.new(
data => [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
graph_height => 10,
x_axis_labels => <a b c d e f g h i j k>,
y_axis_labels => <alpha bravo charlie delta echo foxtrot golf hotel india juliet>,
);
$x_and_y_axis_graph.print();