pyplot-fortran icon indicating copy to clipboard operation
pyplot-fortran copied to clipboard

ValueError: 'xerr' must not contain negative values

Open ettaka opened this issue 1 year ago • 1 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

ettaka avatar Feb 05 '24 09:02 ettaka

same erorr,but "yerr"

WiteRon avatar Mar 08 '24 13:03 WiteRon

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

jacobwilliams avatar Mar 27 '24 18:03 jacobwilliams