rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
Namespaces | Functions
Postprocess Namespace Reference

Detailed Description

Tools for post-processing data, i.e. data extraction and visual enhancements for publication.

Namespaces

 StochasticAssessment
 Tools for gathering and storing data from a huge set of randomly generated reduced simulations.
 

Functions

function clim = plot_as_tikzfile (params)
 postprocesses a figure and write out an image and a text file that can be included in TeX documents. More...
 
function  plot_trajectories (IReducedModel rmodel,IDetailedData detailed_data, plot_params, mu_set, imsavepath, plot_name, opts)
 function generating a tikz graphic showing trajectories for certain selected parameters More...
 
function file = plottrajectories>create_colorbar_file (file, plot_name, xshift, yshift, cwidth, cheight, ticks, tclim, cbfp, cbfn)
 
function file = plottrajectories>add_to_tikzfile (file, plot_name, xshift, yshift, mi, mu, mufn, nt, ti)
 

Function Documentation

function clim = Postprocess.plot_as_tikzfile (   params)

postprocesses a figure and write out an image and a text file that can be included in TeX documents.

This method creates three files from a MATLAB figure specified by

params.figure_handle
  • A png coded image file containing a snapshot of the figure box
  • A text file ending .tikz that can be included in a LaTeX document adding axes and meta information around the png file.
  • A text file ending _test.tex that can be compiled with pdflatex and outputs a pdf file with the figure output.
Why this is better than including the png file directly
When scaling images for MATLAB figures, often the text for the ticks, legends and axes description is scaled to an unreadable size. Furthermore, text sizes can differ between a LaTeX document and the MATLAB Monospace font type does not look nice in the PDF output. The solution here, circumvents all these problems, because all text used inside the figures will be generated during pdflatex compilation phase.
Parameters
paramsOptions controlling the output
Return values
climclim
Required fields of params:
  • figure_handle —  handle to the figure that shall be postprocessed
  • filename —  base of filename for the three generated files filename.png, filename.tikz and filename_test.tex
  • filepath —  path where the output files shall be stored
  • pic_scale —  pic scale
  • hide_axes —  hide axes
  • export_fig_params —  export fig params
  • scaleaxis —  scaleaxis
Optional fields of params:
  • width —  width of output picture in cm. (default=8.0)
  • relpath —  a path to the image files relative to the main tex file from which the main tikz file is included. This might be necessary, because latex searches input files relative to the latex executation path only. This path string may also include tex commands for later specification of the image path in the tex file. (default=./)
  • height —  height of output picture in pixels. If this parameter does not exist or is set to zero, the height is calculated from the width and the pictures ratio.
  • save_colorbar —  boolean specifying wether separate files for the colorbar is generated.
  • print_axes —  boolean specifying wether the tikz file shall include drawing commands for axes around the picture. (default=true)
  • print_axes_label —  boolean specifying wether the tikz file shall include drawing commands for labels at the axes. This field is ignored if print_axes is set to false. (default=true)
  • ticks —  integer specifying how many ticks should be added to the axes drawn around the figure. This field is ignored if print_axes or print_axes_label is set to false. (default=5)

Definition at line 18 of file plot_as_tikzfile.m.

function Postprocess.plot_trajectories ( IReducedModel  rmodel,
IDetailedData  detailed_data,
  plot_params,
  mu_set,
  imsavepath,
  plot_name,
  opts 
)

function generating a tikz graphic showing trajectories for certain selected parameters

Parameters
rmodelobject specifying how the reduced simulations can be computed.
detailed_dataobject defining the basis generation algorithm and storage for storing high dimensional data, i.e. dependent on dimension \(H\). This data is necessary for detailed simulations, construction of online matrices, reduced_data and reconstruction of reduced simulations.
plot_paramsa structure coming with a field plot for plotting
mu_seta cell array of parameter vectors for which a trajectory shall be generated.
imsavepatha string specifying the directory name, where the generated files are stored.
plot_namea string naming this plot.
optsoptional settings.
Required fields of plot_params:
  • plot_type —  plot type
  • plot —  plot
Required fields of rmodel:
  • descr.T —  descr.T
  • nt —  nt
  • detailed_model —  detailed model
Required fields of opts:
  • pic_scale —  pic scale
  • field —  field
Required fields of detailed_data:
  • model_data.grid —  model data.grid
  • model_data —  model data
Optional fields of opts:
  • timeinstants —  time instants to include into trajectory. Default is [ 0, 1/3, 2/3, 1 ] * model.T
  • width —  width of single snapshot. Default is 5cm;
  • subline_coord —  coordinate at which a subline plot shall be created
  • subline_dir —  either x or y specifying the direction of the subline plot.
  • sim_type —  simulation type (either reduced or detailed)

Definition at line 18 of file plot_trajectories.m.