import pylab
import tables
import math
import numpy
import pylab
import numpy
from matplotlib import rcParams
import matplotlib.pyplot as plt

# customization for figure
rcParams['lines.linewidth']            = 2
rcParams['font.size']                  = 18
rcParams['xtick.major.size']           = 8 # default is 4
rcParams['xtick.major.width']          = 3 # default is 0.5
rcParams['ytick.major.size']           = 8 # default is 4
rcParams['ytick.major.width']          = 3 # default is 0.5
rcParams['xtick.minor.size']           = 4 # default is 4
rcParams['xtick.minor.width']          = 0.5 # default is 0.5
rcParams['ytick.minor.size']           = 4 # default is 4
rcParams['ytick.minor.width']          = 0.5 # default is 0.5
rcParams['figure.facecolor']           = 'white'
#rcParams['figure.subplot.bottom']      = 0.125
#rcParams['figure.subplot.right']       = 0.85 # keep labels/ticks of colobar in figure
rcParams['image.interpolation']        = 'none'
rcParams['image.origin']               = 'lower'
#rcParams['contour.negative_linestyle'] = 'solid'
rcParams['savefig.bbox']               = 'tight'

# Math/LaTex fonts:
# http://matplotlib.org/users/mathtext.html
# http://matplotlib.org/users/usetex.html
# Example: xlabel(r'$t \cdot l / V_{A,bc}$')
rcParams['mathtext.default'] = 'regular' # match the font used for regular text

import tables
from pylab import *

for i in range(0, 101):
    print("Working on %d ..." % i)
    d = tables.open_file("f3-5m-two-stream_q_%d.h5" % i)
    q = d.root.StructGridField
    figure()
    subplot(2,1,1)
    plot(q[:,0,1]/q[:,0,0], '-r', label='ux1')
    plot(q[:,0,6]/q[:,0,5], '-k', label='ux2')
    ylabel('Ux')
    subplot(2,1,2)
    plot(-q[:,0,10], '-k', label='Ex')
    ylabel('Fx')
    savefig('f3-5m-two-stream_u_%05d.png' % i, dpi=300)
    close()
    
    

import pylab
import tables
import math
import numpy
import pylab
import numpy
from matplotlib import rcParams
import matplotlib.pyplot as plt

# customization for figure
rcParams['lines.linewidth']            = 2
rcParams['font.size']                  = 18
rcParams['xtick.major.size']           = 8 # default is 4
rcParams['xtick.major.width']          = 3 # default is 0.5
rcParams['ytick.major.size']           = 8 # default is 4
rcParams['ytick.major.width']          = 3 # default is 0.5
rcParams['xtick.minor.size']           = 4 # default is 4
rcParams['xtick.minor.width']          = 0.5 # default is 0.5
rcParams['ytick.minor.size']           = 4 # default is 4
rcParams['ytick.minor.width']          = 0.5 # default is 0.5
rcParams['figure.facecolor']           = 'white'
#rcParams['figure.subplot.bottom']      = 0.125
#rcParams['figure.subplot.right']       = 0.85 # keep labels/ticks of colobar in figure
rcParams['image.interpolation']        = 'none'
rcParams['image.origin']               = 'lower'
#rcParams['contour.negative_linestyle'] = 'solid'
rcParams['savefig.bbox']               = 'tight'

# Math/LaTex fonts:
# http://matplotlib.org/users/mathtext.html
# http://matplotlib.org/users/usetex.html
# Example: xlabel(r'$t \cdot l / V_{A,bc}$')
rcParams['mathtext.default'] = 'regular' # match the font used for regular text

import tables
from pylab import *

for i in range(0, 101):
    print("Working on %d ..." % i)
    d = tables.open_file("f3-5m-two-stream_q_%d.h5" % i)
    q = d.root.StructGridField
    figure()
    subplot(2,1,1)
    plot(q[:,0,1]/q[:,0,0], '-r', label='ux1')
    plot(q[:,0,6]/q[:,0,5], '-k', label='ux2')
    ylabel('Ux')
    subplot(2,1,2)
    plot(-q[:,0,10], '-k', label='Ex')
    ylabel('Fx')
    savefig('f3-5m-two-stream_u_%05d.png' % i, dpi=300)
    close()
    
    

# customization for figure # default is 4 # default is 0.5 # default is 4 # default is 0.5 # default is 4 # default is 0.5 # default is 4 # default is 0.5 #rcParams['figure.subplot.bottom']      = 0.125 #rcParams['figure.subplot.right']       = 0.85 # keep labels/ticks of colobar in figure #rcParams['contour.negative_linestyle'] = 'solid' # Math/LaTex fonts: # http://matplotlib.org/users/mathtext.html # http://matplotlib.org/users/usetex.html # Example: xlabel(r'$t \cdot l / V_{A,bc}$') # match the font used for regular text