tikzplot42 0.5.4__tar.gz → 0.5.8__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 (58) hide show
  1. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/PKG-INFO +22 -4
  2. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/README.md +20 -3
  3. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/pyproject.toml +2 -2
  4. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/axes.py +559 -40
  5. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/axes.pyi +367 -3
  6. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/axes3d.py +86 -16
  7. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/axes3d.pyi +23 -1
  8. tikzplot42-0.5.8/src/tikzplot/border_finder.py +92 -0
  9. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/colorbar.py +71 -13
  10. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/colorbar.pyi +13 -3
  11. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/config.py +11 -0
  12. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/config.pyi +9 -0
  13. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/elements.py +163 -24
  14. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/elements.pyi +18 -0
  15. tikzplot42-0.5.8/src/tikzplot/figure.py +749 -0
  16. tikzplot42-0.5.8/src/tikzplot/figure.pyi +224 -0
  17. tikzplot42-0.5.8/src/tikzplot/pie.py +127 -0
  18. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/plots.py +81 -29
  19. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/plots.pyi +448 -49
  20. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/texts.py +9 -9
  21. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/PKG-INFO +22 -4
  22. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/SOURCES.txt +5 -0
  23. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/requires.txt +1 -0
  24. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test13.py +1 -1
  25. tikzplot42-0.5.8/tests/test19.py +42 -0
  26. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test2.py +2 -2
  27. tikzplot42-0.5.8/tests/test20.py +30 -0
  28. tikzplot42-0.5.8/tests/test21.py +42 -0
  29. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test6.py +2 -1
  30. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test7.py +4 -3
  31. tikzplot42-0.5.4/src/tikzplot/figure.py +0 -433
  32. tikzplot42-0.5.4/src/tikzplot/figure.pyi +0 -113
  33. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/LICENSE +0 -0
  34. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/setup.cfg +0 -0
  35. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/__init__.py +0 -0
  36. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/__init__.pyi +0 -0
  37. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/colors.py +0 -0
  38. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/latex_special.py +0 -0
  39. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/py.typed +0 -0
  40. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/state.py +0 -0
  41. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/styles.py +0 -0
  42. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot/styles.pyi +0 -0
  43. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/dependency_links.txt +0 -0
  44. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/top_level.txt +0 -0
  45. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test1.py +0 -0
  46. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test10.py +0 -0
  47. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test11.py +0 -0
  48. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test12.py +0 -0
  49. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test14.py +0 -0
  50. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test15.py +0 -0
  51. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test16.py +0 -0
  52. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test17.py +0 -0
  53. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test18.py +0 -0
  54. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test3.py +0 -0
  55. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test4.py +0 -0
  56. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test5.py +0 -0
  57. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test8.py +0 -0
  58. {tikzplot42-0.5.4 → tikzplot42-0.5.8}/tests/test9.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tikzplot42
3
- Version: 0.5.4
3
+ Version: 0.5.8
4
4
  Summary: TikzPlot to make TikZ/PGFPlots plots with matplotlib.pyplot-like syntax.
5
5
  Author-email: Zan Ambrozic <zan.ambrozic7@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -695,6 +695,7 @@ Description-Content-Type: text/markdown
695
695
  License-File: LICENSE
696
696
  Requires-Dist: numpy
697
697
  Requires-Dist: matplotlib
698
+ Requires-Dist: scipy
698
699
  Dynamic: license-file
699
700
 
700
701
  # TikzPlot
@@ -713,7 +714,7 @@ Please report any bugs or unexpected behaviour in Issues. Examples may be found
713
714
 
714
715
  ## Why use this package instead of other available?
715
716
  - It is easy to use, with code being very similar to matplotlib and only minor changes are needed to switch from matplotlib to this package.
716
- - It relies on frontend commands, which is less likley to change in matplotlib, so new updates do not break it.
717
+ - It relies on frontend commands, which are less likley to change in matplotlib, so new updates do not break it.
717
718
  - It generates clean and readable Tikz code, which is easy to edit and understand. Code is also efficient and does not contain unnecessary commands, which is important escpecially for large graphs.
