Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scatter should not display hist or density if n points is low #381

Open
ecomodeller opened this issue Jan 5, 2024 · 1 comment
Open

Comments

@ecomodeller
Copy link
Member

The calculation of density in each bin fails if the number of samples is too low.

@jsmariegaard
Copy link
Member

Will give strange errors like this:


ValueError Traceback (most recent call last)
File c:\Users\jem\AppData\Local\mambaforge\lib\site-packages\matplotlib\pyplot.py:197, in _draw_all_if_interactive()
195 def _draw_all_if_interactive() -> None:
196 if matplotlib.is_interactive():
--> 197 draw_all()

File c:\Users\jem\AppData\Local\mambaforge\lib\site-packages\matplotlib_pylab_helpers.py:132, in Gcf.draw_all(cls, force)
130 for manager in cls.get_all_fig_managers():
131 if force or manager.canvas.figure.stale:
--> 132 manager.canvas.draw_idle()

File c:\Users\jem\AppData\Local\mambaforge\lib\site-packages\matplotlib\backend_bases.py:1893, in FigureCanvasBase.draw_idle(self, *args, **kwargs)
1891 if not self._is_idle_drawing:
1892 with self._idle_draw_cntx():
-> 1893 self.draw(*args, **kwargs)

File c:\Users\jem\AppData\Local\mambaforge\lib\site-packages\matplotlib\backends\backend_agg.py:388, in FigureCanvasAgg.draw(self)
385 # Acquire a lock on the shared font cache.
386 with (self.toolbar._wait_cursor_for_draw_cm() if self.toolbar
387 else nullcontext()):
--> 388 self.figure.draw(self.renderer)
389 # A GUI class may be need to update a window using this draw, so
390 # don't forget to call the superclass.
391 super().draw()
...
-> 1959 raise ValueError("minvalue must be less than or equal to maxvalue")
1960 elif vmin == vmax:
1961 result.fill(0)

ValueError: minvalue must be less than or equal to maxvalue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants