uniplot


Nameuniplot JSON
Version 0.16.2 PyPI version JSON
download
home_pagehttps://github.com/olavolav/uniplot
SummaryLightweight plotting to the terminal. 4x resolution via Unicode.
upload_time2024-12-18 08:02:18
maintainerNone
docs_urlNone
authorOlav Stetter
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Uniplot
[![Build Status](https://github.com/olavolav/uniplot/workflows/Unit%20Tests/badge.svg)](https://github.com/olavolav/uniplot/actions?query=workflow%3A"Unit+Tests")
[![PyPI Version](https://badge.fury.io/py/uniplot.svg)](https://pypi.org/project/uniplot/)
[![PyPI Downloads](https://pepy.tech/badge/uniplot)](https://pepy.tech/project/uniplot)

Lightweight plotting to the terminal. 4x resolution via Unicode.

![uniplot demo GIF](https://github.com/olavolav/uniplot/raw/master/resource/uniplot-demo.gif)

When working with production data science code it can be handy to have plotting
tool that does not rely on graphics dependencies or works only in a Jupyter
notebook.

The **use case** that this was built for is to have plots as part of your data
science / machine learning CI/CD pipeline - that way whenever something goes
wrong, you get not only the error and backtrace but also plots that show what
the problem was.


## Features

* Unicode drawing, so 4x the resolution (pixels) of usual ASCII plots
* Super simple API
* Interactive mode (pass `interactive=True`)
* Color mode (pass `color=True`) useful in particular when plotting multiple series
* It's fast: Plotting 1M data points takes 100ms thanks to NumPy magic
* Only one dependency: NumPy (but you have that anyway don't you)

Please note that Unicode drawing will work correctly only when using a font
that fully supports the [Block Elements character
set](https://en.wikipedia.org/wiki/Box-drawing_character) or the [Braille
character set](https://en.wikipedia.org/wiki/Braille_Patterns). Please refer to
[this page for a (incomplete) list of supported
fonts](https://www.fileformat.info/info/unicode/block/block_elements/fontsupport.htm)
and the options below to select the character set.


## Simple example


```python
import math
x = [math.sin(i/20)+i/300 for i in range(600)]
from uniplot import plot
plot(x, title="Sine wave")
```

Result:
```
                          Sine wave
┌────────────────────────────────────────────────────────────┐
│                                                    ▟▀▚     │
│                                                   ▗▘ ▝▌    │
│                                       ▗▛▜▖        ▞   ▐    │
│                                       ▞  ▜       ▗▌    ▌   │ 2
│                           ▟▀▙        ▗▘  ▝▌      ▐     ▜   │
│                          ▐▘ ▝▖       ▞    ▜      ▌     ▝▌  │
│              ▗▛▜▖        ▛   ▜      ▗▌    ▝▌    ▐▘      ▜  │
│              ▛  ▙       ▗▘   ▝▖     ▐      ▚    ▞       ▝▌ │
│  ▟▀▖        ▐▘  ▝▖      ▟     ▚     ▌      ▝▖  ▗▌        ▜▄│ 1
│ ▐▘ ▐▖       ▛    ▙      ▌     ▐▖   ▗▘       ▚  ▞           │
│ ▛   ▙      ▗▘    ▐▖    ▐       ▙   ▞        ▝▙▟▘           │
│▐▘   ▐▖     ▐      ▌    ▛       ▐▖ ▗▘                       │
│▞     ▌     ▌      ▐   ▗▘        ▜▄▛                        │
│▌─────▐────▐▘───────▙──▞────────────────────────────────────│ 0
│       ▌   ▛        ▝▙▟▘                                    │
│       ▜  ▐▘                                                │
│        ▙▄▛                                                 │
└────────────────────────────────────────────────────────────┘
         100       200       300       400       500       600
```

For more examples, please see the `examples/` folder.


## Parameters

The `plot` function accepts a number of parameters, all listed below. Note that
only `ys` is required, all others are optional.

There is also a `plot_to_string` function with the same signature, if you want
the result as a list of strings, to include the output elsewhere. The only
difference is that `plot_to_string` does not support interactive mode.


### Data

* `xs` - The x coordinates of the points to plot. Can either be `None`, or a
  list or NumPy array for plotting a single series, or a list of those for
  plotting multiple series. Defaults to `None`, meaning that the x axis will be
  just the sample index of `ys`.
* `ys` - The y coordinates of the points to plot. Can either be a list or NumPy
  array for plotting a single series, or a list of those for plotting multiple
  series.

In both cases, NaN values are ignored.

Note that since v0.12.0 you can also pass a list or an NumPy array of
timestamps, and the axis labels should be formatted correctly. Limitations see
below.


### Options

In alphabetical order:

#### Basic options

* `color` - Draw series in color. Defaults to `False` when plotting a single
  series, and to `True` when plotting multiple. Also accepts a list of strings,
  to modify the default order of
  `["blue", "magenta", "green", "yellow", "cyan", "red"]`.
* `height` - The height of the plotting region, in characters. Default is `17`.
* `interactive` - Enable interactive mode. Defaults to `False`.
* `legend_labels` - Labels for the series. Can be `None` or a list of strings.
  Defaults to `None`.
* `lines` - Enable lines between points. Can either be `True` or `False`, or a
  list of Boolean values for plotting multiple series. Defaults to `False`.
* `title` - The title of the plot. Defaults to `None`.
* `width` - The width of the plotting region, in characters. Default is `60`.
  Note that if the `line_length_hard_cap` option (see "Advanced options" below)
  is used and there is not enough space, the actual width may be smaller.
* `x_max` - Maximum x value of the view. Defaults to a value that shows all
  data points.
* `x_min` - Minimum x value of the view. Defaults to a value that shows all
  data points.
* `x_unit` - Unit of the x axis. This is a string that is appended to the axis
  labels. Defaults to `""`.
* `y_max` - Maximum y value of the view. Defaults to a value that shows all
  data points.
* `y_min` - Minimum y value of the view. Defaults to a value that shows all
  data points.
* `y_unit` - Unit of the y axis. This is a string that is appended to the axis
  labels. Defaults to `""`.

#### Advanced options

* `character_set` - Which Unicode character set to use. Use `"block"` for
  the [Block Elements character
  set](https://en.wikipedia.org/wiki/Block_Elements) with 4x resolution, or
  `"braille"` for the [Braille character
  set](https://en.wikipedia.org/wiki/Braille_Patterns) with 8x resolution.
  The latter has a lighter look overall. Defaults to `"block"`.
* `force_ascii` - Force ASCII characters for plotting only. This can be useful
  for compatibility, for example when using uniplot inside of CI/CD systems
  that do not support Unicode. Defaults to `False`.
* `force_ascii_characters` -  List of characters to use when plotting in
  `force_ascii` mode. Default to `["+", "x", "o", "*", "~", "."]`.
* `line_length_hard_cap` - Enforce a hard limit on the number of characters per
  line of the plot area. This may override the `width` option if there is not
  enough space. Defaults to `None`.
* `x_as_log` - Plot the x axis as logarithmic scale. Defaults to `False`.
* `x_gridlines` - A list of x values that have a vertical line for better
  orientation. Defaults to `[0]`, or to `[]` if `x_as_log` is enabled.
* `y_as_log` - Plot the y axis as logarithmic scale. Defaults to `False`.
* `y_gridlines` - A list of y values that have a horizontal line for better
  orientation. Defaults to `[0]`, or to `[]` if `y_as_log` is enabled.


### Changing default parameters

uniplot does not store a state of the configuration parameters. However, you
can define a new plot funtion with new defaults by defining a `partial`. See
the following example:

```python
from functools import partial
from uniplot import plot as default_plot
plot = partial(default_plot, height=25, width=80)
```

This defines a new `plot` function that is identical to the original, except
the default values for `width` and `height` are now different.


## Experimental features

### Plotting histograms

For convenience there is also a `histogram` function that accepts one or more
series and plots bar-chart like histograms. It will automatically discretize
the series into a number of bins given by the `bins` option and display the
result.

Additional options, in alphabetical order:

* `bins` - Number of bins to use. Defaults to `20`.
* `bins_min` - Lower limit of the first bin. Defaults to the minimum of the
  series.
* `bins_max` - Upper limit of the last bin. Defaults to the maximum of the
  series.

When calling the `histogram` function, the `lines` option is `True` by default.

Example:

```python
import numpy as np
x = np.sin(np.linspace(1, 1000))
from uniplot import histogram
histogram(x)
```

Result:
```
┌────────────────────────────────────────────────────────────┐
│   ▛▀▀▌                       │                   ▐▀▀▜      │ 5
│   ▌  ▌                       │                   ▐  ▐      │
│   ▌  ▌                       │                   ▐  ▐      │
│   ▌  ▀▀▀▌                    │                ▐▀▀▀  ▝▀▀▜   │
│   ▌     ▌                    │                ▐        ▐   │
│   ▌     ▌                    │                ▐        ▐   │
│   ▌     ▙▄▄▄▄▄▖              │          ▗▄▄▄  ▐        ▐   │
│   ▌           ▌              │          ▐  ▐  ▐        ▐   │
│   ▌           ▌              │          ▐  ▐  ▐        ▐   │
│   ▌           ▌              │          ▐  ▐  ▐        ▐   │
│   ▌           ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▜  ▐▀▀▀  ▝▀▀▀        ▐   │
│   ▌                          │    ▐  ▐                 ▐   │
│   ▌                          │    ▐  ▐                 ▐   │
│   ▌                          │    ▐▄▄▟                 ▐   │
│   ▌                          │                         ▐   │
│   ▌                          │                         ▐   │
│▄▄▄▌▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁│▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▐▄▄▄│ 0
└────────────────────────────────────────────────────────────┘
     -1                        0                       1
```

### Plotting time series

There is inital support for using timestamps for the axis labels. It should
work with most formats.

Missing so far are nicer axis labels for time stamps, as well as timezone
support.

Example:

```python
import numpy as np
dates =  np.arange('2024-02-17T12:10', 4*60, 60, dtype='M8[m]')
from uniplot import plot
plot(xs=dates, ys=[1,2,3,2])
```

Result:
```
┌────────────────────────────────────────────────────────────┐
│                                       ▝                    │ 3
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│                    ▘                                      ▝│ 2
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│                                                            │
│▖                                                           │ 1
└────────────────────────────────────────────────────────────┘
               13:00               14:00               15:00
```


## Installation

Install via pip using:

```sh
pip install uniplot
```


## Contributing

Clone this repository, and install dependecies via `poetry install`.

You can run the tests via `poetry run ./run_tests` to make sure your setup is
good. Then proceed with issues, PRs etc. the usual way.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/olavolav/uniplot",
    "name": "uniplot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Olav Stetter",
    "author_email": "olav.stetter@googlemail.com",
    "download_url": "https://files.pythonhosted.org/packages/61/3f/016f2eabca0fef982c3dac2be9b7626ebf7971ea735fdcfcb13537c875a5/uniplot-0.16.2.tar.gz",
    "platform": null,
    "description": "# Uniplot\n[![Build Status](https://github.com/olavolav/uniplot/workflows/Unit%20Tests/badge.svg)](https://github.com/olavolav/uniplot/actions?query=workflow%3A\"Unit+Tests\")\n[![PyPI Version](https://badge.fury.io/py/uniplot.svg)](https://pypi.org/project/uniplot/)\n[![PyPI Downloads](https://pepy.tech/badge/uniplot)](https://pepy.tech/project/uniplot)\n\nLightweight plotting to the terminal. 4x resolution via Unicode.\n\n![uniplot demo GIF](https://github.com/olavolav/uniplot/raw/master/resource/uniplot-demo.gif)\n\nWhen working with production data science code it can be handy to have plotting\ntool that does not rely on graphics dependencies or works only in a Jupyter\nnotebook.\n\nThe **use case** that this was built for is to have plots as part of your data\nscience / machine learning CI/CD pipeline - that way whenever something goes\nwrong, you get not only the error and backtrace but also plots that show what\nthe problem was.\n\n\n## Features\n\n* Unicode drawing, so 4x the resolution (pixels) of usual ASCII plots\n* Super simple API\n* Interactive mode (pass `interactive=True`)\n* Color mode (pass `color=True`) useful in particular when plotting multiple series\n* It's fast: Plotting 1M data points takes 100ms thanks to NumPy magic\n* Only one dependency: NumPy (but you have that anyway don't you)\n\nPlease note that Unicode drawing will work correctly only when using a font\nthat fully supports the [Block Elements character\nset](https://en.wikipedia.org/wiki/Box-drawing_character) or the [Braille\ncharacter set](https://en.wikipedia.org/wiki/Braille_Patterns). Please refer to\n[this page for a (incomplete) list of supported\nfonts](https://www.fileformat.info/info/unicode/block/block_elements/fontsupport.htm)\nand the options below to select the character set.\n\n\n## Simple example\n\n\n```python\nimport math\nx = [math.sin(i/20)+i/300 for i in range(600)]\nfrom uniplot import plot\nplot(x, title=\"Sine wave\")\n```\n\nResult:\n```\n                          Sine wave\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                                                    \u259f\u2580\u259a     \u2502\n\u2502                                                   \u2597\u2598 \u259d\u258c    \u2502\n\u2502                                       \u2597\u259b\u259c\u2596        \u259e   \u2590    \u2502\n\u2502                                       \u259e  \u259c       \u2597\u258c    \u258c   \u2502 2\n\u2502                           \u259f\u2580\u2599        \u2597\u2598  \u259d\u258c      \u2590     \u259c   \u2502\n\u2502                          \u2590\u2598 \u259d\u2596       \u259e    \u259c      \u258c     \u259d\u258c  \u2502\n\u2502              \u2597\u259b\u259c\u2596        \u259b   \u259c      \u2597\u258c    \u259d\u258c    \u2590\u2598      \u259c  \u2502\n\u2502              \u259b  \u2599       \u2597\u2598   \u259d\u2596     \u2590      \u259a    \u259e       \u259d\u258c \u2502\n\u2502  \u259f\u2580\u2596        \u2590\u2598  \u259d\u2596      \u259f     \u259a     \u258c      \u259d\u2596  \u2597\u258c        \u259c\u2584\u2502 1\n\u2502 \u2590\u2598 \u2590\u2596       \u259b    \u2599      \u258c     \u2590\u2596   \u2597\u2598       \u259a  \u259e           \u2502\n\u2502 \u259b   \u2599      \u2597\u2598    \u2590\u2596    \u2590       \u2599   \u259e        \u259d\u2599\u259f\u2598           \u2502\n\u2502\u2590\u2598   \u2590\u2596     \u2590      \u258c    \u259b       \u2590\u2596 \u2597\u2598                       \u2502\n\u2502\u259e     \u258c     \u258c      \u2590   \u2597\u2598        \u259c\u2584\u259b                        \u2502\n\u2502\u258c\u2500\u2500\u2500\u2500\u2500\u2590\u2500\u2500\u2500\u2500\u2590\u2598\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2599\u2500\u2500\u259e\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2502 0\n\u2502       \u258c   \u259b        \u259d\u2599\u259f\u2598                                    \u2502\n\u2502       \u259c  \u2590\u2598                                                \u2502\n\u2502        \u2599\u2584\u259b                                                 \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n         100       200       300       400       500       600\n```\n\nFor more examples, please see the `examples/` folder.\n\n\n## Parameters\n\nThe `plot` function accepts a number of parameters, all listed below. Note that\nonly `ys` is required, all others are optional.\n\nThere is also a `plot_to_string` function with the same signature, if you want\nthe result as a list of strings, to include the output elsewhere. The only\ndifference is that `plot_to_string` does not support interactive mode.\n\n\n### Data\n\n* `xs` - The x coordinates of the points to plot. Can either be `None`, or a\n  list or NumPy array for plotting a single series, or a list of those for\n  plotting multiple series. Defaults to `None`, meaning that the x axis will be\n  just the sample index of `ys`.\n* `ys` - The y coordinates of the points to plot. Can either be a list or NumPy\n  array for plotting a single series, or a list of those for plotting multiple\n  series.\n\nIn both cases, NaN values are ignored.\n\nNote that since v0.12.0 you can also pass a list or an NumPy array of\ntimestamps, and the axis labels should be formatted correctly. Limitations see\nbelow.\n\n\n### Options\n\nIn alphabetical order:\n\n#### Basic options\n\n* `color` - Draw series in color. Defaults to `False` when plotting a single\n  series, and to `True` when plotting multiple. Also accepts a list of strings,\n  to modify the default order of\n  `[\"blue\", \"magenta\", \"green\", \"yellow\", \"cyan\", \"red\"]`.\n* `height` - The height of the plotting region, in characters. Default is `17`.\n* `interactive` - Enable interactive mode. Defaults to `False`.\n* `legend_labels` - Labels for the series. Can be `None` or a list of strings.\n  Defaults to `None`.\n* `lines` - Enable lines between points. Can either be `True` or `False`, or a\n  list of Boolean values for plotting multiple series. Defaults to `False`.\n* `title` - The title of the plot. Defaults to `None`.\n* `width` - The width of the plotting region, in characters. Default is `60`.\n  Note that if the `line_length_hard_cap` option (see \"Advanced options\" below)\n  is used and there is not enough space, the actual width may be smaller.\n* `x_max` - Maximum x value of the view. Defaults to a value that shows all\n  data points.\n* `x_min` - Minimum x value of the view. Defaults to a value that shows all\n  data points.\n* `x_unit` - Unit of the x axis. This is a string that is appended to the axis\n  labels. Defaults to `\"\"`.\n* `y_max` - Maximum y value of the view. Defaults to a value that shows all\n  data points.\n* `y_min` - Minimum y value of the view. Defaults to a value that shows all\n  data points.\n* `y_unit` - Unit of the y axis. This is a string that is appended to the axis\n  labels. Defaults to `\"\"`.\n\n#### Advanced options\n\n* `character_set` - Which Unicode character set to use. Use `\"block\"` for\n  the [Block Elements character\n  set](https://en.wikipedia.org/wiki/Block_Elements) with 4x resolution, or\n  `\"braille\"` for the [Braille character\n  set](https://en.wikipedia.org/wiki/Braille_Patterns) with 8x resolution.\n  The latter has a lighter look overall. Defaults to `\"block\"`.\n* `force_ascii` - Force ASCII characters for plotting only. This can be useful\n  for compatibility, for example when using uniplot inside of CI/CD systems\n  that do not support Unicode. Defaults to `False`.\n* `force_ascii_characters` -  List of characters to use when plotting in\n  `force_ascii` mode. Default to `[\"+\", \"x\", \"o\", \"*\", \"~\", \".\"]`.\n* `line_length_hard_cap` - Enforce a hard limit on the number of characters per\n  line of the plot area. This may override the `width` option if there is not\n  enough space. Defaults to `None`.\n* `x_as_log` - Plot the x axis as logarithmic scale. Defaults to `False`.\n* `x_gridlines` - A list of x values that have a vertical line for better\n  orientation. Defaults to `[0]`, or to `[]` if `x_as_log` is enabled.\n* `y_as_log` - Plot the y axis as logarithmic scale. Defaults to `False`.\n* `y_gridlines` - A list of y values that have a horizontal line for better\n  orientation. Defaults to `[0]`, or to `[]` if `y_as_log` is enabled.\n\n\n### Changing default parameters\n\nuniplot does not store a state of the configuration parameters. However, you\ncan define a new plot funtion with new defaults by defining a `partial`. See\nthe following example:\n\n```python\nfrom functools import partial\nfrom uniplot import plot as default_plot\nplot = partial(default_plot, height=25, width=80)\n```\n\nThis defines a new `plot` function that is identical to the original, except\nthe default values for `width` and `height` are now different.\n\n\n## Experimental features\n\n### Plotting histograms\n\nFor convenience there is also a `histogram` function that accepts one or more\nseries and plots bar-chart like histograms. It will automatically discretize\nthe series into a number of bins given by the `bins` option and display the\nresult.\n\nAdditional options, in alphabetical order:\n\n* `bins` - Number of bins to use. Defaults to `20`.\n* `bins_min` - Lower limit of the first bin. Defaults to the minimum of the\n  series.\n* `bins_max` - Upper limit of the last bin. Defaults to the maximum of the\n  series.\n\nWhen calling the `histogram` function, the `lines` option is `True` by default.\n\nExample:\n\n```python\nimport numpy as np\nx = np.sin(np.linspace(1, 1000))\nfrom uniplot import histogram\nhistogram(x)\n```\n\nResult:\n```\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502   \u259b\u2580\u2580\u258c                       \u2502                   \u2590\u2580\u2580\u259c      \u2502 5\n\u2502   \u258c  \u258c                       \u2502                   \u2590  \u2590      \u2502\n\u2502   \u258c  \u258c                       \u2502                   \u2590  \u2590      \u2502\n\u2502   \u258c  \u2580\u2580\u2580\u258c                    \u2502                \u2590\u2580\u2580\u2580  \u259d\u2580\u2580\u259c   \u2502\n\u2502   \u258c     \u258c                    \u2502                \u2590        \u2590   \u2502\n\u2502   \u258c     \u258c                    \u2502                \u2590        \u2590   \u2502\n\u2502   \u258c     \u2599\u2584\u2584\u2584\u2584\u2584\u2596              \u2502          \u2597\u2584\u2584\u2584  \u2590        \u2590   \u2502\n\u2502   \u258c           \u258c              \u2502          \u2590  \u2590  \u2590        \u2590   \u2502\n\u2502   \u258c           \u258c              \u2502          \u2590  \u2590  \u2590        \u2590   \u2502\n\u2502   \u258c           \u258c              \u2502          \u2590  \u2590  \u2590        \u2590   \u2502\n\u2502   \u258c           \u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u2580\u259c  \u2590\u2580\u2580\u2580  \u259d\u2580\u2580\u2580        \u2590   \u2502\n\u2502   \u258c                          \u2502    \u2590  \u2590                 \u2590   \u2502\n\u2502   \u258c                          \u2502    \u2590  \u2590                 \u2590   \u2502\n\u2502   \u258c                          \u2502    \u2590\u2584\u2584\u259f                 \u2590   \u2502\n\u2502   \u258c                          \u2502                         \u2590   \u2502\n\u2502   \u258c                          \u2502                         \u2590   \u2502\n\u2502\u2584\u2584\u2584\u258c\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2502\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2581\u2590\u2584\u2584\u2584\u2502 0\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n     -1                        0                       1\n```\n\n### Plotting time series\n\nThere is inital support for using timestamps for the axis labels. It should\nwork with most formats.\n\nMissing so far are nicer axis labels for time stamps, as well as timezone\nsupport.\n\nExample:\n\n```python\nimport numpy as np\ndates =  np.arange('2024-02-17T12:10', 4*60, 60, dtype='M8[m]')\nfrom uniplot import plot\nplot(xs=dates, ys=[1,2,3,2])\n```\n\nResult:\n```\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                                       \u259d                    \u2502 3\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                    \u2598                                      \u259d\u2502 2\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502                                                            \u2502\n\u2502\u2596                                                           \u2502 1\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n               13:00               14:00               15:00\n```\n\n\n## Installation\n\nInstall via pip using:\n\n```sh\npip install uniplot\n```\n\n\n## Contributing\n\nClone this repository, and install dependecies via `poetry install`.\n\nYou can run the tests via `poetry run ./run_tests` to make sure your setup is\ngood. Then proceed with issues, PRs etc. the usual way.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Lightweight plotting to the terminal. 4x resolution via Unicode.",
    "version": "0.16.2",
    "project_urls": {
        "Homepage": "https://github.com/olavolav/uniplot",
        "Repository": "https://github.com/olavolav/uniplot"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b34e11aa686f626cd9009770ac6268593d088c04c6bad8541f2850b419f2d743",
                "md5": "57efe5249370e899f88233530fb966a7",
                "sha256": "3d42653822c3c8176fff806fe2834cd7b6594c2d5dfbad3e62749e9e3fe85665"
            },
            "downloads": -1,
            "filename": "uniplot-0.16.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "57efe5249370e899f88233530fb966a7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 30940,
            "upload_time": "2024-12-18T08:02:16",
            "upload_time_iso_8601": "2024-12-18T08:02:16.531622Z",
            "url": "https://files.pythonhosted.org/packages/b3/4e/11aa686f626cd9009770ac6268593d088c04c6bad8541f2850b419f2d743/uniplot-0.16.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "613f016f2eabca0fef982c3dac2be9b7626ebf7971ea735fdcfcb13537c875a5",
                "md5": "8e3a7a42aac136ca2e8ad12041e3b1fe",
                "sha256": "30f96e12f2f2e675ddd77914c50652803b01144380b6612ba8557dcd446a5db0"
            },
            "downloads": -1,
            "filename": "uniplot-0.16.2.tar.gz",
            "has_sig": false,
            "md5_digest": "8e3a7a42aac136ca2e8ad12041e3b1fe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27408,
            "upload_time": "2024-12-18T08:02:18",
            "upload_time_iso_8601": "2024-12-18T08:02:18.413495Z",
            "url": "https://files.pythonhosted.org/packages/61/3f/016f2eabca0fef982c3dac2be9b7626ebf7971ea735fdcfcb13537c875a5/uniplot-0.16.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 08:02:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "olavolav",
    "github_project": "uniplot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "uniplot"
}
        
Elapsed time: 0.42708s