jacobwilliams / pyplot-fortran

For generating plots from Fortran using Python's matplotlib.pyplot πŸ“ˆ

Repository from Github https://github.comjacobwilliams/pyplot-fortranRepository from Github https://github.comjacobwilliams/pyplot-fortran

ValueError: 'xerr' must not contain negative values

ettaka opened this issue Β· comments

Hello!

Thanks for the great project!

I tried to build (compiles) and run tests. I got an error:

➜  pyplot-fortran git:(master) fpm build --profile release
pyplot_module.F90                      done.
libpyplot-fortran.a                    done.
[100%] Project compiled successfully.
➜  pyplot-fortran git:(master) fpm test
pyplot_module.F90                      done.
libpyplot-fortran.a                    done.
test.f90                               done.
color_test.f90                         done.
test                                   done.
color_test                             done.
[100%] Project compiled successfully.
Traceback (most recent call last):
  File "/home/eelis/git/pyplot-fortran/test/errorbar.py", line 22, in <module>
    ax.errorbar(x,y,fmt=".",linewidth=3,markersize=3,label="y",xerr=xerr,yerr=yerr)
  File "/home/eelis/miniconda3/envs/kqcircuits/lib/python3.11/site-packages/matplotlib/__init__.py", line 1465, in inner
    return func(ax, *map(sanitize_sequence, args), **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/eelis/miniconda3/envs/kqcircuits/lib/python3.11/site-packages/matplotlib/axes/_axes.py", line 3674, in error
bar
    raise ValueError(
ValueError: 'xerr' must not contain negative values

same erorr,but "yerr"

Easy fix. Maybe something changed in matplotlib so this is no longer allowed?