Consider a possible "methods-based" interface.

Open
#1,047 15 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

Research direction

Start by reviewing the linked codex-fluent-api feature branch and the demo site, then compare its methods-based interface with plotnine's current public API. The issue provides no repository files or tests to target; done would require defining and agreeing on the intended interface and its scope before implementation.

Written by the indexing model from the issue text.

Description

Discussion

I have heard it said that plotnine is "not Pythonic". I explore this claim here and I conclude that perhaps the claim is strongest with the need to either say from plotnine import * (or at least from plotnine import [lots of things]) or make the code ugly with import plotnine as p9 and then p9.ggplot(p9.aes()) + p9.geom() + ....

With the help of Codex, I made a feature branch that provides a more "methods-based" interface on a fork here. The code changes seem quite non-invasive.

I think the "methods-based" code looks quite Pythonic. I also made a demo site here and everything seems to "just work" so far.

Dominant language
Python
Stars
4.8k
Forks
269
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from has2k1/plotnine

All issues in has2k1/plotnine

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.