本文整理汇总了Python中clawpack.visclaw.data.ClawPlotData.latex_makepdf方法的典型用法代码示例。如果您正苦于以下问题:Python ClawPlotData.latex_makepdf方法的具体用法?Python ClawPlotData.latex_makepdf怎么用?Python ClawPlotData.latex_makepdf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类clawpack.visclaw.data.ClawPlotData
的用法示例。
在下文中一共展示了ClawPlotData.latex_makepdf方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
def setplot(plotdata=None):
#--------------------------
"""
Specify what is to be plotted at each frame.
Input: plotdata, an instance of clawpack.visclaw.data.ClawPlotData.
Output: a modified version of plotdata.
"""
if plotdata is None:
from clawpack.visclaw.data import ClawPlotData
plotdata = ClawPlotData()
plotdata.clearfigures() # clear any old figures,axes,items data
# Figure for q[0]
plotfigure = plotdata.new_plotfigure(name='Pressure and Velocity', figno=1)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [-.5,1.3]
plotaxes.title = 'q'
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 0
plotitem.plotstyle = '-o'
plotitem.color = 'b'
# Plot true solution for comparison:
def plot_qtrue(current_data):
from pylab import plot, legend
x = current_data.x
t = current_data.t
q = qtrue(x,t)
plot(x,q,'r',label='true solution')
legend()
plotaxes.afteraxes = plot_qtrue
# Parameters used only when creating html and/or latex hardcopy
# e.g., via clawpack.visclaw.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html'
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata
示例2: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
def setplot(plotdata=None):
#--------------------------
"""
Specify what is to be plotted at each frame.
Input: plotdata, an instance of clawpack.visclaw.data.ClawPlotData.
Output: a modified version of plotdata.
"""
if plotdata is None:
from clawpack.visclaw.data import ClawPlotData
plotdata = ClawPlotData()
plotdata.clearfigures() # clear any old figures,axes,items data
print("**** Python plotting tools not yet implemented in 3d")
print("**** No frame plots will be generated.")
#-----------------------------------------
# Figures for gauges
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='q', figno=300, \
type='each_gauge')
plotfigure.clf_each_gauge = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'q'
# Plot q as blue curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 0
plotitem.plotstyle = 'b-'
# Parameters used only when creating html and/or latex hardcopy
# e.g., via clawpack.visclaw.frametools.printframes:
plotdata.printfigs = False # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = [] # list of frames to print
plotdata.print_fignos = [] # list of figures to print
plotdata.html = False # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.html_movie = 'JSAnimation' # new style, or "4.x" for old style
plotdata.latex = False # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
plotdata.parallel = True # make multiple frame png's at once
return plotdata
示例3: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
# Add contour lines of bathymetry:
plotitem = plotaxes.new_plotitem(plot_type='2d_contour')
plotitem.plot_var = geoplot.topo
from numpy import arange, linspace
plotitem.contour_levels = linspace(-.1, 0.5, 20)
plotitem.amr_contour_colors = ['k'] # color on each level
plotitem.kwargs = {'linestyles':'solid'}
plotitem.amr_contour_show = [1]
plotitem.celledges_show = 0
plotitem.patchedges_show = 0
plotitem.show = True
#-----------------------------------------
# Figure for cross section
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='cross-section', figno=1)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = [-2,2]
plotaxes.ylimits = [-0.15,0.3]
plotaxes.title = 'Cross section at y=0'
def plot_topo_xsec(current_data):
from pylab import plot, cos,sin,where,legend,nan
t = current_data.t
x = linspace(-2,2,201)
y = 0.
B = h0*(x**2 + y**2)/a**2 - h0
eta1 = sigma*h0/a**2 * (2.*x*cos(omega*t) + 2.*y*sin(omega*t) -sigma)
etatrue = where(eta1>B, eta1, nan)
plot(x, etatrue, 'r', label="true solution", linewidth=2)
plot(x, B, 'g', label="bathymetry")
## plot([0],[-1],'kx',label="Level 1") # shouldn't show up in plots,
## plot([0],[-1],'bo',label="Level 2") # but will produced desired legend
plot([0],[-1],'bo',label="Computed") ## need to fix plotstyle
legend()
plotaxes.afteraxes = plot_topo_xsec
plotitem = plotaxes.new_plotitem(plot_type='1d_from_2d_data')
def xsec(current_data):
# Return x value and surface eta at this point, along y=0
from pylab import find,ravel
x = current_data.x
y = current_data.y
dy = current_data.dy
q = current_data.q
ij = find((y <= dy/2.) & (y > -dy/2.))
x_slice = ravel(x)[ij]
eta_slice = ravel(q[3,:,:])[ij]
return x_slice, eta_slice
plotitem.map_2d_to_1d = xsec
plotitem.plotstyle = 'kx' ## need to be able to set amr_plotstyle
plotitem.kwargs = {'markersize':3}
plotitem.amr_show = [1] # plot on all levels
#-----------------------------------------
# Figure for grids alone
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='grids', figno=2)
plotfigure.show = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = [-2,2]
plotaxes.ylimits = [-2,2]
plotaxes.title = 'grids'
plotaxes.scaled = True
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='2d_patch')
plotitem.amr_patch_bgcolor = ['#ffeeee', '#eeeeff', '#eeffee']
plotitem.amr_celledges_show = [1,1,0]
plotitem.amr_patchedges_show = [1]
#-----------------------------------------
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_gaugenos = [] # list of gauges to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
plotdata.parallel = True # make multiple frame png's at once
return plotdata
示例4: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
ml_plot.add_land(plotaxes, 1)
plotaxes = plotfigure.new_plotaxes()
plotaxes.title = "Y-Velocity - Top Layer"
plotaxes.scaled = True
plotaxes.xlimits = xlimits
plotaxes.ylimits = ylimits
plotaxes.axescmd = 'subplot(2,2,2)'
ml_plot.add_y_velocity(plotaxes,1)
ml_plot.add_land(plotaxes, 1)
# Bottom layer
plotaxes = plotfigure.new_plotaxes()
plotaxes.title = "X-Velocity - Bottom Layer"
plotaxes.scaled = True
plotaxes.xlimits = xlimits
plotaxes.ylimits = ylimits
plotaxes.axescmd = 'subplot(2,2,3)'
ml_plot.add_x_velocity(plotaxes,2)
ml_plot.add_land(plotaxes, 2)
plotaxes = plotfigure.new_plotaxes()
plotaxes.title = "Y-Velocity - Bottom Layer"
plotaxes.scaled = True
plotaxes.xlimits = xlimits
plotaxes.ylimits = ylimits
plotaxes.axescmd = 'subplot(2,2,4)'
ml_plot.add_y_velocity(plotaxes,2)
ml_plot.add_land(plotaxes, 2)
#-----------------------------------------
# Figures for gauges
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='Surface at gauges', figno=300, \
type='each_gauge')
plotfigure.clf_each_gauge = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'Surface'
# Plot surface as blue curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 3
plotitem.plotstyle = 'b-'
# Plot topo as green curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.show = False
def gaugetopo(current_data):
q = current_data.q
h = q[0,:]
eta = q[3,:]
topo = eta - h
return topo
plotitem.plot_var = gaugetopo
plotitem.plotstyle = 'g-'
def add_zeroline(current_data):
from pylab import plot, legend, xticks, floor, axis, xlabel
t = current_data.t
gaugeno = current_data.gaugeno
if gaugeno == 32412:
try:
plot(TG32412[:,0], TG32412[:,1], 'r')
legend(['GeoClaw','Obs'],loc='lower right')
except: pass
axis((0,t.max(),-0.3,0.3))
plot(t, 0*t, 'k')
n = int(floor(t.max()/3600.) + 2)
xticks([3600*i for i in range(n)], ['%i' % i for i in range(n)])
xlabel('time (hours)')
#-----------------------------------------
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_gaugenos = 'all' # list of gauges to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
plotdata.parallel = True # make multiple frame png's at once
return plotdata
示例5: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = regions['Gulf']['xlimits']
plotaxes.ylimits = regions['Gulf']['ylimits']
plotaxes.title = "Pressure Field"
plotaxes.afteraxes = surge_afteraxes
plotaxes.scaled = True
surgeplot.add_pressure(plotaxes, bounds=pressure_limits)
surgeplot.add_land(plotaxes)
# Wind field
plotfigure = plotdata.new_plotfigure(name='Wind Speed')
plotfigure.show = surge_data.wind_forcing and True
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = regions['Gulf']['xlimits']
plotaxes.ylimits = regions['Gulf']['ylimits']
plotaxes.title = "Wind Field"
plotaxes.afteraxes = surge_afteraxes
plotaxes.scaled = True
surgeplot.add_wind(plotaxes, bounds=wind_limits)
surgeplot.add_land(plotaxes)
# ========================================================================
# Figures for gauges
# ========================================================================
plotfigure = plotdata.new_plotfigure(name='Gauge Surfaces', figno=300,
type='each_gauge')
plotfigure.show = True
plotfigure.clf_each_gauge = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = [-2, 1]
# plotaxes.xlabel = "Days from landfall"
# plotaxes.ylabel = "Surface (m)"
plotaxes.ylimits = [-1, 5]
plotaxes.title = 'Surface'
def gauge_afteraxes(cd):
axes = plt.gca()
surgeplot.plot_landfall_gauge(cd.gaugesoln, axes, landfall=landfall)
# Fix up plot - in particular fix time labels
axes.set_title('Station %s' % cd.gaugeno)
axes.set_xlabel('Days relative to landfall')
axes.set_ylabel('Surface (m)')
axes.set_xlim([-2, 1])
axes.set_ylim([-1, 5])
axes.set_xticks([-2, -1, 0, 1])
axes.set_xticklabels([r"$-2$", r"$-1$", r"$0$", r"$1$"])
axes.grid(True)
plotaxes.afteraxes = gauge_afteraxes
# Plot surface as blue curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 3
plotitem.plotstyle = 'b-'
#
# Gauge Location Plot
#
def gauge_location_afteraxes(cd):
plt.subplots_adjust(left=0.12, bottom=0.06, right=0.97, top=0.97)
surge_afteraxes(cd)
gaugetools.plot_gauge_locations(cd.plotdata, gaugenos='all',
format_string='ko', add_labels=True)
plotfigure = plotdata.new_plotfigure(name="Gauge Locations")
plotfigure.show = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.title = 'Gauge Locations'
plotaxes.scaled = True
plotaxes.xlimits = [-95.5, -94]
plotaxes.ylimits = [29.0, 30.0]
plotaxes.afteraxes = gauge_location_afteraxes
surgeplot.add_surface_elevation(plotaxes, bounds=surface_limits)
surgeplot.add_land(plotaxes)
plotaxes.plotitem_dict['surface'].amr_patchedges_show = [0] * 10
plotaxes.plotitem_dict['land'].amr_patchedges_show = [0] * 10
# -----------------------------------------
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_gaugenos = [1, 2, 3, 4] # list of gauges to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
plotdata.parallel = True # parallel plotting
return plotdata
示例6: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.title = 'depth'
plotaxes.scaled = True
plotaxes.xlimits = gulf_xlimits
plotaxes.ylimits = gulf_ylimits
plotaxes.afteraxes = gulf_after_axes
plotitem = plotaxes.new_plotitem(plot_type='2d_imshow')
plotitem.plot_var = 0
plotitem.imshow_cmap = colormaps.make_colormap({1.0:'r',0.5:'w',0.0:'b'})
plotitem.imshow_cmin = 0
plotitem.imshow_cmax = 100
plotitem.colorbar_shrink = gulf_shrink
plotitem.add_colorbar = True
plotitem.amr_celledges_show = [0,0,0]
plotitem.amr_patchedges_show = [1,1,1,1,1,1,1,1,1]
# Surge field
plotfigure = plotdata.new_plotfigure(name='Surge Field',
figno=fig_num_counter.get_counter())
plotfigure.show = ((surge_data.wind_forcing or surge_data.pressure_forcing)
and False)
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = gulf_xlimits
plotaxes.ylimits = gulf_ylimits
plotaxes.title = "Storm Surge Source Term S"
plotaxes.afteraxes = gulf_after_axes
plotaxes.scaled = True
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
plotitem.plot_var = surgeplot.pressure_field + 1
plotitem.pcolor_cmap = plt.get_cmap('PuBu')
plotitem.pcolor_cmin = 0.0
plotitem.pcolor_cmax = 1e-3
plotitem.add_colorbar = True
plotitem.colorbar_shrink = gulf_shrink
plotitem.colorbar_label = "Source Strength"
plotitem.amr_celledges_show = [0,0,0]
plotitem.amr_patchedges_show = [1,1,1,1,1,0,0]
surgeplot.add_land(plotaxes)
plotfigure = plotdata.new_plotfigure(name='Friction/Coriolis Source',
figno=fig_num_counter.get_counter())
plotfigure.show = False
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = gulf_xlimits
plotaxes.ylimits = gulf_ylimits
plotaxes.title = "Friction/Coriolis Source"
plotaxes.afteraxes = surge_afteraxes
plotaxes.scaled = True
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
plotitem.plot_var = surgeplot.pressure_field + 2
plotitem.pcolor_cmap = plt.get_cmap('PuBu')
plotitem.pcolor_cmin = 0.0
plotitem.pcolor_cmax = 1e-3
plotitem.add_colorbar = True
plotitem.colorbar_shrink = gulf_shrink
plotitem.colorbar_label = "Source Strength"
plotitem.amr_celledges_show = [0,0,0]
plotitem.amr_patchedges_show = [1,1,1,1,1,0,0]
surgeplot.add_land(plotaxes)
#-----------------------------------------
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
if article:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = [54,60,66,72,78,84] # list of frames to print
plotdata.print_gaugenos = [1,2,3,4] # list of gauges to print
plotdata.print_fignos = [4,5,6,7,10,3,300] # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = False # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
else:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_gaugenos = [1,2,3,4] # list of gauges to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
plotdata.parallel = True # make multiple frame png's at once
return plotdata
示例7: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(1,2,1)' # left figure
plotaxes.xlimits = [0,1]
plotaxes.ylimits = [0,7]
plotaxes.title = 'Density'
#plotaxes.afteraxes = add_legend
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_pwconst')
plotitem.plot_var = 0
plotitem.amr_color = level_colors
plotitem.amr_plotstyle = level_styles
plotitem.amr_data_show = [1] # all levels
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(1,2,2)' # right
plotaxes.xlimits = [0,1]
plotaxes.ylimits = [-10,1100]
plotaxes.title = 'Pressure'
plotaxes.afteraxes = add_legend
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_pwconst')
plotitem.plot_var = pressure
plotitem.amr_color = level_colors
plotitem.amr_plotstyle = level_styles
plotitem.amr_data_show = [1] # all levels
# Density and pressure plots, zoomed at final time
# -------------------------------------------------
plotfigure = plotdata.new_plotfigure(name='zoom view', figno=2)
plotfigure.kwargs = {'figsize':(10,5)}
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(1,2,1)' # left figure
plotaxes.xlimits = [0.5,0.9]
plotaxes.ylimits = [0,7]
plotaxes.title = 'Density'
#plotaxes.afteraxes = add_legend
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_pwconst')
plotitem.plot_var = 0
plotitem.amr_color = level_colors
plotitem.amr_plotstyle = level_styles
plotitem.amr_data_show = [1] # all levels
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(1,2,2)' # right
plotaxes.xlimits = [0.5,0.9]
plotaxes.ylimits = [-10,450]
plotaxes.title = 'Pressure'
plotaxes.afteraxes = add_legend
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_pwconst')
plotitem.plot_var = pressure
plotitem.amr_color = level_colors
plotitem.amr_plotstyle = level_styles
plotitem.amr_data_show = [1] # all levels
#-----------------------------------------
# Figures for gauges
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='q', figno=300, \
type='each_gauge')
plotfigure.clf_each_gauge = True
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [-1,30]
plotaxes.title = 'Density'
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 0
plotitem.plotstyle = 'b-'
# Parameters used only when creating html and/or latex hardcopy
# e.g., via clawpack.visclaw.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html'
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata
示例8: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
def setplot(plotdata=None):
#--------------------------
"""
Specify what is to be plotted at each frame.
Input: plotdata, an instance of clawpack.visclaw.data.ClawPlotData.
Output: a modified version of plotdata.
"""
if plotdata is None:
from clawpack.visclaw.data import ClawPlotData
plotdata = ClawPlotData()
plotdata.clearfigures() # clear any old figures,axes,items data
# Figure for pressure and velocity:
plotfigure = plotdata.new_plotfigure(name='Pressure and Velocity', figno=1)
# Pressure:
# ---------
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(2,1,1)' # top figure
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [-.5,1.]
plotaxes.title = 'Pressure'
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 0
plotitem.plotstyle = '-'
plotitem.color = 'b'
# Velocity:
# ---------
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(2,1,2)' # bottom figure
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [-1.,1.]
plotaxes.title = 'Velocity'
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 1
plotitem.plotstyle = '-'
plotitem.color = 'b'
# Parameters used only when creating html and/or latex hardcopy
# e.g., via clawpack.visclaw.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html'
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata
示例9: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
plotfigure.clf_each_gauge = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
# plotaxes.xlimits = [0.0,amrdata.tfinal]
# plotaxes.ylimits = [0,150.0]
plotaxes.ylimits = surface_limits
plotaxes.title = 'Surface'
plotaxes.afteraxes = surgeplot.gauge_afteraxes
# Plot surface as blue curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 3
plotitem.plotstyle = 'r-'
# =================
# Plot bathymetry
# =================
plotfigure = plotdata.new_plotfigure(name='Bathymetry', figno=301)
plotfigure.show = True
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = full_xlimits
plotaxes.ylimits = full_ylimits
plotaxes.title = "Bathymetry"
plotaxes.afteraxes = surge_afteraxes
plotaxes.scaled = True
plotitem = plotaxes.new_plotitem(plot_type="2d_pcolor")
plotitem.plot_var = geoplot.topo
# plotitem.pcolor_cmap = geoplot.seafloor_colormap
plotitem.pcolor_cmin = -3000.0
plotitem.pcolor_cmax = 300.0
plotitem.add_colorbar = True
surgeplot.add_land(plotaxes)
#-----------------------------------------
# Figures for gauges
#-----------------------------------------
# plotfigure = plotdata.new_plotfigure(name='Surface & topo', figno=300, \
# type='each_gauge')
# plotfigure.clf_each_gauge = True
#
# # Set up for axes in this figure:
# plotaxes = plotfigure.new_plotaxes()
# plotaxes.xlimits = 'auto'
# plotaxes.ylimits = 'auto'
# plotaxes.title = 'Surface'
#
# # Plot surface as blue curve:
# plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
# plotitem.plot_var = 3
# plotitem.plotstyle = 'b-'
#
# # Plot topo as green curve:
# plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
# plotitem.show = False
#
# def gaugetopo(current_data):
# q = current_data.q
# h = q[0,:]
# eta = q[3,:]
# topo = eta - h
# return topo
#
# plotitem.plot_var = gaugetopo
# plotitem.plotstyle = 'g-'
#
# def add_zeroline(current_data):
# from pylab import plot, legend, xticks, floor
# t = current_data.t
# #legend(('surface','topography'),loc='lower left')
# plot(t, 0*t, 'k')
# n = int(floor(t.max()/3600.) + 2)
# xticks([3600*i for i in range(n)])
#
# plotaxes.afteraxes = add_zeroline
#-----------------------------------------
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
# plotdata.print_framenos = [45,46,47,48]
plotdata.print_gaugenos = 'all' # list of gauges to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata
示例10: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
def setplot(plotdata=None):
#--------------------------
"""
Specify what is to be plotted at each frame.
Input: plotdata, an instance of pyclaw.plotters.data.ClawPlotData.
Output: a modified version of plotdata.
"""
if plotdata is None:
from clawpack.visclaw.data import ClawPlotData
plotdata = ClawPlotData()
plotdata.clearfigures() # clear any old figures,axes,items data
# Figure for q[0]
plotfigure = plotdata.new_plotfigure(name='q[0]', figno=0)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = [0,1.5]
plotaxes.ylimits = [-2.,4.]
plotaxes.title = 'q[0]'
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d')
plotitem.plot_var = 0
plotitem.plotstyle = '-'
plotitem.color = 'b'
plotitem.show = True # show on plot?
# Figure for q[1]
plotfigure = plotdata.new_plotfigure(name='q[1]', figno=1)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'q[1]'
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d')
plotitem.plot_var = 1
plotitem.plotstyle = '-'
plotitem.color = 'b'
plotitem.show = True # show on plot?
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
plotdata.parallel = True # make multiple frame png's at once
return plotdata
示例11: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
def setplot(plotdata):
#--------------------------
"""
Specify what is to be plotted at each frame.
Input: plotdata, an instance of clawpack.visclaw.data.ClawPlotData.
Output: a modified version of plotdata.
"""
if plotdata is None:
from clawpack.visclaw.data import ClawPlotData
plotdata = ClawPlotData()
plotdata.clearfigures() # clear any old figures,axes,items data
# Figure with both components
plotfigure = plotdata.new_plotfigure(name='h and hu', figno=0)
plotfigure.kwargs = {'figsize':(6,8)}
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(2,1,1)'
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [0., 4.5]
plotaxes.title = 'depth h'
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d')
plotitem.plot_var = 0
plotitem.plotstyle = '-'
plotitem.color = 'b'
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(2,1,2)'
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [-2., 6.]
plotaxes.title = 'momentum hu'
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d')
plotitem.plot_var = 1
plotitem.plotstyle = '-'
plotitem.color = 'b'
plotitem.show = True # show on plot?
# Parameters used only when creating html and/or latex hardcopy
# e.g., via clawpack.visclaw.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata
示例12: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
def addgauges(current_data):
from clawpack.visclaw import gaugetools
gaugetools.plot_gauge_locations(current_data.plotdata, \
gaugenos='all', format_string='ko', add_labels=True)
def fixup(current_data):
import pylab
#addgauges(current_data)
t = current_data.t
t = t / 3600. # hours
pylab.title('Surface at %4.2f hours' % t, fontsize=20)
pylab.xticks(fontsize=15)
pylab.yticks(fontsize=15)
#-----------------------------------------
# Figure for surface
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='Surface', figno=0)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes('pcolor')
plotaxes.title = 'Surface'
plotaxes.scaled = True
plotaxes.afteraxes = fixup
# Water
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
#plotitem.plot_var = geoplot.surface
plotitem.plot_var = geoplot.surface_or_depth
plotitem.pcolor_cmap = geoplot.tsunami_colormap
plotitem.pcolor_cmin = -0.2
plotitem.pcolor_cmax = 0.2
plotitem.add_colorbar = True
plotitem.amr_celledges_show = [1,1,0]
plotitem.patchedges_show = 1
# Land
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
plotitem.plot_var = geoplot.land
plotitem.pcolor_cmap = geoplot.land_colors
plotitem.pcolor_cmin = 0.0
plotitem.pcolor_cmax = 100.0
plotitem.add_colorbar = False
plotitem.amr_celledges_show = [1,1,0]
plotitem.patchedges_show = 1
plotaxes.xlimits = [-120,-60]
plotaxes.ylimits = [-60,0]
#-----------------------------------------
# Figures for gauges
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='Surface at gauges', figno=300, \
type='each_gauge')
plotfigure.clf_each_gauge = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'Surface'
# Plot surface as blue curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 3
plotitem.plotstyle = 'b-'
def add_zeroline(current_data):
from pylab import plot, legend, xticks, floor, axis, xlabel
t = current_data.t
gaugeno = current_data.gaugeno
plot(t, 0*t, 'k')
n = int(floor(t.max()/3600.) + 2)
xticks([3600*i for i in range(n)], ['%i' % i for i in range(n)])
xlabel('time (hours)')
plotaxes.afteraxes = add_zeroline
#-----------------------------------------
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_gaugenos = 'all' # list of gauges to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata
示例13: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
plotitem.add_colorbar = True
plotitem.amr_celledges_show = [0,0,0]
plotitem.patchedges_show = 1
# Land
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
plotitem.plot_var = geoplot.land
plotitem.pcolor_cmap = geoplot.land_colors
plotitem.pcolor_cmin = 0.0
plotitem.pcolor_cmax = 100.0
plotitem.add_colorbar = False
plotitem.amr_celledges_show = [1,1,0]
plotitem.patchedges_show = 1
plotaxes.xlimits = [-120,-60]
plotaxes.ylimits = [-60,0]
# add contour lines of bathy if desired:
plotitem = plotaxes.new_plotitem(plot_type='2d_contour')
plotitem.show = False
plotitem.plot_var = geoplot.topo
plotitem.contour_levels = linspace(-3000,-3000,1)
plotitem.amr_contour_colors = ['y'] # color on each level
plotitem.kwargs = {'linestyles':'solid','linewidths':2}
plotitem.amr_contour_show = [1,0,0]
plotitem.celledges_show = 0
plotitem.patchedges_show = 0
#-----------------------------------------
# Figures for gauges
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='Surface at gauges', figno=300, \
type='each_gauge')
plotfigure.clf_each_gauge = True
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'Surface'
# Plot surface as blue curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 3
plotitem.plotstyle = 'b-'
# Plot topo as green curve:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.show = False
def gaugetopo(current_data):
q = current_data.q
h = q[0,:]
eta = q[3,:]
topo = eta - h
return topo
plotitem.plot_var = gaugetopo
plotitem.plotstyle = 'g-'
def add_zeroline(current_data):
from pylab import plot, legend, xticks, floor, axis, xlabel
t = current_data.t
gaugeno = current_data.gaugeno
if gaugeno == 32412:
try:
plot(TG32412[:,0], TG32412[:,1], 'r')
legend(['GeoClaw','Obs'],loc='lower right')
except: pass
axis((0,t.max(),-0.3,0.3))
plot(t, 0*t, 'k')
n = int(floor(t.max()/3600.) + 2)
xticks([3600*i for i in range(n)], ['%i' % i for i in range(n)])
xlabel('time (hours)')
plotaxes.afteraxes = add_zeroline
#-----------------------------------------
# Parameters used only when creating html and/or latex hardcopy
# e.g., via pyclaw.plotters.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_gaugenos = 'all' # list of gauges to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
plotdata.parallel = True # make multiple frame png's at once
return plotdata
示例14: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
plotdata.clearfigures() # clear any old figures,axes,items data
def plot_corner(current_data):
from pylab import plot
plot([.0,.0],[-1,0],'r',linewidth=2)
plot([.0,1],[0,.55],'r',linewidth=2)
def sigmatr(current_data):
# trace of sigma
q = current_data.q
return q[0,:,:] + q[1,:,:]
# Figure for trace of sigma
plotfigure = plotdata.new_plotfigure(name='trace(sigma)', figno=0)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'trace(sigma)'
plotaxes.scaled = True
plotaxes.afteraxes = plot_corner
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
plotitem.plot_var = sigmatr
plotitem.pcolor_cmap = colormaps.red_yellow_blue
plotitem.pcolor_cmin = -1.
plotitem.pcolor_cmax = 1.
plotitem.add_colorbar = True
plotitem.show = True # show on plot?
# Figure for shear stress
plotfigure = plotdata.new_plotfigure(name='shear', figno=1)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'shear stress'
plotaxes.scaled = True
plotaxes.afteraxes = plot_corner
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='2d_pcolor')
plotitem.plot_var = 2 # sigma_12
plotitem.pcolor_cmap = colormaps.red_yellow_blue
plotitem.pcolor_cmin = -0.2
plotitem.pcolor_cmax = 0.2
plotitem.add_colorbar = True
plotitem.show = True # show on plot?
# Figure for contours
plotfigure = plotdata.new_plotfigure(name='contours', figno=2)
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'pressure(black) and shear(green)'
plotaxes.scaled = True
plotaxes.afteraxes = plot_corner
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='2d_contour')
plotitem.plot_var = sigmatr
plotitem.contour_levels = linspace(-2,8,50)
plotitem.contour_colors = 'k'
plotitem.show = True # show on plot?
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='2d_contour')
plotitem.plot_var = 2 # sigma_12
plotitem.contour_levels = linspace(-0.4,0.4,30)
plotitem.contour_colors = 'g'
plotitem.show = True # show on plot?
# Parameters used only when creating html and/or latex hardcopy
# e.g., via clawpack.visclaw.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html' # pointer for top of index
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata
示例15: setplot
# 需要导入模块: from clawpack.visclaw.data import ClawPlotData [as 别名]
# 或者: from clawpack.visclaw.data.ClawPlotData import latex_makepdf [as 别名]
#.........这里部分代码省略.........
if plotdata is None:
from clawpack.visclaw.data import ClawPlotData
plotdata = ClawPlotData()
plotdata.clearfigures() # clear any old figures,axes,items data
plotdata.format = 'binary' # 'ascii', 'binary', 'netcdf'
def draw_interface_add_legend(current_data):
from pylab import plot
plot([0., 0.], [-1000., 1000.], 'k--')
try:
from clawpack.visclaw import legend_tools
labels = ['Level 1','Level 2', 'Level 3']
legend_tools.add_legend(labels, colors=['g','b','r'],
markers=['^','s','o'], linestyles=['','',''],
loc='upper left')
except:
pass
# Figure for q[0]
plotfigure = plotdata.new_plotfigure(name='Adjoint and Velocity', figno=1)
plotfigure.kwargs = {'figsize': (8,8)}
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(2,1,1)' # top figure
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [-.5,1.1]
plotaxes.title = 'Adjoint'
plotaxes.afteraxes = draw_interface_add_legend
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 0
plotitem.amr_color = ['g','b','r']
plotitem.amr_plotstyle = ['^-','s-','o-']
plotitem.amr_data_show = [1,1,1]
plotitem.amr_kwargs = [{'markersize':5},{'markersize':4},{'markersize':3}]
# Figure for q[1]
# Set up for axes in this figure:
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(2,1,2)' # bottom figure
plotaxes.xlimits = 'auto'
plotaxes.ylimits = [-.5,1.1]
plotaxes.title = 'Velocity'
plotaxes.afteraxes = draw_interface_add_legend
# Set up for item on these axes:
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 1
plotitem.amr_color = ['g','b','r']
plotitem.amr_plotstyle = ['^-','s-','o-']
plotitem.amr_data_show = [1,1,1]
plotitem.amr_kwargs = [{'markersize':5},{'markersize':4},{'markersize':3}]
#-----------------------------------------
# Figures for gauges
#-----------------------------------------
plotfigure = plotdata.new_plotfigure(name='q', figno=300, \
type='each_gauge')
plotfigure.clf_each_gauge = True
plotfigure.kwargs = {'figsize': (10,10)}
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(211)'
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'Pressure'
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 0
plotitem.plotstyle = 'b-'
plotaxes = plotfigure.new_plotaxes()
plotaxes.axescmd = 'subplot(212)'
plotaxes.xlimits = 'auto'
plotaxes.ylimits = 'auto'
plotaxes.title = 'Velocity'
plotitem = plotaxes.new_plotitem(plot_type='1d_plot')
plotitem.plot_var = 1
plotitem.plotstyle = 'b-'
# Parameters used only when creating html and/or latex hardcopy
# e.g., via clawpack.visclaw.frametools.printframes:
plotdata.printfigs = True # print figures
plotdata.print_format = 'png' # file format
plotdata.print_framenos = 'all' # list of frames to print
plotdata.print_fignos = 'all' # list of figures to print
plotdata.html = True # create html files of plots?
plotdata.html_homelink = '../README.html'
plotdata.latex = True # create latex file of plots?
plotdata.latex_figsperline = 2 # layout of plots
plotdata.latex_framesperline = 1 # layout of plots
plotdata.latex_makepdf = False # also run pdflatex?
return plotdata