Skip to content

About

UnicodePlots.jl but in python

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

UnicodePlots-py

Unicode plotting library designed for use in python.

Warning

Library is not in development.

Supported backends

  • python

Support for other backends will come very late

  • numpy
  • pytorch
  • tinygrad

Inference

Lineplot examples

Example 1 – basic line plot

Lineplot([-1, 2, 3, 7], [-1, 2, 9, 4]).plot()

Lineplot

Example 2 – sine and cosine series

x_vals = [x / 100 for x in range(-310, 620)]
Lineplot(x=x_vals, y=[math.sin, math.cos]).plot()

SinCos

Example 3 – scatter cloud

seed(42)
x = [uniform(-5, 5) for _ in range(100)]
y = [uniform(-5, 5) for _ in range(100)]

Lineplot(x, y).plot()

Scatter

Example 4 – multi-series scatter with markers

seed(42)
x = [uniform(-5, 5) for _ in range(100)]
y = [uniform(-5, 5) for _ in range(100)]
x1 = [uniform(-5, 5) for _ in range(100)]
y1 = [uniform(-5, 5) for _ in range(100)]

plot = Lineplot(
    x=[x, x1],
    y=[y, y1],
)

plot.plot(scatter=True,marker=["*", "x"])

Scatter2

imageplot (Imageplot)

If your terminal supports the kitty graphics protocol, you may need to set the environment variable ASCII=1

Imageplot("media/monarch.png").render()

Imageplot

It also support kitty image protocol

ImageKitty

To come

stairs (Staircase Plot)
barplot (Bar Plot - horizontal)
histogram (Histogram - horizontal / vertical)
boxplot (Box Plot - horizontal)
densityplot (Density Plot)
contourplot (Contour Plot)
heatmap (Heatmap Plot) \

Documentation

TODO

Installation

uv pip install git+https://github.com/GalaxAI/unicodeplot-py.git

Inspired by UnicodePlots.jl

License

This code is free to use under the terms of the MIT license.

About

UnicodePlots.jl but in python

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages