Model.titlemodify#
- Model.titlemodify(titlename, itemname, string, value, plot)#
Modifies a title entity.
- Parameters:
titlename (hwString) – The name of the title.
itemname (hwString) –
The name of the item to be modified. The valid options are:
titlecolor - Title color (0-64).
titlefont - Font used to display text (1-4).
titleanchor - Anchor corner of the title.
Valid values are:
0 - lower left
1 - upper left
2 - upper right
3 - lower right
border on - Turns the border on and off.
Valid values are:
0 - turn border off
1 - turn border on
borderwidth - Width of the border.
borderxmin - Minimum x value of the border.
borderxmax - Maximum x value of the border.
borderymin - Minimum y value of the border.
borderymax - Maximum y value of the border.
titletext - Set the title text to string.
string (hwString) – The string value to which the modified item should be set. When
itemname="titletext", the title displays a string.value (double) – The value to which the modified item should be set. Used for all
itemnameoptions, except titletext.plot (int) –
Designates whether the title will be plotted after modification. Valid values are:
0 - Do not plot the title after modification.
1 - Plot the title after modification.
Example#
Change some attributes to title “ Test “#import hm import hm.entities as ent model = hm.Model() model.titlemodify( titlename="Test", itemname="borderon", string="", value=1, plot=0 ) model.titlemodify( titlename="Test", itemname="bordercolor", string="", value=4, plot=0 ) model.titlemodify( titlename="Test", itemname="titletext", string="This is test", value=0, plot=1 ) model.titlemodify( titlename="Test", itemname="titlefont", string="", value=3, plot=1 ) model.titlemodify( titlename="Test", itemname="titleanchor", string="", value=1, plot=1 ) model.titlemodify( titlename="Test", itemname="borderxmin", string="", value=0.469273743, plot=0 ) model.titlemodify( titlename="Test", itemname="borderymin", string="", value=0.120287253, plot=0 )