Skip to content

Commit a903cf1

Browse files
author
Daniel Ruprecht
committed
reduced font in plotting scripts
1 parent 89f79ac commit a903cf1

File tree

3 files changed

+27
-14
lines changed

3 files changed

+27
-14
lines changed

plot_parareal_energy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def extract_energy(line):
1414
# Main part of script
1515
#
1616

17-
fs = 12
17+
fs = 8
1818
Nsamples = 50
1919

2020
#Nprocs = numpy.array([2, 4, 6, 8, 12, 24])

plot_parareal_memory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import numpy
33
from matplotlib import pyplot as plt
44
from pylab import rcParams
5-
fs = 12
5+
6+
fs = 8
67

78
# Two functions to be used below
89
def extract_memory(line):

plot_parareal_scaling.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,16 @@
22
from matplotlib import pyplot as plt
33
from pylab import rcParams
44

5-
fs = 12
5+
fs = 8
66

77
Nsamples = 4
8-
#Nprocs = numpy.array([2, 4, 6, 8, 10, 12, 24])
9-
Nprocs = numpy.array([2, 4, 6, 8])
8+
9+
machine = "cub"
10+
11+
if machine=="dora":
12+
Nprocs = numpy.array([2, 4, 6, 8, 10, 12, 24])
13+
if machine=="cub":
14+
Nprocs = numpy.array([2, 4, 6, 8])
1015
Niter = 4
1116
timers = numpy.zeros([3, Nprocs.size, Nsamples])
1217
timers_avg = numpy.zeros([3, Nprocs.size])
@@ -85,12 +90,14 @@
8590

8691
plt.xlabel('Number of cores', fontsize=fs)
8792
plt.ylabel('Speedup', fontsize=fs, labelpad=2)
88-
plt.xticks(Nprocs, fontsize=fs)
89-
#plt.xticks([2,6,10,14,18,22], fontsize=fs)
93+
if machine=="dora":
94+
plt.xticks([2,6,10,14,18,22], fontsize=fs)
95+
if machine=="cub":
96+
plt.xticks(Nprocs, fontsize=fs)
9097

9198
plt.yticks(fontsize=fs)
9299
plt.grid(True)
93-
plt.legend(loc='upper left', fontsize=fs, prop={'size':fs-3})
100+
plt.legend(loc='upper left', fontsize=fs, prop={'size':fs})
94101
plt.ylim([ymin, ymax])
95102

96103
# Saveing figure
@@ -104,26 +111,31 @@
104111
plt.plot(Nprocs, timers_avg[2,:], linewidth=1.0, marker='>', markersize=fs, color='r', label='OpenMP(pipe)')
105112
plt.plot(Nprocs, time_serial_f + 0.0*timers_avg[0,:], linewidth=1.0, color='k')
106113
nodes = list(Nprocs)
107-
#ymin = 0
108114
ymax = max(map(max,timers_avg))+1.0
109115

110116
NN = Nprocs[ numpy.size(Nprocs) - 2] - 0.75
111117

112-
plt.gca().annotate('Serial runtime', xy=( NN, 1.075*time_serial_f), xytext=( NN, 1.075*time_serial_f ), fontsize=fs-4)
118+
plt.gca().annotate('Serial runtime', xy=( NN, 1.075*time_serial_f), xytext=( NN, 1.075*time_serial_f ), fontsize=fs-1)
113119
plt.gca().set_yscale('log')
114120
#plt.gca().set_xscale('log')
115121
plt.xlabel('Number of cores', fontsize=fs)
116122
plt.ylabel('Runtime [sec.] (log-scaled)', fontsize=fs, labelpad=2)
123+
117124
plt.tick_params(axis='both', which='major', labelsize=fs)
125+
118126
plt.gca().set_ylim([2.0, 50.0])
119-
plt.gca().set_xticks(Nprocs)
120-
#plt.xticks([2,6,10,14,18,22], fontsize=fs)
127+
if machine=="dora":
128+
plt.gca().set_xticks([2,6,10,14,18,22])
129+
if machine=="cub":
130+
plt.gca().set_xticks(Nprocs)
121131
plt.gca().set_yticks([5, 10, 20, 50])
122132
plt.gca().set_yticklabels(["5", "10", "20", "50"])
123133
plt.gca().get_yaxis().get_major_formatter().labelOnlyBase = False
124134
plt.grid(True)
125-
#plt.legend(loc='upper right', prop={'size':fs-3})
126-
plt.legend(loc='lower left', prop={'size':fs-3})
135+
if machine=="dora":
136+
plt.legend(loc='upper right', prop={'size':fs})
137+
if machine=="cub":
138+
plt.legend(loc='lower left', prop={'size':fs})
127139

128140
# Saveing figure
129141
fig.savefig('Runtime.pdf',bbox_inches='tight')

0 commit comments

Comments
 (0)