718
719
  - If you use LLMs to generate pgfplots code, you will often get code that is not compilable, since for more complex requirements, LLMs make up commands that do not exist. This package covers many use cases and generates compilable code.
719
720
 
@@ -757,6 +758,13 @@ Some basic plot commands are already implemented with commonly used arguments:
757
758
  - `step()`,
758
759
  - `imshow()`,
759
760
  - `text()`,
761
+ - `bxp()` (without notches),
762
+ - `boxplot()` (without notches),
763
+ - `violin()`,
764
+ - `violinplot()`,
765
+ - `pie()`,
766
+ - `pie_label()` (basic only for now),
767
+ - `ecdf()` (empirical cumulative distribution function),
760
768
  - `magnify()` (used to magnify part of a plot, but Tikz cannot handle `fill_between` if this one is used, which is a long known issue),
761
769
  - `axvline()/axhline()`,
762
770
  - `axvspan()/axhspan()` (background span).
@@ -789,24 +797,34 @@ If axes and plot have different name for command with same effect, both are impl
789
797
  - `ax.twinx()`,
790
798
  - `ax.set()`,
791
799
  - `ax.tick_params()`,
800
+ - `tight_layout()` (requires local pdflatex),
801
+ - `subplot_mosaic()` (requires TikzConfig USE_GROUPPLOTS=True),
802
+ - `ax.inset_axes()` (requires TikzConfig USE_GROUPPLOTS=True).
792
803
 
793
804
  There is a limited support for built-in styles (e.g. `plt.style.use("default")`), you may also define your own style using `plt.style.set_profile()`. Currently supported features are: color cycle (hex colors sequence), line width (in pt), grid (with matplotlib kwargs), background (latex style key=value), additional settings (raw latex code for optional arguments to axis: key=value).
794
805
 
795
806
  #### Supported common **kwargs
807
+ Some commonly used kwargs are listed below, check options for each command.
796
808
  - `color/c`,
797
809
  - `linestyle/ls`,
798
- - `linewidth/ls`,
810
+ - `linewidth/lw`,
799
811
  - `fmt`,
800
812
  - `marker`,
801
813
  - `marksize/ms`,
802
814
  - `alpha`,
803
- - `label`.
815
+ - `label`,
816
+ - `facecolor/fc`,
817
+ - `edgecolor/ec`,
818
+ - `hatch`,
819
+ - `hatch_color`,
820
+ - `hatch_linewidth`.
804
821
 
805
822
  #### Colorbars
806
823
  Colorbars and colormaps are implemented a bit differently than in matplotlib (simplified):
807
824
  - if you use `imshow()`, you may use its return in `Colorbar()` (which you have to import as `from tikzplot import Colorbar`),
808
825
  - you may use `Colorbar(axis, cmap, lower, upper, ...)` for manual colorbar. Additional kwargs may also be used by `imshow()` return,
809
826
  - note that only one colorbar/colormap per axis is allowed (also if you use `scatter` with colormap/colorbar).
827
+ - `plt.colorbar()` or `fig.colorbar()` are also supported (with limited kwargs), and create instance of `Colorbar()`.
810
828
 
811
829
  #### TikzConfig
812
830
  For plot configurations (default sizes, paddings, etc.), use `from tikzplot import TikzConfig`:
@@ -14,7 +14,7 @@ Please report any bugs or unexpected behaviour in Issues. Examples may be found
14
14
 
15
15
  ## Why use this package instead of other available?
16
16
  - It is easy to use, with code being very similar to matplotlib and only minor changes are needed to switch from matplotlib to this package.
17
- - It relies on frontend commands, which is less likley to change in matplotlib, so new updates do not break it.
17
+ - It relies on frontend commands, which are less likley to change in matplotlib, so new updates do not break it.
18
18
  - It generates clean and readable Tikz code, which is easy to edit and understand. Code is also efficient and does not contain unnecessary commands, which is important escpecially for large graphs.
