Vindaar / ggplotnim

A port of ggplot2 for Nim
https://vindaar.github.io/ggplotnim
MIT License
176 stars 15 forks source link

Fix `geom_smooth` for discrete data, raise #130

Closed Vindaar closed 2 years ago

Vindaar commented 2 years ago

If the input data is considered discrete when using geom_smooth we now raise a ValueError to make the user aware.

The other alternative would have been to just treat the input data as continuous for this geom, but leave the rest unchanged. This has the undesired result that it would lead to a certainly unwanted plot (smoothed data is not drawn 'correctly' ontop of a discrete plot).

Also slightly improves the info message about auto determination of discreteness of integer columns to better help users understand what one should do to change the behavior. Based on input by @haxscramper.