pixelplotlib 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. pixelplotlib-0.1.0/.github/workflows/ci.yml +48 -0
  2. pixelplotlib-0.1.0/.github/workflows/publish.yml +72 -0
  3. pixelplotlib-0.1.0/.gitignore +8 -0
  4. pixelplotlib-0.1.0/LICENSE +18 -0
  5. pixelplotlib-0.1.0/PKG-INFO +608 -0
  6. pixelplotlib-0.1.0/README.md +573 -0
  7. pixelplotlib-0.1.0/docs/images/animation.gif +0 -0
  8. pixelplotlib-0.1.0/docs/images/annotations.png +0 -0
  9. pixelplotlib-0.1.0/docs/images/bar_chart.png +0 -0
  10. pixelplotlib-0.1.0/docs/images/barh_chart.png +0 -0
  11. pixelplotlib-0.1.0/docs/images/box_plot.png +0 -0
  12. pixelplotlib-0.1.0/docs/images/contour_lines.png +0 -0
  13. pixelplotlib-0.1.0/docs/images/error_bars.png +0 -0
  14. pixelplotlib-0.1.0/docs/images/fill_between.png +0 -0
  15. pixelplotlib-0.1.0/docs/images/filled_contours.png +0 -0
  16. pixelplotlib-0.1.0/docs/images/heatmap.png +0 -0
  17. pixelplotlib-0.1.0/docs/images/histogram.png +0 -0
  18. pixelplotlib-0.1.0/docs/images/histogram_2d.png +0 -0
  19. pixelplotlib-0.1.0/docs/images/line_plot.png +0 -0
  20. pixelplotlib-0.1.0/docs/images/log_scales.png +0 -0
  21. pixelplotlib-0.1.0/docs/images/mandelbrot.png +0 -0
  22. pixelplotlib-0.1.0/docs/images/pcolormesh.png +0 -0
  23. pixelplotlib-0.1.0/docs/images/pie_chart.png +0 -0
  24. pixelplotlib-0.1.0/docs/images/quiver.png +0 -0
  25. pixelplotlib-0.1.0/docs/images/rgb_image.png +0 -0
  26. pixelplotlib-0.1.0/docs/images/scatter_plot.png +0 -0
  27. pixelplotlib-0.1.0/docs/images/sprite_markers.png +0 -0
  28. pixelplotlib-0.1.0/docs/images/step_and_stem.png +0 -0
  29. pixelplotlib-0.1.0/docs/images/style_16bit.png +0 -0
  30. pixelplotlib-0.1.0/docs/images/style_1bit.png +0 -0
  31. pixelplotlib-0.1.0/docs/images/style_8bit.png +0 -0
  32. pixelplotlib-0.1.0/docs/images/style_c64.png +0 -0
  33. pixelplotlib-0.1.0/docs/images/style_cga.png +0 -0
  34. pixelplotlib-0.1.0/docs/images/style_gameboy.png +0 -0
  35. pixelplotlib-0.1.0/docs/images/style_pico8.png +0 -0
  36. pixelplotlib-0.1.0/docs/images/subplot_grid.png +0 -0
  37. pixelplotlib-0.1.0/docs/images/violin_plot.png +0 -0
  38. pixelplotlib-0.1.0/examples/gallery.py +423 -0
  39. pixelplotlib-0.1.0/examples/textual_app.py +76 -0
  40. pixelplotlib-0.1.0/pyproject.toml +78 -0
  41. pixelplotlib-0.1.0/src/pixelplotlib/__init__.py +41 -0
  42. pixelplotlib-0.1.0/src/pixelplotlib/animation.py +73 -0
  43. pixelplotlib-0.1.0/src/pixelplotlib/artists.py +1313 -0
  44. pixelplotlib-0.1.0/src/pixelplotlib/axes.py +1123 -0
  45. pixelplotlib-0.1.0/src/pixelplotlib/canvas.py +369 -0
  46. pixelplotlib-0.1.0/src/pixelplotlib/colormaps.py +163 -0
  47. pixelplotlib-0.1.0/src/pixelplotlib/colors.py +143 -0
  48. pixelplotlib-0.1.0/src/pixelplotlib/dither.py +89 -0
  49. pixelplotlib-0.1.0/src/pixelplotlib/figure.py +259 -0
  50. pixelplotlib-0.1.0/src/pixelplotlib/fonts.py +358 -0
  51. pixelplotlib-0.1.0/src/pixelplotlib/markers.py +53 -0
  52. pixelplotlib-0.1.0/src/pixelplotlib/palettes.py +62 -0
  53. pixelplotlib-0.1.0/src/pixelplotlib/pyplot.py +106 -0
  54. pixelplotlib-0.1.0/src/pixelplotlib/rich.py +139 -0
  55. pixelplotlib-0.1.0/src/pixelplotlib/sixel.py +147 -0
  56. pixelplotlib-0.1.0/src/pixelplotlib/styles.py +347 -0
  57. pixelplotlib-0.1.0/src/pixelplotlib/textual.py +77 -0
  58. pixelplotlib-0.1.0/src/pixelplotlib/ticks.py +90 -0
  59. pixelplotlib-0.1.0/tests/test_core.py +108 -0
  60. pixelplotlib-0.1.0/tests/test_gallery.py +43 -0
  61. pixelplotlib-0.1.0/tests/test_sixel.py +94 -0
  62. pixelplotlib-0.1.0/tests/test_terminal_ui.py +113 -0
  63. pixelplotlib-0.1.0/uv.lock +478 -0
