13.2.9. plot_fiber_section (ops_vis)ΒΆ

ops_vis.plot_fiber_section(fib_sec_list, fillflag=1, matcolor=['y', 'b', 'r', 'g', 'm', 'k'])[source]

Plot fiber cross-section.

Parameters:
  • fib_sec_list (list) – list of lists in the format similar to the parameters for the section, layer, patch, fiber OpenSees commands
  • fillflag (int) – 1 - filled fibers with color specified in matcolor list, 0 - no color, only the outline of fibers
  • matcolor (list) – sequence of colors for various material tags assigned to fibers

Examples

fib_sec_1 = [['section', 'Fiber', 1, '-GJ', 1.0e6],
             ['patch', 'quad', 1, 4, 1,  0.032, 0.317, -0.311, 0.067, -0.266, 0.005, 0.077, 0.254],  # noqa: E501
             ['patch', 'quad', 1, 1, 4,  -0.075, 0.144, -0.114, 0.116, 0.075, -0.144, 0.114, -0.116],  # noqa: E501
             ['patch', 'quad', 1, 4, 1,  0.266, -0.005,  -0.077, -0.254,  -0.032, -0.317,  0.311, -0.067]  # noqa: E501
             ]
opsv.fib_sec_list_to_cmds(fib_sec_1)
matcolor = ['r', 'lightgrey', 'gold', 'w', 'w', 'w']
opsv.plot_fiber_section(fib_sec_1, matcolor=matcolor)
plt.axis('equal')
# plt.savefig('fibsec_rc.png')
plt.show()

Notes

fib_sec_list can be reused by means of a python helper function
ops_vis.fib_sec_list_to_cmds(fib_sec_list_1)

See also

ops_vis.fib_sec_list_to_cmds()

See example Plot steel and reinforced concrete fiber sections (ops_vis)