pwwang / datar

A Grammar of Data Manipulation in python
https://pwwang.github.io/datar/
MIT License
272 stars 17 forks source link

[ENH] Support for lets-plot #203

Closed qiuwei closed 9 months ago

qiuwei commented 9 months ago

Feature Type

Problem Description

Lets-plot(https://github.com/JetBrains/lets-plot) has very similar API to plotnine, but has the advantage of supporting interactive graphs.

Feature Description

Add support for lets-plot.

Additional Context

No response

pwwang commented 9 months ago

What are you expecting? A syntax like this:

df >> ggplot(...) + ...

?

qiuwei commented 9 months ago

What are you expecting? A syntax like this:

df >> ggplot(...) + ...

?

Yes, just like the support for plotnine.

pwwang commented 9 months ago

It's pretty easy to write one by yourself:

from pandas import DataFrame
from pipda import register_verb
from lets_plot import ggplot as lp_ggplot

@register_verb(DataFrame)
def ggplot(data, *args, **kwargs):
    return lp_ggplot(data, *args, **kwargs)