-
Notifications
You must be signed in to change notification settings - Fork 0
/
writeTexPlotCode.py
executable file
·32 lines (29 loc) · 1016 Bytes
/
writeTexPlotCode.py
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
#!/usr/bin/env python2
"""
Because copying and pasting code is for chumps
"""
for antInd in range(51):
antNum = antInd + 1
for plotInd in range(2):
baseFileName = ''
if plotInd == 0:
baseFileName = 's11p'
else:
baseFileName = 'rxp'
fileName = ''
if antNum <= 9:
fileName = baseFileName + '0' + str(antNum)
else:
fileName = baseFileName + str(antNum)
print '\\begin{figure}[H]'
print '\t\\begin{center}'
print '\t\t\\includegraphics[width=11cm]{' + fileName + '.png}'
if plotInd == 0:
print '\t\t\\caption{S11 plot of power and phase for antenna P' + str(antNum) + ', 100-1300 MHz.}'
else:
print '\t\t\\caption{S21 gain and fractional cross polarization for antenna P' + str(antNum) + ', 100-1300 MHz.}'
print '\t\t\\label{'+fileName+'plot}'
print '\t\\end{center}'
print '\\end{figure}'
print ''
print ''