Files
cours-ISEN-MD/ISEN/Algo C/A2/script.txt
2024-11-06 15:11:09 +01:00

31 lines
976 B
Plaintext

# Set separator of data lines
set datafile separator ";"
set grid
# Set names of stuff
set title "Execution Time vs Complexity"
set xlabel "number of elements"
set ylabel "time in milliseconds"
# Set line style, color, width, blabla
set style line 1 linecolor rgb '#ff0000' linetype 1 linewidth 2
set style line 2 linecolor rgb '#00ff00' linetype 1 linewidth 2
#### Prepare the function
c = 0.000004 # to fit with the data !
f(x) = c * x**2
title_f(c) = sprintf("f(x) = c*n^2, c = %f", c)
# Automatic scaling of axes
set autoscale xy
#### Plot data only
# plot 'd:\Desktop\Cours\tuto_graficos\data.csv' title 'data'
#### Plot both data and function (data with continuous line)
# plot 'd:\Desktop\Cours\tuto_graficos\data.csv' title 'data' with lines linestyle 1, f(x) title title_f(c) with lines linestyle 2
#### Plot both data and function (data with points)
plot 'd:\Desktop\Cours\tuto_graficos\data.csv' title 'data', f(x) title title_f(c) with lines linestyle 2