annotate +parametrization/place_label.m @ 1037:2d7ba44340d0 feature/burgers1d

Pass scheme specific parameters as cell array. This will enabale constructDiffOps to be more general. In addition, allow for schemes returning function handles as diffOps, which is currently how non-linear schemes such as Burgers1d are implemented.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Fri, 18 Jan 2019 09:02:02 +0100
parents 0e198af1184b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
358
5cb99f56f55e Added some utility functions. Improved some documentation.
Jonatan Werpers <jonatan@werpers.com>
parents: 0
diff changeset
1 % 'left' | 'center' | 'right'
5cb99f56f55e Added some utility functions. Improved some documentation.
Jonatan Werpers <jonatan@werpers.com>
parents: 0
diff changeset
2 % 'baseline' | 'top' | 'cap' | 'middle' | 'bottom'
0
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
3 function place_label(pt,str,horzAl,vertAl)
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
4 default_arg('horzAl','center');
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
5 default_arg('vertAl', 'middle');
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
6
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
7 x = pt(1);
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
8 y = pt(2);
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
9 h = text(x,y,str);
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
10 h.HorizontalAlignment = horzAl;
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
11 h.VerticalAlignment = vertAl;
48b6fb693025 Initial commit.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff changeset
12 end