Skip to main content

PyTorch & NumPy Heatmap Visualizer for 1D Vectors and 2D Matrix Tensors

Project description

PyTorch & NumPy TUI Heatmap Visualizer for 1D Vectors and 2D Matrix Tensors

pip install heater-plot
a = torch.rand(40,20)
heater.plot(a, theme='heatmap')

Example Heatmap

b = torch.linspace(0,1, steps=800).view(40,20)
heater.plot(b, theme='heatmap')

Example Heatmap

Themes

Pass any of these as theme=:

Theme Description
heatmap Default purple → pink → orange → yellow
rainbow Full spectrum red → violet
viridis Perceptually uniform purple → green → yellow
plasma Purple → magenta → orange → yellow
magma Black → purple → pink → cream
inferno Black → red → orange → pale yellow
fire Black → red → orange → yellow
ocean Deep blue → cyan → white
forest Dark green → lime → yellow
coolwarm Blue → white → red diverging
grayscale Black → white
heater.plot(a, theme='viridis')
heater.plot(a, theme='ocean')
heater.plot(a, theme='coolwarm')

Reference Charcodes for TUI

##   Code    Result  Description
##   U+2580  ▀       Upper half block
##   U+2581  ▁       Lower one eighth block
##   U+2582  ▂       Lower one quarter block
##   U+2583  ▃       Lower three eighths block
##   U+2584  ▄       Lower half block
##   U+2585  ▅       Lower five eighths block
##   U+2586  ▆       Lower three quarters block
##   U+2587  ▇       Lower seven eighths block
##   U+2588  █       Full block
##   U+2589  ▉       Left seven eighths block
##   U+258A  ▊       Left three quarters block
##   U+258B  ▋       Left five eighths block
##   U+258C  ▌       Left half block
##   U+258D  ▍       Left three eighths block
##   U+258E  ▎       Left one quarter block
##   U+258F  ▏       Left one eighth block
##   U+2590  ▐       Right half block
##   U+2591  ░       Light shade
##   U+2592  ▒       Medium shade
##   U+2593  ▓       Dark shade
#  
#  a = torch.rand(10,10)
#  heater.plot(a) __init__.py
# ▄▄▄▄▄▄▄▄▄▄▄▄
# █    ░▓▒▓█▒█
# █   ░▒▓█▒░ █
# █  ░▒▓█▒░  █
# █ ░▒▓█▒░   █
# ▀▀▀▀▀▀▀▀▀▀▀▀ ▒
# ▀▀▀▀▀▀▀▀▀▒▒▒▒▒▒
# ╭━━━━━━━━━━━━━━━━━━╮
# ┃░▒  ▓  ▇  ▒       ┃
# ┃ ▒  ▓             ┃
# ┃ ▒                ┃
# ┃ ▒  ▄             ┃
# ┃ ▒  ▅             ┃
# ┃ ▒  ▆             ┃
# ╰━━━━━━━━━━━━━━━━━━╯
# ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ ─ │
# ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬ ═ ║
# ╭ ╮ ╯ ╰╯
# ┏ ┓ ┗ ┛ ┣ ┫ ┳ ┻ ╋ ━ ┃
# ▖

# ▗
# ▘
# ▙

# ▚

# ▛▀▀▀▀▀▀▀▀▄▄▄▄▜
# ▙▄▟

# ▜

# ▝
# ▞

# ▟
#  
# ▚

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

heater_plot-0.1.3.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heater_plot-0.1.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file heater_plot-0.1.3.tar.gz.

File metadata

  • Download URL: heater_plot-0.1.3.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for heater_plot-0.1.3.tar.gz
Algorithm Hash digest
SHA256 0d1cee5eecbac92c774503837ce33df63e4302713b142c4b7a75d7d406f90cc7
MD5 84b1a99f860e7ab98c77d1a72cc4df6a
BLAKE2b-256 d4fa66eb24621889171c13fd703e07beef5b9eb98d7fc07fd70ec71242109501

See more details on using hashes here.

Provenance

The following attestation bundles were made for heater_plot-0.1.3.tar.gz:

Publisher: publish.yaml on stephenlb/heater

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file heater_plot-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: heater_plot-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for heater_plot-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5c60fbee83efe19633d8d66eb251ca1839569fd4b9b21ce73fdc1cd40ba8797d
MD5 c532d2a82952c3e8cc35fe974209fd8b
BLAKE2b-256 c2af878b196ee204321f7cfb153b1e6d495c96d46153a58f47580d13b1a12d20

See more details on using hashes here.

Provenance

The following attestation bundles were made for heater_plot-0.1.3-py3-none-any.whl:

Publisher: publish.yaml on stephenlb/heater

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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