trnsystor.linkstyle.LinkStyle¶
-
class
trnsystor.linkstyle.
LinkStyle
(u, v, loc, color='black', linestyle='-', linewidth=None, path=None, autopath=True)[source]¶ LinkStyle class.
Initialize class.
- Parameters
u (Component) – from Model.
v (Component) – to Model.
loc (str or tuple) – loc (str): The location of the anchor. The strings ‘top-left’, ‘top-right’, ‘bottom-left’, ‘bottom-right’ place the anchor point at the corresponding corner of the
TrnsysModel
. The strings ‘top-center’, ‘center-right’, ‘bottom-center’, ‘center-left’ place the anchor point at the edge of the correspondingTrnsysModel
. The string ‘best’ places the anchor point at the location, among the eight locations defined so far, with the shortest distance with the destinationTrnsysModel
(other). The location can also be a 2-tuple giving the coordinates of the originTrnsysModel
and the destinationTrnsysModel
.color (str or tuple) – The color of the line. Accepts any matplotlib color. You can specify colors in many ways, including full names (‘green’), hex strings (‘#008000’), RGB or RGBA tuples ((0,1,0,1)) or grayscale intensities as a string (‘0.8’).
linestyle (str) – Possible values: ‘-‘ or ‘solid’, ‘–’ or ‘dashed’, ‘-.’ or ‘dashdot’, ‘:’ or ‘dotted’, ‘-.’ or ‘dashdotdot’.
linewidth (float) – The link line width in points.
path (LineString or MultiLineString) – The path the link should follow.
autopath (bool) – If True, find best path.
-
property
path
¶ Return the path of self.
-
property
anchor_ids
¶ Return studio anchor ids.
-
set_linestyle
(ls)[source]¶ Set the linestyle of the line.
- Parameters
ls (str) – Possible values: ‘-‘ or ‘solid’, ‘–’ or ‘dashed’, ‘-.’ or ‘dashdot’, ‘:’ or ‘dotted’, ‘-.’ or ‘dashdotdot’.