@@ -0,0 +1,48 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
18
+ steps:
19
+ - uses: actions/checkout@v7
20
+ - uses: astral-sh/setup-uv@v10.4.0
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ - run: uv sync --locked
24
+ - run: uv run ruff check
25
+ - run: uv run pytest
26
+
27
+ test-lowest:
28
+ name: test (3.11, lowest dependencies)
29
+ runs-on: ubuntu-latest
30
+ steps:
31
+ - uses: actions/checkout@v7
32
+ - uses: astral-sh/setup-uv@v10.4.0
33
+ with:
34
+ python-version: "3.11"
35
+ - run: uv run --isolated --resolution lowest-direct pytest
36
+
37
+ build:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v7
41
+ with:
42
+ fetch-depth: 0 # hatch-vcs derives the version from git tags
43
+ - uses: astral-sh/setup-uv@v10.4.0
44
+ - run: uv build
45
+ - uses: actions/upload-artifact@v7
46
+ with:
47
+ name: dist
48
+ path: dist/
@@ -0,0 +1,72 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions:
8
+ contents: read
9
+
10
+ jobs:
11
+ build:
12
+ name: Build distributions
13
+ runs-on: ubuntu-latest
14
+ outputs:
15
+ version: ${{ steps.version.outputs.version }}
16
+ steps:
17
+ - uses: actions/checkout@v7
18
+ with:
19
+ fetch-depth: 0 # hatch-vcs derives the version from git tags
20
+ persist-credentials: false
21
+ - uses: astral-sh/setup-uv@v10.4.0
22
+ - name: Expected version from release tag
23
+ id: version
24
+ env:
25
+ TAG: ${{ github.event.release.tag_name }}
26
+ run: |
27
+ VERSION=$(uv run --isolated --no-project --with packaging -- python -c \
28
+ 'import sys; from packaging.version import Version; print(Version(sys.argv[1]))' "$TAG")
29
+ echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
30
+ # PyPI can't resolve relative links, so pin them to the release tag on GitHub.
31
+ - name: Make README links absolute
32
+ env:
33
+ TAG: ${{ github.event.release.tag_name }}
34
+ run: |
35
+ sed -i -E \
36
+ -e "s#(\]\(|src=\")docs/#\1https://raw.githubusercontent.com/${GITHUB_REPOSITORY}/${TAG}/docs/#g" \
37
+ -e "s#(\]\(|src=\")examples/#\1https://github.com/${GITHUB_REPOSITORY}/blob/${TAG}/examples/#g" \
38
+ README.md
39
+ # A dirty tree would make hatch-vcs emit a .dev/+local version PyPI rejects.
40
+ git update-index --assume-unchanged README.md
41
+ - run: uv build --no-sources
42
+ - name: Check distributions
43
+ env:
44
+ VERSION: ${{ steps.version.outputs.version }}
45
+ run: |
46
+ uvx twine check --strict dist/*
47
+ test -f "dist/pixelplotlib-${VERSION}-py3-none-any.whl"
48
+ test -f "dist/pixelplotlib-${VERSION}.tar.gz"
49
+ uv run --isolated --no-project --with dist/*.whl -- python -c \
50
+ 'import sys, pixelplotlib; assert pixelplotlib.__version__ == sys.argv[1], pixelplotlib.__version__' \
51
+ "$VERSION"
52
+ - uses: actions/upload-artifact@v7
53
+ with:
54
+ name: dist
55
+ path: dist/
56
+ if-no-files-found: error
57
+
58
+ publish:
59
+ name: Publish to PyPI
60
+ needs: build
61
+ runs-on: ubuntu-latest
62
+ environment:
63
+ name: pypi
64
+ url: https://pypi.org/project/pixelplotlib/${{ needs.build.outputs.version }}/
65
+ permissions:
66
+ id-token: write
67
+ steps:
68
+ - uses: actions/download-artifact@v8
69
+ with:
70
+ name: dist
71
+ path: dist/
72
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,8 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ build/
6
+ dist/
7
+ .pytest_cache/
8
+ .ruff_cache/
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Andreas Poehlmann
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.