Skip to main content

Plotting from the command line

Project description

Built Status Documentation Status Coveralls PyPI-Server

shellplot

“We should have never left the command line.”

Shellplot is the plotting package that you didn’t know you needed. Plotting, straight outta the command line.

Please take a look at the documentation, which contains many examples.

Installation

$ pip install shellplot

Quickstart

Shellplot loosely replicates the matplotlib API, offering both a figure and functional api. It currently supports scatter, line, histogram, bar and boxplots, with many options to customize the figure. It’s as easy as:

>>> import shellplot as plt
>>> df = plt.load_dataset("penguins")
>>> plt.plot(df["bill_length_mm"], df["flipper_length_mm"], color=df["species"])
flipper_length_mm
 232┤                                    o oo  oo    o o        o
    |                                     oo o  o       o
    |                                      oooo
    |                            o oooo ooo oo   o
    |                        oo oooo oo o o o o    o
 217┤                       o o oo ooooo ooo o
    |                   o   o o ooooo o o*oo
    |                     o oo + oooo oooo   *  *
    |                   +   oooo o       o      *       *
    |                   ++              o *  **   **
 202┤        +           +    *             ** **    *
    |      +    ++++   +  +      *    **   ****
    |        ++    +++ +++ +++ +  ** **   ***** **
    |     +++  ++++   ++ ++  +    *+**     * ***
    |   +  + ++++++++++ ++++     *+***  *   *
 187┤+    + + ++ +++++++*+ * *    **           *
    |    ++  ++++++ + +++            *
    |          + ++ +  + + *                                 *
    |  +        ++   +             *                              + Adelie
    |            +     +                                          * Chinstrap
 172┤             +                                               o Gentoo
    └┬----------┬---------┬----------┬----------┬----------┬------
     32         37        42         47         52         57
                            bill_length_mm

Shellplot also provides a convenient integration with pandas. Simply set the pandas plotting backend to shellplot:

>>> import pandas as pd
>>> pd.set_option("plotting.backend", "shellplot")

Please refer to pandas visualisation page for further details.

Note

This project has been set up using PyScaffold 3.2.3. For details and usage information on PyScaffold see https://pyscaffold.org/.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shellplot-0.2.0.tar.gz (41.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page