Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 880 Bytes

File metadata and controls

52 lines (33 loc) · 880 Bytes

DryTransfer

Style templates for Matplotlib figures.

Quick example

Import style of the Journal of Fluid Mechanics:

from DryTransfer import JFM as journal
print( journal.full_name )
>>> Journal of Fluid Mechanics

We 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:

First example

To change journal style, simply import another template:

from DryTransfer import PRL as journal

This is for Physical Review Letters. Here is the result:

Other style

Documentation

Here.