tikzplot42 0.5.2__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.
- {tikzplot42-0.5.2/src/tikzplot42.egg-info → tikzplot42-0.5.8}/PKG-INFO +33 -5
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/README.md +31 -4
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/pyproject.toml +2 -2
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/axes.py +573 -52
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/axes.pyi +389 -22
- tikzplot42-0.5.8/src/tikzplot/axes3d.py +1343 -0
- tikzplot42-0.5.8/src/tikzplot/axes3d.pyi +604 -0
- tikzplot42-0.5.8/src/tikzplot/border_finder.py +92 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/colorbar.py +72 -14
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/colorbar.pyi +13 -3
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/colors.py +64 -6
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/config.py +13 -2
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/config.pyi +9 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/elements.py +306 -34
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/elements.pyi +18 -0
- tikzplot42-0.5.8/src/tikzplot/figure.py +749 -0
- tikzplot42-0.5.8/src/tikzplot/figure.pyi +224 -0
- tikzplot42-0.5.8/src/tikzplot/pie.py +127 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/plots.py +82 -29
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/plots.pyi +448 -49
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/texts.py +9 -9
- {tikzplot42-0.5.2 → tikzplot42-0.5.8/src/tikzplot42.egg-info}/PKG-INFO +33 -5
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/SOURCES.txt +7 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/requires.txt +1 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test11.py +1 -1
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test13.py +1 -1
- tikzplot42-0.5.8/tests/test17.py +40 -0
- tikzplot42-0.5.8/tests/test18.py +24 -0
- tikzplot42-0.5.8/tests/test19.py +42 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test2.py +2 -2
- tikzplot42-0.5.8/tests/test20.py +30 -0
- tikzplot42-0.5.8/tests/test21.py +42 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test6.py +2 -1
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test7.py +4 -3
- tikzplot42-0.5.2/src/tikzplot/axes3d.py +0 -591
- tikzplot42-0.5.2/src/tikzplot/axes3d.pyi +0 -43
- tikzplot42-0.5.2/src/tikzplot/figure.py +0 -420
- tikzplot42-0.5.2/src/tikzplot/figure.pyi +0 -84
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/LICENSE +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/setup.cfg +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/__init__.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/__init__.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/latex_special.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/py.typed +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/state.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/styles.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot/styles.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/dependency_links.txt +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/src/tikzplot42.egg-info/top_level.txt +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test1.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test10.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test12.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test14.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test15.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test16.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test3.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test4.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test5.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.8}/tests/test8.py +0 -0
- {tikzplot42-0.5.2 → 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.
|
|
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
|
|
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,10 +758,27 @@ 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).
|
|
763
771
|
|
|
772
|
+
#### 3D plotting
|
|
773
|
+
- `plot()`,
|
|
774
|
+
- `scatter()`,
|
|
775
|
+
- `errorbar()`,
|
|
776
|
+
- `fill_between()`,
|
|
777
|
+
- `plot_wireframe()`,
|
|
778
|
+
- `plot_surface()`,
|
|
779
|
+
- `bar3d()`,
|
|
780
|
+
- `text()`.
|
|
781
|
+
|
|
764
782
|
#### Figures
|
|
765
783
|
- `plt.figure()` (currently only to give you figure object or to set `figsize`),
|
|
766
784
|
- `plt.subplot()`, `plt.subplots()` (with `sharex/sharey` fully implemented, projection `polar` and `3d` with basic support),
|
|
@@ -779,24 +797,34 @@ If axes and plot have different name for command with same effect, both are impl
|
|
|
779
797
|
- `ax.twinx()`,
|
|
780
798
|
- `ax.set()`,
|
|
781
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).
|
|
782
803
|
|
|
783
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).
|
|
784
805
|
|
|
785
806
|
#### Supported common **kwargs
|
|
807
|
+
Some commonly used kwargs are listed below, check options for each command.
|
|
786
808
|
- `color/c`,
|
|
787
809
|
- `linestyle/ls`,
|
|
788
|
-
- `linewidth/
|
|
810
|
+
- `linewidth/lw`,
|
|
789
811
|
- `fmt`,
|
|
790
812
|
- `marker`,
|
|
791
813
|
- `marksize/ms`,
|
|
792
814
|
- `alpha`,
|
|
793
|
-
- `label
|
|
815
|
+
- `label`,
|
|
816
|
+
- `facecolor/fc`,
|
|
817
|
+
- `edgecolor/ec`,
|
|
818
|
+
- `hatch`,
|
|
819
|
+
- `hatch_color`,
|
|
820
|
+
- `hatch_linewidth`.
|
|
794
821
|
|
|
795
822
|
#### Colorbars
|
|
796
823
|
Colorbars and colormaps are implemented a bit differently than in matplotlib (simplified):
|
|
797
824
|
- if you use `imshow()`, you may use its return in `Colorbar()` (which you have to import as `from tikzplot import Colorbar`),
|
|
798
825
|
- you may use `Colorbar(axis, cmap, lower, upper, ...)` for manual colorbar. Additional kwargs may also be used by `imshow()` return,
|
|
799
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()`.
|
|
800
828
|
|
|
801
829
|
#### TikzConfig
|
|
802
830
|
For plot configurations (default sizes, paddings, etc.), use `from tikzplot import TikzConfig`:
|
|
@@ -806,5 +834,5 @@ Currently supported parameters are listed with their default values in `src/tikz
|
|
|
806
834
|
|
|
807
835
|
## More features coming soon...
|
|
808
836
|
- additional arguments support for implemented commands,
|
|
809
|
-
- improved 3D
|
|
837
|
+
- improved 3D and polar plots,
|
|
810
838
|
- ...
|
|
@@ -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
|
|
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,10 +58,27 @@ 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).
|
|
64
71
|
|
|
72
|
+
#### 3D plotting
|
|
73
|
+
- `plot()`,
|
|
74
|
+
- `scatter()`,
|
|
75
|
+
- `errorbar()`,
|
|
76
|
+
- `fill_between()`,
|
|
77
|
+
- `plot_wireframe()`,
|
|
78
|
+
- `plot_surface()`,
|
|
79
|
+
- `bar3d()`,
|
|
80
|
+
- `text()`.
|
|
81
|
+
|
|
65
82
|
#### Figures
|
|
66
83
|
- `plt.figure()` (currently only to give you figure object or to set `figsize`),
|
|
67
84
|
- `plt.subplot()`, `plt.subplots()` (with `sharex/sharey` fully implemented, projection `polar` and `3d` with basic support),
|
|
@@ -80,24 +97,34 @@ If axes and plot have different name for command with same effect, both are impl
|
|
|
80
97
|
- `ax.twinx()`,
|
|
81
98
|
- `ax.set()`,
|
|
82
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).
|
|
83
103
|
|
|
84
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).
|
|
85
105
|
|
|
86
106
|
#### Supported common **kwargs
|
|
107
|
+
Some commonly used kwargs are listed below, check options for each command.
|
|
87
108
|
- `color/c`,
|
|
88
109
|
- `linestyle/ls`,
|
|
89
|
-
- `linewidth/
|
|
110
|
+
- `linewidth/lw`,
|
|
90
111
|
- `fmt`,
|
|
91
112
|
- `marker`,
|
|
92
113
|
- `marksize/ms`,
|
|
93
114
|
- `alpha`,
|
|
94
|
-
- `label
|
|
115
|
+
- `label`,
|
|
116
|
+
- `facecolor/fc`,
|
|
117
|
+
- `edgecolor/ec`,
|
|
118
|
+
- `hatch`,
|
|
119
|
+
- `hatch_color`,
|
|
120
|
+
- `hatch_linewidth`.
|
|
95
121
|
|
|
96
122
|
#### Colorbars
|
|
97
123
|
Colorbars and colormaps are implemented a bit differently than in matplotlib (simplified):
|
|
98
124
|
- if you use `imshow()`, you may use its return in `Colorbar()` (which you have to import as `from tikzplot import Colorbar`),
|
|
99
125
|
- you may use `Colorbar(axis, cmap, lower, upper, ...)` for manual colorbar. Additional kwargs may also be used by `imshow()` return,
|
|
100
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()`.
|
|
101
128
|
|
|
102
129
|
#### TikzConfig
|
|
103
130
|
For plot configurations (default sizes, paddings, etc.), use `from tikzplot import TikzConfig`:
|
|
@@ -107,5 +134,5 @@ Currently supported parameters are listed with their default values in `src/tikz
|
|
|
107
134
|
|
|
108
135
|
## More features coming soon...
|
|
109
136
|
- additional arguments support for implemented commands,
|
|
110
|
-
- improved 3D
|
|
137
|
+
- improved 3D and polar plots,
|
|
111
138
|
- ...
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tikzplot42"
|
|
7
|
-
version = "0.5.
|
|
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"
|