tikzplot42 0.5.4__tar.gz → 0.5.10__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.4 → tikzplot42-0.5.10}/PKG-INFO +28 -4
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/README.md +26 -3
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/pyproject.toml +2 -2
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/axes.py +737 -40
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/axes.pyi +663 -4
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/axes3d.py +86 -16
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/axes3d.pyi +23 -1
- tikzplot42-0.5.10/src/tikzplot/border_finder.py +92 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/colorbar.py +71 -13
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/colorbar.pyi +13 -3
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/config.py +11 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/config.pyi +9 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/elements.py +191 -24
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/elements.pyi +18 -0
- tikzplot42-0.5.10/src/tikzplot/figure.py +749 -0
- tikzplot42-0.5.10/src/tikzplot/figure.pyi +224 -0
- tikzplot42-0.5.10/src/tikzplot/pie.py +127 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/plots.py +123 -29
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/plots.pyi +740 -50
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/texts.py +9 -9
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot42.egg-info/PKG-INFO +28 -4
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot42.egg-info/SOURCES.txt +7 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot42.egg-info/requires.txt +1 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test13.py +1 -1
- tikzplot42-0.5.10/tests/test19.py +42 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test2.py +2 -2
- tikzplot42-0.5.10/tests/test20.py +30 -0
- tikzplot42-0.5.10/tests/test21.py +42 -0
- tikzplot42-0.5.10/tests/test22.py +54 -0
- tikzplot42-0.5.10/tests/test23.py +12 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test6.py +2 -1
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test7.py +4 -3
- tikzplot42-0.5.4/src/tikzplot/figure.py +0 -433
- tikzplot42-0.5.4/src/tikzplot/figure.pyi +0 -113
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/LICENSE +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/setup.cfg +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/__init__.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/__init__.pyi +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/colors.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/latex_special.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/py.typed +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/state.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/styles.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot/styles.pyi +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot42.egg-info/dependency_links.txt +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/src/tikzplot42.egg-info/top_level.txt +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test1.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test10.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test11.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test12.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test14.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test15.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test16.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test17.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test18.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test3.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test4.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test5.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/tests/test8.py +0 -0
- {tikzplot42-0.5.4 → tikzplot42-0.5.10}/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.10
|
|
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
|
|
|
@@ -744,6 +745,7 @@ Some basic plot commands are already implemented with commonly used arguments:
|
|
|
744
745
|
#### Plotting
|
|
745
746
|
- `plot()`,
|
|
746
747
|
- `scatter()`,
|
|
748
|
+
- `quiver()`,
|
|
747
749
|
- `loglog()`,
|
|
748
750
|
- `semilogx()/semilogy()`,
|
|
749
751
|
- `errorbar()`,
|
|
@@ -757,6 +759,18 @@ Some basic plot commands are already implemented with commonly used arguments:
|
|
|
757
759
|
- `step()`,
|
|
758
760
|
- `imshow()`,
|
|
759
761
|
- `text()`,
|
|
762
|
+
- `bxp()` (without notches),
|
|
763
|
+
- `boxplot()` (without notches),
|
|
764
|
+
- `violin()`,
|
|
765
|
+
- `violinplot()`,
|
|
766
|
+
- `pie()`,
|
|
767
|
+
- `pie_label()` (basic only for now),
|
|
768
|
+
- `ecdf()` (empirical cumulative distribution function),
|
|
769
|
+
- `magnitue_spectrum()`,
|
|
770
|
+
- `phase_spectrum()`,
|
|
771
|
+
- `angle_spectrum()`,
|
|
772
|
+
- `specgram()`,
|
|
773
|
+
- `psd()` (power spectral density),
|
|
760
774
|
- `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
775
|
- `axvline()/axhline()`,
|
|
762
776
|
- `axvspan()/axhspan()` (background span).
|
|
@@ -789,24 +803,34 @@ If axes and plot have different name for command with same effect, both are impl
|
|
|
789
803
|
- `ax.twinx()`,
|
|
790
804
|
- `ax.set()`,
|
|
791
805
|
- `ax.tick_params()`,
|
|
806
|
+
- `tight_layout()` (requires local pdflatex),
|
|
807
|
+
- `subplot_mosaic()` (requires TikzConfig USE_GROUPPLOTS=True),
|
|
808
|
+
- `ax.inset_axes()` (requires TikzConfig USE_GROUPPLOTS=True).
|
|
792
809
|
|
|
793
810
|
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
811
|
|
|
795
812
|
#### Supported common **kwargs
|
|
813
|
+
Some commonly used kwargs are listed below, check options for each command.
|
|
796
814
|
- `color/c`,
|
|
797
815
|
- `linestyle/ls`,
|
|
798
|
-
- `linewidth/
|
|
816
|
+
- `linewidth/lw`,
|
|
799
817
|
- `fmt`,
|
|
800
818
|
- `marker`,
|
|
801
819
|
- `marksize/ms`,
|
|
802
820
|
- `alpha`,
|
|
803
|
-
- `label
|
|
821
|
+
- `label`,
|
|
822
|
+
- `facecolor/fc`,
|
|
823
|
+
- `edgecolor/ec`,
|
|
824
|
+
- `hatch`,
|
|
825
|
+
- `hatch_color`,
|
|
826
|
+
- `hatch_linewidth`.
|
|
804
827
|
|
|
805
828
|
#### Colorbars
|
|
806
829
|
Colorbars and colormaps are implemented a bit differently than in matplotlib (simplified):
|
|
807
830
|
- if you use `imshow()`, you may use its return in `Colorbar()` (which you have to import as `from tikzplot import Colorbar`),
|
|
808
831
|
- you may use `Colorbar(axis, cmap, lower, upper, ...)` for manual colorbar. Additional kwargs may also be used by `imshow()` return,
|
|
809
832
|
- note that only one colorbar/colormap per axis is allowed (also if you use `scatter` with colormap/colorbar).
|
|
833
|
+
- `plt.colorbar()` or `fig.colorbar()` are also supported (with limited kwargs), and create instance of `Colorbar()`.
|
|
810
834
|
|
|
811
835
|
#### TikzConfig
|
|
812
836
|
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
|
|
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
|
|
|
@@ -45,6 +45,7 @@ Some basic plot commands are already implemented with commonly used arguments:
|
|
|
45
45
|
#### Plotting
|
|
46
46
|
- `plot()`,
|
|
47
47
|
- `scatter()`,
|
|
48
|
+
- `quiver()`,
|
|
48
49
|
- `loglog()`,
|
|
49
50
|
- `semilogx()/semilogy()`,
|
|
50
51
|
- `errorbar()`,
|
|
@@ -58,6 +59,18 @@ Some basic plot commands are already implemented with commonly used arguments:
|
|
|
58
59
|
- `step()`,
|
|
59
60
|
- `imshow()`,
|
|
60
61
|
- `text()`,
|
|
62
|
+
- `bxp()` (without notches),
|
|
63
|
+
- `boxplot()` (without notches),
|
|
64
|
+
- `violin()`,
|
|
65
|
+
- `violinplot()`,
|
|
66
|
+
- `pie()`,
|
|
67
|
+
- `pie_label()` (basic only for now),
|
|
68
|
+
- `ecdf()` (empirical cumulative distribution function),
|
|
69
|
+
- `magnitue_spectrum()`,
|
|
70
|
+
- `phase_spectrum()`,
|
|
71
|
+
- `angle_spectrum()`,
|
|
72
|
+
- `specgram()`,
|
|
73
|
+
- `psd()` (power spectral density),
|
|
61
74
|
- `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
75
|
- `axvline()/axhline()`,
|
|
63
76
|
- `axvspan()/axhspan()` (background span).
|
|
@@ -90,24 +103,34 @@ If axes and plot have different name for command with same effect, both are impl
|
|
|
90
103
|
- `ax.twinx()`,
|
|
91
104
|
- `ax.set()`,
|
|
92
105
|
- `ax.tick_params()`,
|
|
106
|
+
- `tight_layout()` (requires local pdflatex),
|
|
107
|
+
- `subplot_mosaic()` (requires TikzConfig USE_GROUPPLOTS=True),
|
|
108
|
+
- `ax.inset_axes()` (requires TikzConfig USE_GROUPPLOTS=True).
|
|
93
109
|
|
|
94
110
|
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
111
|
|
|
96
112
|
#### Supported common **kwargs
|
|
113
|
+
Some commonly used kwargs are listed below, check options for each command.
|
|
97
114
|
- `color/c`,
|
|
98
115
|
- `linestyle/ls`,
|
|
99
|
-
- `linewidth/
|
|
116
|
+
- `linewidth/lw`,
|
|
100
117
|
- `fmt`,
|
|
101
118
|
- `marker`,
|
|
102
119
|
- `marksize/ms`,
|
|
103
120
|
- `alpha`,
|
|
104
|
-
- `label
|
|
121
|
+
- `label`,
|
|
122
|
+
- `facecolor/fc`,
|
|
123
|
+
- `edgecolor/ec`,
|
|
124
|
+
- `hatch`,
|
|
125
|
+
- `hatch_color`,
|
|
126
|
+
- `hatch_linewidth`.
|
|
105
127
|
|
|
106
128
|
#### Colorbars
|
|
107
129
|
Colorbars and colormaps are implemented a bit differently than in matplotlib (simplified):
|
|
108
130
|
- if you use `imshow()`, you may use its return in `Colorbar()` (which you have to import as `from tikzplot import Colorbar`),
|
|
109
131
|
- you may use `Colorbar(axis, cmap, lower, upper, ...)` for manual colorbar. Additional kwargs may also be used by `imshow()` return,
|
|
110
132
|
- note that only one colorbar/colormap per axis is allowed (also if you use `scatter` with colormap/colorbar).
|
|
133
|
+
- `plt.colorbar()` or `fig.colorbar()` are also supported (with limited kwargs), and create instance of `Colorbar()`.
|
|
111
134
|
|
|
112
135
|
#### TikzConfig
|
|
113
136
|
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.
|
|
7
|
+
version = "0.5.10"
|
|
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"
|