sewkokot / opsvis

OpenSeesPy postprocessing and plotting module
GNU General Public License v3.0
35 stars 21 forks source link

getting error while plotting rectangular section #49

Closed bahugunaashish closed 7 months ago

bahugunaashish commented 11 months ago

I am getting the following error with the example provided at https://opsvis.readthedocs.io/en/latest/ex_plot_fiber_section.html could anyone help me out?

File ~.conda\envs\py39\lib\site-packages\opsvis\fibsec.py:129 in plot_fiber_section poly = Polygon(zy, True, ec='k', fc=matcolor[matTag-1])

TypeError: init() takes 2 positional arguments but 3 were given

mhscott commented 7 months ago

@sewkokot Looks like True should be replaced with closed=True on line 129 of fibsec.py: https://github.com/sewkokot/opsvis/blob/master/opsvis/fibsec.py#L129

sewkokot commented 7 months ago

@mhscott, @bahugunaashish Thank you for reporting this issue and finding the solution. It seems it matplotlib incompatible changes - in matplotlib v3.6 it worked. It is fixed now in the pip package.