Nodes_color_tag and Nodes_color Options#
Using these options, user becomes able to change color of nodes. Nodes_color_tag is list of Nodes tag that user wants to assign a different color to them. Nodes_color is list of colors of corresponding nodes tag defined in Nodes_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 (Using :ref:`sizing options <plotmodelnodesizepy>` for better plot size of nodes increased)
bz.PlotModel(plotmode=1, Nodes_color_tag=[i for i in range(1,11)], Nodes_color=[colors[i] for i in range(1,11)], Nodes_Size_tag=[i for i in range(1,11)], Nodes_Size=[15 for i in range(1,11)])
Tip
To assign one color to all nodes, do not fill Nodes_color_tag with anything and abandon it, then set Nodes_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, Nodes_color='red')
Note
It is obvious that length of Nodes_color_tag and Nodes_color should be same, otherwise an error message will be appear and color of nodes won’t change.
Note
To get familiar with methods of defining colors, check This Page.