Element_color_tag and Elements_color Options#
Using these options, user becomes able to change the color of elements. Element_color_tag is list of Elements tag that user wants to assign a different color to them. Elements_color is list of colors of corresponding elements tag defined in Element_color_tag.
Example#
import BraineryWiz as bz
colors=['black', 'blanchedalmond', 'blue', 'blueviolet', 'brown', 'burlywood', 'cadetblue', 'chartreuse', 'chocolate', 'coral', 'cornflowerblue', 'cornsilk', 'crimson',]
# ...
# Create the OpenSees model
# ...
# Call PlotModel command
bz.PlotModel(plotmode=1, Element_color_tag=[i for i in range(1,11)], Elements_color=[colors[i] for i in range(1,11)])
Tip
To assign one color to all elements, do not fill Element_color_tag with anything and abandon it, then set Elements_color equal to the desired color in string (str) format.
import BraineryWiz as bz
# ...
# Create the OpenSees model
# ...
# Call PlotModel command
bz.PlotModel(plotmode=1, Elements_color='red')
Note
It is obvious that length of Element_color_tag and Elements_color should be same, otherwise an error message will be appear and size of nodes won’t change.
Note
To get familiar with methods of defining colors, check This Page.