rbmatlab 0.10.01
|
00001 function p = ldg_plot(dofs,grid,params) 00002 %function p = ldg_plot(dofs,grid,params) 00003 % 00004 % function plotting a single scalar ldg function on triangular grid 00005 % A patch plot is performed as default using speified number of 00006 % subsamplings of the triangles. Each patch is plotted linearly 00007 % interpolated (hence only showing true values in subsampling nodes.) 00008 % On each triangle-edge, subsamp_level points are inserted. 00009 % 00010 % p is the list of handles to the graphics primitives 00011 % 00012 % grid must provide the fields 00013 % X,Y,VI,CX,CY,nelements,nvertices and nneigh; 00014 % 00015 % params must specify the ldg-type: params.dimrange, params.pdeg 00016 % 00017 % optional fields of params: 00018 % shrink_factor : if this flag is given, the elements are plotted shrinked 00019 % axis_equal : if this flag is set, set axis to equal scale 00020 % no_lines : if this flag is set, no lines are drawn 00021 % show_colorbar : if this flag is set, a colorbar is drawn (default 1) 00022 % colorbar_location : string specifying the position of the 00023 % colorbar, e.g. 'South','EastOutside' (default), etc. 00024 % clim : if this 2-vector is set, the colorbar is set to 00025 % these values 00026 00027 % Bernard Haasdonk 2.2.2009 00028 00029 if nargin<3 00030 params = []; 00031 end; 00032 00033 if isnumeric(dofs) 00034 df = ldgdiscfunc(dofs,params); 00035 else 00036 df = dofs; 00037 end; 00038 df.grid = grid; 00039 p=plot_discfunc(df,params); 00040