17 lines
425 B
Python
17 lines
425 B
Python
import matplotlib.pyplot as plt
|
|
|
|
|
|
def SetupFigure(wx, wy, xlabel, ylabel, title, tls):
|
|
"""
|
|
Create a new figure frame
|
|
"""
|
|
fig = plt.figure(figsize=(wx,wy))
|
|
ax = fig.add_subplot(1,1,1)
|
|
ax.set_title(title, fontsize=tls+2)
|
|
ax.grid(which='major', axis='both', ls=':')
|
|
ax.set_ylabel(ylabel, fontsize=tls)
|
|
ax.set_xlabel(xlabel, fontsize=tls)
|
|
ax.tick_params(labelsize=tls)
|
|
return fig, ax
|
|
|