tikzplot42 0.2.8__tar.gz → 0.2.9__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 (41) hide show
  1. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/PKG-INFO +4 -4
  2. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/README.md +3 -3
  3. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/pyproject.toml +1 -1
  4. tikzplot42-0.2.9/src/tikzplot/__init__.py +5 -0
  5. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/axes.pyi +3 -1
  6. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/colorbar.pyi +4 -4
  7. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/config.pyi +2 -0
  8. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/plots.pyi +187 -2
  9. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot42.egg-info/PKG-INFO +4 -4
  10. tikzplot42-0.2.8/src/tikzplot/__init__.py +0 -5
  11. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/LICENSE +0 -0
  12. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/setup.cfg +0 -0
  13. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/__init__.pyi +0 -0
  14. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/axes.py +0 -0
  15. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/axes3d.py +0 -0
  16. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/colorbar.py +0 -0
  17. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/colors.py +0 -0
  18. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/colors.pyi +0 -0
  19. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/config.py +0 -0
  20. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/elements.py +0 -0
  21. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/elements.pyi +0 -0
  22. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/figure.py +0 -0
  23. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/figure.pyi +0 -0
  24. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/latex_special.py +0 -0
  25. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/plots.py +0 -0
  26. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/py.typed +0 -0
  27. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/state.py +0 -0
  28. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot/state.pyi +0 -0
  29. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot42.egg-info/SOURCES.txt +0 -0
  30. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot42.egg-info/dependency_links.txt +0 -0
  31. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot42.egg-info/requires.txt +0 -0
  32. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/src/tikzplot42.egg-info/top_level.txt +0 -0
  33. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test1.py +0 -0
  34. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test2.py +0 -0
  35. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test3.py +0 -0
  36. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test4.py +0 -0
  37. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test5.py +0 -0
  38. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test6.py +0 -0
  39. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test7.py +0 -0
  40. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test8.py +0 -0
  41. {tikzplot42-0.2.8 → tikzplot42-0.2.9}/tests/test9.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tikzplot42
3
- Version: 0.2.8
3
+ Version: 0.2.9
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
@@ -713,9 +713,9 @@ 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).
@@ -11,9 +11,9 @@ 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).
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tikzplot42"
7
- version = "0.2.8"
7
+ version = "0.2.9"
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" }
@@ -0,0 +1,5 @@
1
+ from . import plots, figure, axes, axes3d
2
+ from .config import TikzConfig
3
+ from .colorbar import Colorbar
4
+
5
+ __all__ = ["plots", "figure", "axes", "axes3d", "TikzConfig", "Colorbar"]
@@ -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 set_minorticks_on(self, num: int) -> None:
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
@@ -20,6 +20,8 @@ class _ConfigParams(TypedDict, total=False):
20
20
  SEC_Y_LABEL_PADDING: float
21
21
  TITLE_PADDING: float
22
22
  X_LABEL_PADDING: float
23
+ XTICK_PADDING: float
24
+ YTICK_PADDING: float
23
25
 
24
26
  DEFAULT_WIDTH: float
25
27
  DEFAULT_HEIGHT: float
@@ -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
- # --- Output ---
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.2.8
3
+ Version: 0.2.9
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
@@ -713,9 +713,9 @@ 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).
@@ -1,5 +0,0 @@
1
- from . import plots
2
- from .config import TikzConfig
3
- from .colorbar import Colorbar
4
-
5
- __all__ = ["plots", "TikzConfig", "Colorbar"]
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