tikzplot42 0.2.8__tar.gz → 0.3.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.
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/PKG-INFO +6 -5
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/README.md +5 -4
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/pyproject.toml +1 -1
- tikzplot42-0.3.0/src/tikzplot/__init__.py +5 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/axes.pyi +3 -1
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/colorbar.pyi +4 -4
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/config.pyi +2 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/plots.pyi +187 -2
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot42.egg-info/PKG-INFO +6 -5
- tikzplot42-0.2.8/src/tikzplot/__init__.py +0 -5
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/LICENSE +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/setup.cfg +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/__init__.pyi +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/axes.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/axes3d.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/colorbar.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/colors.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/colors.pyi +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/config.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/elements.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/elements.pyi +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/figure.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/figure.pyi +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/latex_special.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/plots.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/py.typed +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/state.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot/state.pyi +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot42.egg-info/SOURCES.txt +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot42.egg-info/dependency_links.txt +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot42.egg-info/requires.txt +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/src/tikzplot42.egg-info/top_level.txt +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test1.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test2.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test3.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test4.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test5.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test6.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test7.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test8.py +0 -0
- {tikzplot42-0.2.8 → tikzplot42-0.3.0}/tests/test9.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tikzplot42
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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
|
|
@@ -703,7 +703,7 @@ Dynamic: license-file
|
|
|
703
703
|
# TikzPlot
|
|
704
704
|
A clean version of PltToTikz, this time as Python package. Easy to use: only replace import matplotlib.pyplot with this library.
|
|
705
705
|
|
|
706
|
-
Please let me know if you find any bugs or unexpected behaviour.
|
|
706
|
+
Please let me know if you find any bugs or unexpected behaviour. Examples may be found in repository under `tests/` directory.
|
|
707
707
|
|
|
708
708
|
# Installation
|
|
709
709
|
NEW: PyPI: `pip install tikzplot42`.
|
|
@@ -713,13 +713,14 @@ Alternativley, download this package and install using: `pip install [path]`, wh
|
|
|
713
713
|
Instead of using `import matplotlib.pyplot (as plt)`, use `import tikzplot.plots (as plt)`.
|
|
714
714
|
|
|
715
715
|
## LaTeX requirements
|
|
716
|
-
- `\usepackage{tikz}
|
|
717
|
-
- `\usepackage{pgfplots}
|
|
718
|
-
- `\pgfplotsset{compat=1.18}`
|
|
716
|
+
- `\usepackage{tikz}`,
|
|
717
|
+
- `\usepackage{pgfplots}`,
|
|
718
|
+
- `\pgfplotsset{compat=1.18}` (may be lower, but compilation is not guaranteed),
|
|
719
719
|
- `\usepgfplotslibrary{fillbetween}` (if you use fill-between plots),
|
|
720
720
|
- `\usepgfplotslibrary{groupplots}` (recommended for best results, enabled by default, may be avoided by setting TikzConfig USE_GROUPPLOTS=False),
|
|
721
721
|
- `\usepackage{xcolor}` (recommended for best colors, works without but needs change of TikzConfig USE_XCOLOR=False).
|
|
722
722
|
|
|
723
|
+
Export using `plt.savefig("example_graph.tex")` (recommended) or `plt.show()`.
|
|
723
724
|
Then use the generated file as `\input{example_graph.tex}`.
|
|
724
725
|
|
|
725
726
|
## Currently implemented:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# TikzPlot
|
|
2
2
|
A clean version of PltToTikz, this time as Python package. Easy to use: only replace import matplotlib.pyplot with this library.
|
|
3
3
|
|
|
4
|
-
Please let me know if you find any bugs or unexpected behaviour.
|
|
4
|
+
Please let me know if you find any bugs or unexpected behaviour. Examples may be found in repository under `tests/` directory.
|
|
5
5
|
|
|
6
6
|
# Installation
|
|
7
7
|
NEW: PyPI: `pip install tikzplot42`.
|
|
@@ -11,13 +11,14 @@ Alternativley, download this package and install using: `pip install [path]`, wh
|
|
|
11
11
|
Instead of using `import matplotlib.pyplot (as plt)`, use `import tikzplot.plots (as plt)`.
|
|
12
12
|
|
|
13
13
|
## LaTeX requirements
|
|
14
|
-
- `\usepackage{tikz}
|
|
15
|
-
- `\usepackage{pgfplots}
|
|
16
|
-
- `\pgfplotsset{compat=1.18}`
|
|
14
|
+
- `\usepackage{tikz}`,
|
|
15
|
+
- `\usepackage{pgfplots}`,
|
|
16
|
+
- `\pgfplotsset{compat=1.18}` (may be lower, but compilation is not guaranteed),
|
|
17
17
|
- `\usepgfplotslibrary{fillbetween}` (if you use fill-between plots),
|
|
18
18
|
- `\usepgfplotslibrary{groupplots}` (recommended for best results, enabled by default, may be avoided by setting TikzConfig USE_GROUPPLOTS=False),
|
|
19
19
|
- `\usepackage{xcolor}` (recommended for best colors, works without but needs change of TikzConfig USE_XCOLOR=False).
|
|
20
20
|
|
|
21
|
+
Export using `plt.savefig("example_graph.tex")` (recommended) or `plt.show()`.
|
|
21
22
|
Then use the generated file as `\input{example_graph.tex}`.
|
|
22
23
|
|
|
23
24
|
## Currently implemented:
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tikzplot42"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.0"
|
|
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" }
|
|
@@ -156,6 +156,8 @@ class BaseAxes:
|
|
|
156
156
|
label:Optional[str]=...) -> None:
|
|
157
157
|
"""
|
|
158
158
|
Draw a stem plot to the selected axis.
|
|
159
|
+
Parameters
|
|
160
|
+
----------
|
|
159
161
|
locs, heads: ArrayLike
|
|
160
162
|
Datapoints for plot, (x,y) for vertical, (y,x) for horizontal
|
|
161
163
|
|
|
@@ -404,7 +406,7 @@ class Axes(BaseAxes):
|
|
|
404
406
|
linewidth or lw: float, optional
|
|
405
407
|
Grid line width in pt
|
|
406
408
|
"""
|
|
407
|
-
def
|
|
409
|
+
def set_minorticks_num(self, num: int) -> None:
|
|
408
410
|
...
|
|
409
411
|
"""
|
|
410
412
|
Set number of minor ticks between major ticks.
|
|
@@ -32,10 +32,10 @@ class Colorbar:
|
|
|
32
32
|
ticks: Optional[Sequence[ float]] = ...,
|
|
33
33
|
tick_labels: Optional[Sequence[str | float]] = ...,
|
|
34
34
|
label: Optional[str] = ...,
|
|
35
|
-
width: float = ...,
|
|
36
|
-
horizontal: bool = ...,
|
|
37
|
-
rel_len: float = ...,
|
|
38
|
-
divisions: int = ...
|
|
35
|
+
width: Optional[float] = ...,
|
|
36
|
+
horizontal: Optional[bool] = ...,
|
|
37
|
+
rel_len: Optional[float] = ...,
|
|
38
|
+
divisions: Optional[int] = ...
|
|
39
39
|
) -> None:
|
|
40
40
|
"""
|
|
41
41
|
Parameters
|
|
@@ -55,6 +55,10 @@ def subplots(
|
|
|
55
55
|
- Single Axes if nrows*ncols == 1
|
|
56
56
|
- 1D array if one dimension is 1
|
|
57
57
|
- 2D array otherwise
|
|
58
|
+
figsize : tuple, optional
|
|
59
|
+
Figure size in inches (width, height).
|
|
60
|
+
sharex, sharey : Axes, optional
|
|
61
|
+
Specify if row, column or all subplots should share x or y axis.
|
|
58
62
|
"""
|
|
59
63
|
...
|
|
60
64
|
|
|
@@ -204,7 +208,36 @@ def plot(
|
|
|
204
208
|
Mark size in pt
|
|
205
209
|
"""
|
|
206
210
|
...
|
|
207
|
-
|
|
211
|
+
def errorbar(self, x: ArrayLike = ..., y: ArrayLike = ..., yerr: Optional[ArrayLike | float] = ..., xerr: Optional[ArrayLike | float] = ..., fmt: Optional[str] = ..., *, alpha: Optional[float] = ..., color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
212
|
+
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
213
|
+
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ..., label:Optional[str]=...) -> None:
|
|
214
|
+
"""
|
|
215
|
+
Draw a plot with errrorbars to the selected axis.
|
|
216
|
+
Parameters
|
|
217
|
+
----------
|
|
218
|
+
x,y : ArrayLike or float
|
|
219
|
+
Datapoints
|
|
220
|
+
yerr, xerr: ArrayLike or float
|
|
221
|
+
Datapoint error (constant, symmetric, asymmetric)
|
|
222
|
+
fmt: str, optional
|
|
223
|
+
Style
|
|
224
|
+
alpha: float, optional
|
|
225
|
+
Opacity
|
|
226
|
+
color or c: all matplotlib color formats (without X11/xkcd), optional
|
|
227
|
+
color of line and markers: RGB/RGBA (tuple), HEX (str), grayscale (float), single-char (str), name (str), default cycle ("CX", X int), none for invisible
|
|
228
|
+
label: str, optional
|
|
229
|
+
Legned entry
|
|
230
|
+
linestyle or ls: str, optional
|
|
231
|
+
Line style
|
|
232
|
+
linewidth or lw: float, optional
|
|
233
|
+
Line width in pt
|
|
234
|
+
|
|
235
|
+
marker: str, optional
|
|
236
|
+
Marker type
|
|
237
|
+
markersize or ms: float, optional
|
|
238
|
+
Mark size in pt
|
|
239
|
+
"""
|
|
240
|
+
...
|
|
208
241
|
def scatter(
|
|
209
242
|
x: ArrayLike = ..., y: ArrayLike = ..., fmt: Optional[str] = ...,
|
|
210
243
|
*,
|
|
@@ -291,7 +324,153 @@ def semilogy(
|
|
|
291
324
|
"""
|
|
292
325
|
...
|
|
293
326
|
|
|
294
|
-
|
|
327
|
+
def stem(self, *args: Any, orientation: Literal["horizontal","vertical"] = "vertical", linefmt:Optional[str] = ..., markerfmt:Optional[str]=...,
|
|
328
|
+
label:Optional[str]=...) -> None:
|
|
329
|
+
"""
|
|
330
|
+
Draw a stem plot to the selected axis.
|
|
331
|
+
Parameters
|
|
332
|
+
----------
|
|
333
|
+
locs, heads: ArrayLike
|
|
334
|
+
Datapoints for plot, (x,y) for vertical, (y,x) for horizontal
|
|
335
|
+
orientation: {"vertical", "horizontal"}, default "vertical
|
|
336
|
+
Orientation of stems
|
|
337
|
+
alpha: float, optional
|
|
338
|
+
Opacity
|
|
339
|
+
linefmt, markerfmt: str, optional
|
|
340
|
+
Short style of line and marker
|
|
341
|
+
label: str, optional
|
|
342
|
+
Legend entry
|
|
343
|
+
"""
|
|
344
|
+
...
|
|
345
|
+
|
|
346
|
+
def fill_between(
|
|
347
|
+
self,
|
|
348
|
+
x: ArrayLike,
|
|
349
|
+
y1: ArrayLike,
|
|
350
|
+
y2: Optional[ArrayLike] = ...,
|
|
351
|
+
alpha: Optional[float] = ...,
|
|
352
|
+
color: Optional[ColorLike] = ...,
|
|
353
|
+
c: Optional[ColorLike] = ...
|
|
354
|
+
) -> None:
|
|
355
|
+
"""
|
|
356
|
+
Fill space between two plots (or a single plot and x-axis).
|
|
357
|
+
Parameters
|
|
358
|
+
----------
|
|
359
|
+
x,y1, y2 : ArrayLike or float (y2 optional)
|
|
360
|
+
Datapoints, if matched with existing plot, that line will be recycled to save tikz memory.
|
|
361
|
+
alpha: float, optional
|
|
362
|
+
Opacity
|
|
363
|
+
color or c: all matplotlib color formats (without X11/xkcd), optional
|
|
364
|
+
Fill color: RGB/RGBA (tuple), HEX (str), grayscale (float), single-char (str), name (str), default cycle ("CX", X int), none for invisible
|
|
365
|
+
label: str, optional
|
|
366
|
+
Legend entry
|
|
367
|
+
"""
|
|
368
|
+
...
|
|
369
|
+
|
|
370
|
+
def loglog(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha: Optional[float] = ..., color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
371
|
+
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
372
|
+
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ...) -> None:
|
|
373
|
+
"""
|
|
374
|
+
Draw a general plot to the selected axis and change the current axis into log mode.
|
|
375
|
+
|
|
376
|
+
Parameters
|
|
377
|
+
----------
|
|
378
|
+
x,y : ArrayLike or float
|
|
379
|
+
Datapoints
|
|
380
|
+
base: float, optional
|
|
381
|
+
Log basis, default 10
|
|
382
|
+
fmt: str, optional
|
|
383
|
+
Style
|
|
384
|
+
alpha: float, optional
|
|
385
|
+
Opacity
|
|
386
|
+
color or c: all matplotlib color formats (without X11/xkcd), optional
|
|
387
|
+
color of line and markers: RGB/RGBA (tuple), HEX (str), grayscale (float), single-char (str), name (str), default cycle ("CX", X int), none for invisible
|
|
388
|
+
label: str, optional
|
|
389
|
+
Legned entry
|
|
390
|
+
linestyle or ls: str, optional
|
|
391
|
+
Line style
|
|
392
|
+
linewidth or lw: float, optional
|
|
393
|
+
Line width in pt
|
|
394
|
+
|
|
395
|
+
marker: str, optional
|
|
396
|
+
Marker type
|
|
397
|
+
markersize or ms: float, optional
|
|
398
|
+
Mark size in pt
|
|
399
|
+
"""
|
|
400
|
+
...
|
|
401
|
+
|
|
402
|
+
def hlines(
|
|
403
|
+
self,
|
|
404
|
+
y: Union[float, Sequence[float]],
|
|
405
|
+
xmin: Union[float, Sequence[float]],
|
|
406
|
+
xmax: Union[float, Sequence[float]],
|
|
407
|
+
colors: Union[str, Sequence[str]] = "k",
|
|
408
|
+
linestyles: Union[str, Sequence[str]] = "solid",
|
|
409
|
+
) -> None:
|
|
410
|
+
"""
|
|
411
|
+
Draw horizontal lines to the selected axis.
|
|
412
|
+
"""
|
|
413
|
+
...
|
|
414
|
+
|
|
415
|
+
def vlines(
|
|
416
|
+
self,
|
|
417
|
+
x: Union[float, Sequence[float]],
|
|
418
|
+
ymin: Union[float, Sequence[float]],
|
|
419
|
+
ymax: Union[float, Sequence[float]],
|
|
420
|
+
colors: Union[str, Sequence[str]] = "k",
|
|
421
|
+
linestyles: Union[str, Sequence[str]] = "solid",
|
|
422
|
+
) -> None:
|
|
423
|
+
"""
|
|
424
|
+
Draw vertical lines to the selected axis.
|
|
425
|
+
"""
|
|
426
|
+
...
|
|
427
|
+
|
|
428
|
+
def semilogx(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha: Optional[float] = ..., color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
429
|
+
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
430
|
+
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ...) -> None:
|
|
431
|
+
"""
|
|
432
|
+
Draw a general plot to the selected axis and change the current x-axis into log mode.
|
|
433
|
+
Parameters
|
|
434
|
+
----------
|
|
435
|
+
x,y : ArrayLike or float
|
|
436
|
+
Datapoints
|
|
437
|
+
base: float, optional
|
|
438
|
+
Log basis, default 10
|
|
439
|
+
fmt: str, optional
|
|
440
|
+
Style
|
|
441
|
+
alpha: float, optional
|
|
442
|
+
Opacity
|
|
443
|
+
color or c: all matplotlib color formats (without X11/xkcd), optional
|
|
444
|
+
color of line and markers: RGB/RGBA (tuple), HEX (str), grayscale (float), single-char (str), name (str), default cycle ("CX", X int), none for invisible
|
|
445
|
+
label: str, optional
|
|
446
|
+
Legned entry
|
|
447
|
+
linestyle or ls: str, optional
|
|
448
|
+
Line style
|
|
449
|
+
linewidth or lw: float, optional
|
|
450
|
+
Line width in pt
|
|
451
|
+
|
|
452
|
+
marker: str, optional
|
|
453
|
+
Marker type
|
|
454
|
+
markersize or ms: float, optional
|
|
455
|
+
Mark size in pt
|
|
456
|
+
"""
|
|
457
|
+
...
|
|
458
|
+
def imshow(self, *args: Any, cmap: Optional[str] = ...) -> Tuple[Any, str, float, float]:
|
|
459
|
+
"""
|
|
460
|
+
Draw image to the selected axis from array. Uses matplotlib imshow() to export to PDF, then inputs the image to the axis. Return may be used to initialize Colorbar().
|
|
461
|
+
"""
|
|
462
|
+
...
|
|
463
|
+
|
|
464
|
+
def minorticks_num(self, num: int) -> None:
|
|
465
|
+
...
|
|
466
|
+
"""
|
|
467
|
+
Set number of minor ticks between major ticks.
|
|
468
|
+
|
|
469
|
+
Parameters
|
|
470
|
+
----------
|
|
471
|
+
num: int
|
|
472
|
+
Number of minor ticks between major ticks.
|
|
473
|
+
"""
|
|
295
474
|
|
|
296
475
|
def savefig(filename: str) -> None:
|
|
297
476
|
"""
|
|
@@ -311,4 +490,10 @@ def clf() -> None:
|
|
|
311
490
|
"""
|
|
312
491
|
Clear current figure.
|
|
313
492
|
"""
|
|
493
|
+
...
|
|
494
|
+
|
|
495
|
+
def gca() -> Axes:
|
|
496
|
+
"""
|
|
497
|
+
Get current axis.
|
|
498
|
+
"""
|
|
314
499
|
...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tikzplot42
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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
|
|
@@ -703,7 +703,7 @@ Dynamic: license-file
|
|
|
703
703
|
# TikzPlot
|
|
704
704
|
A clean version of PltToTikz, this time as Python package. Easy to use: only replace import matplotlib.pyplot with this library.
|
|
705
705
|
|
|
706
|
-
Please let me know if you find any bugs or unexpected behaviour.
|
|
706
|
+
Please let me know if you find any bugs or unexpected behaviour. Examples may be found in repository under `tests/` directory.
|
|
707
707
|
|
|
708
708
|
# Installation
|
|
709
709
|
NEW: PyPI: `pip install tikzplot42`.
|
|
@@ -713,13 +713,14 @@ Alternativley, download this package and install using: `pip install [path]`, wh
|
|
|
713
713
|
Instead of using `import matplotlib.pyplot (as plt)`, use `import tikzplot.plots (as plt)`.
|
|
714
714
|
|
|
715
715
|
## LaTeX requirements
|
|
716
|
-
- `\usepackage{tikz}
|
|
717
|
-
- `\usepackage{pgfplots}
|
|
718
|
-
- `\pgfplotsset{compat=1.18}`
|
|
716
|
+
- `\usepackage{tikz}`,
|
|
717
|
+
- `\usepackage{pgfplots}`,
|
|
718
|
+
- `\pgfplotsset{compat=1.18}` (may be lower, but compilation is not guaranteed),
|
|
719
719
|
- `\usepgfplotslibrary{fillbetween}` (if you use fill-between plots),
|
|
720
720
|
- `\usepgfplotslibrary{groupplots}` (recommended for best results, enabled by default, may be avoided by setting TikzConfig USE_GROUPPLOTS=False),
|
|
721
721
|
- `\usepackage{xcolor}` (recommended for best colors, works without but needs change of TikzConfig USE_XCOLOR=False).
|
|
722
722
|
|
|
723
|
+
Export using `plt.savefig("example_graph.tex")` (recommended) or `plt.show()`.
|
|
723
724
|
Then use the generated file as `\input{example_graph.tex}`.
|
|
724
725
|
|
|
725
726
|
## Currently implemented:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|