plot_single_scalar_nona.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
############################ WARNING ############################
# For running this script with Linux or MacOS, open a terminal in
# the subdirectory EXAMPLES, then type the command
#
# python plot_single_scalar_nona.py
#
#################################################################
import sys
sys.path.insert(0, '../PYTHON')
# Import the module for plotting the contents of HDF5 files
from plots import *
# We aim to plot the contents of the following file:
inputh5 = '../RESULTS/EXAMPLES/test_nona/diags_10.h5'
# ... and more precisely the x-component of the velocity
field = 'Velocity_x'
# Simple contour plot
plot_contour(inputh5, field, aliasfield='ux', outputpng='./ux_contour.png', forcesave=True)
# Same with a prescribed bounding box
plot_contour(inputh5, field, aliasfield='ux', list_bbox=[0., 30., 0., 3], outputpng='./ux_contour_bbox.png', forcesave=True)
# Same with prescribed isovalues
plot_contour(inputh5, field, aliasfield='ux', levels=[0., 0.5, 1.], outputpng='./ux_contour_levels.png', forcesave=True)
# Simple pseudocolor plot
plot_pseudocolor(inputh5, field, aliasfield='ux', outputpng='./ux_pseudocolor.png', forcesave=True)
# Same with a prescribed bounding box
plot_pseudocolor(inputh5, field, aliasfield='ux', list_bbox=[0., 30., 0., 3], outputpng='./ux_pseudocolor_bbox.png', forcesave=True)
# Same with prescribed bounds of colorbar
plot_pseudocolor(inputh5, field, aliasfield='ux', list_minmax=[0., 1.], outputpng='./ux_pseudocolor_minmax.png', forcesave=True)