Scatter should not display hist or density if n points is low
The calculation of density in each bin fails if the number of samples is too low.
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
Closed by #397