-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_stats.gp
More file actions
57 lines (41 loc) · 1.42 KB
/
Copy pathplot_stats.gp
File metadata and controls
57 lines (41 loc) · 1.42 KB
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
#----------------------------------------------------------------------
# This is a gnuplot script to generate a basic statistics information
# for data structures used in CPSC 223. This script requires an
# "out.dat" file, which was generated by running:
#
# ./hw6perf 6 > out.dat
#
# To run this script type the following at the command line
#
# gnuplot -c plot_script.gp infile testname outfile
#
# For example, to create the output for HW-6, run
# the following from the command line
#
# gnuplot -c plot_script.gp "out.dat" "Average Chain Length" "avg-chain-len.png"
#
#----------------------------------------------------------------------
infile = ARG1
testname = ARG2
outfile = ARG3
# Set the terminal for PNG output and aspect ratio
set terminal pngcairo enhanced font 'Verdana, 10'
set size ratio 0.75
# Save the graph in the given file name (e.g., "add_end.png")
set output outfile
# Set the title and each axis label
set title testname
set xlabel "Input Size (n)"
set ylabel "Length"
set key noautotitle
set grid
set auto x
set xtics border in scale 0,0 nomirror autojustify
set xtics norangelimit rotate 90
set xrange [0:*] noreverse writeback
set yrange [0:30] noreverse writeback
# Move the key to the left of the graph
set key left
# plot infile u 2:xticlabels(1) t "BST Height" pointtype 7, \
# infile u 3:xticlabels(1) t "AVL Height" pointtype 7
plot infile u 3:xticlabels(1) t "AVL Height" pointtype 7