import seaborn as sns
flatui = ["#9b59b6", "#3498db", "#95a5a6", "#e74c3c", "#34495e", "#2ecc71"]
How to form a structured array AND add new rows to it

grid = n.zeros(0,dtype=[('den', 'f4'), ('temp', 'f4'), ('u', 'f4'),('g', 'f4'),('r', 'f4')])
grid = n.append(grid, n.array([(den,temp,u,g,r)], dtype=grid.dtype))
Add a new field to a structured array:

from numpy.lib.recfunctions import append_fields
To make bigger and clearer minor ticks in plots use:

ax.tick_params('both', length=10, width=2, which='major')
ax.tick_params('both', length=5, width=1, which='minor')
Sort two (or more) arrays simultaneously:

list1, list2 = zip(*sorted(zip(list1, list2)))
Sort by indices

wav = wav[inds]
inds = wav.argsort()
grid = grid[inds]

print('{}: {:7.3f} {:7.3f} {:7.3f} {:7.3f} {:7.3f}'.format(spec['filename'],
		res.params['lam0'].value,r es.params['int1'].value,
		res.params['int2'].value, res.params['width1'].value,
Convert PDF to PNG

convert -density 150 vel_00001.pdf -quality 90 vel_00001.png