Style templates for Matplotlib figures.
Import style of the Journal of Fluid Mechanics:
from DryTransfer import JFM as journal
print( journal.full_name )>>> Journal of Fluid MechanicsWe can now generate a figure:
from pylab import *
fig, axs = subplots( nrows = 3, sharex = True )
x = linspace(-5,5,100)
for i, ax in enumerate(axs) :
ax.plot( x, sin( i*x ) )Templates come with convenient functions. For instance:
journal.label_axes()Here is the result:
To change journal style, simply import another template:
from DryTransfer import PRL as journalThis is for Physical Review Letters. Here is the result:
Here.