Skip to content

ggtitle should accept keyword arguments #804

@krassowski

Description

@krassowski

Calling:

ggtitle(title='something')

Raises:

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

This was introduced recently by 0b147f0

plotnine/plotnine/labels.py

Lines 139 to 150 in a3d893f

class ggtitle(labs):
"""
Create plot title
Parameters
----------
title :
Plot title
"""
def __init__(self, title: str, /):
self.title = title

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')

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions