rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
ldg_plot.m
1 function p = ldg_plot(dofs,grid,params)
2 %function p = ldg_plot(dofs,grid,params)
3 %
4 % function plotting a single scalar ldg function on triangular grid
5 % A patch plot is performed as default using speified number of
6 % subsamplings of the triangles. Each patch is plotted linearly
7 % interpolated (hence only showing true values in subsampling nodes.)
8 % On each triangle-edge, subsamp_level points are inserted.
9 %
10 % p is the list of handles to the graphics primitives
11 %
12 % grid must provide the fields
13 % X,Y,VI,CX,CY,nelements,nvertices and nneigh;
14 %
15 % params must specify the ldg-type: params.dimrange, params.pdeg
16 %
17 % optional fields of params:
18 % shrink_factor : if this flag is given, the elements are plotted shrinked
19 % axis_equal : if this flag is set, set axis to equal scale
20 % no_lines : if this flag is set, no lines are drawn
21 % show_colorbar : if this flag is set, a colorbar is drawn (default 1)
22 % colorbar_location : string specifying the position of the
23 % colorbar, e.g. 'South','EastOutside' (default), etc.
24 % clim : if this 2-vector is set, the colorbar is set to
25 % these values
26 
27 % Bernard Haasdonk 2.2.2009
28 
29  if nargin<3
30  params = [];
31  end;
32 
33  if isnumeric(dofs)
34  df = ldgdiscfunc(dofs,params);
35  else
36  df = dofs;
37  end;
38  df.grid = grid;
39  p=plot_discfunc(df,params);
40 
an ldg shape functions implementation
Definition: ldgdiscfunc.m:17