has2k1 / plotnine

A Grammar of Graphics for Python
https://plotnine.org
MIT License
3.89k stars 209 forks source link

`ggtitle` should accept keyword arguments #804

Closed krassowski closed 2 weeks ago

krassowski commented 3 weeks ago

Calling:

ggtitle(title='something')

Raises:

TypeError: ggtitle.__init__() got some positional-only arguments passed as keyword arguments: 'title'

This was introduced recently by https://github.com/has2k1/plotnine/commit/0b147f09965e602dd50a8f8d7562837ede334f07

https://github.com/has2k1/plotnine/blob/a3d893f7c30e654ea5a249c83c77ea532f23380f/plotnine/labels.py#L139-L150

ylab/xlab also have a similar issue but it is more notable for ggtitle because coming from ggplot I am used to calling ggtitle(title='something', subtitle='something else')