19
19
  - If you use LLMs to generate pgfplots code, you will often get code that is not compilable, since for more complex requirements, LLMs make up commands that do not exist. This package covers many use cases and generates compilable code.
20
20
 
@@ -58,6 +58,13 @@ Some basic plot commands are already implemented with commonly used arguments:
58
58
  - `step()`,
59
59
  - `imshow()`,
60
60
  - `text()`,
61
+ - `bxp()` (without notches),
62
+ - `boxplot()` (without notches),
63
+ - `violin()`,
64
+ - `violinplot()`,
65
+ - `pie()`,
66
+ - `pie_label()` (basic only for now),
67
+ - `ecdf()` (empirical cumulative distribution function),
61
68
  - `magnify()` (used to magnify part of a plot, but Tikz cannot handle `fill_between` if this one is used, which is a long known issue),
62
69
  - `axvline()/axhline()`,
63
70
  - `axvspan()/axhspan()` (background span).
@@ -90,24 +97,34 @@ If axes and plot have different name for command with same effect, both are impl
90
97
  - `ax.twinx()`,
91
98
  - `ax.set()`,
92
99
  - `ax.tick_params()`,
100
+ - `tight_layout()` (requires local pdflatex),
101
+ - `subplot_mosaic()` (requires TikzConfig USE_GROUPPLOTS=True),
102
+ - `ax.inset_axes()` (requires TikzConfig USE_GROUPPLOTS=True).
93
103
 
94
104
  There is a limited support for built-in styles (e.g. `plt.style.use("default")`), you may also define your own style using `plt.style.set_profile()`. Currently supported features are: color cycle (hex colors sequence), line width (in pt), grid (with matplotlib kwargs), background (latex style key=value), additional settings (raw latex code for optional arguments to axis: key=value).
95
105
 
96
106
  #### Supported common **kwargs
107
+ Some commonly used kwargs are listed below, check options for each command.
97
108
  - `color/c`,
98
109
  - `linestyle/ls`,
99
- - `linewidth/ls`,
110
+ - `linewidth/lw`,
100
111
  - `fmt`,
101
112
  - `marker`,
102
113
  - `marksize/ms`,
103
114
  - `alpha`,
104
- - `label`.
115
+ - `label`,
116
+ - `facecolor/fc`,
117
+ - `edgecolor/ec`,
118
+ - `hatch`,
119
+ - `hatch_color`,
120
+ - `hatch_linewidth`.
105
121
 
106
122
  #### Colorbars
107
123
  Colorbars and colormaps are implemented a bit differently than in matplotlib (simplified):
108
124
  - if you use `imshow()`, you may use its return in `Colorbar()` (which you have to import as `from tikzplot import Colorbar`),
109
125
  - you may use `Colorbar(axis, cmap, lower, upper, ...)` for manual colorbar. Additional kwargs may also be used by `imshow()` return,
110
126
  - note that only one colorbar/colormap per axis is allowed (also if you use `scatter` with colormap/colorbar).
127
+ - `plt.colorbar()` or `fig.colorbar()` are also supported (with limited kwargs), and create instance of `Colorbar()`.
111
128
 
112
129
  #### TikzConfig
113
130
  For plot configurations (default sizes, paddings, etc.), use `from tikzplot import TikzConfig`:
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tikzplot42"
7
- version = "0.5.4"
7
+ version = "0.5.8"
8
8
  description = "TikzPlot to make TikZ/PGFPlots plots with matplotlib.pyplot-like syntax."
9
9
  authors = [
10
10
  { name = "Zan Ambrozic", email = "zan.ambrozic7@gmail.com" }
@@ -23,7 +23,7 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3.14",
24
24
  "Topic :: Scientific/Engineering :: Visualization",
25
25
  ]
26
- dependencies = ["numpy", "matplotlib"]
26
+ dependencies = ["numpy", "matplotlib", "scipy"]
27
27
 
28
28
  [project.urls]
29
29
  Homepage = "https://github.com/ZanAmb/TikzPlot"