tikzplot42 0.5.2__tar.gz → 0.5.4__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.4}/PKG-INFO +12 -2
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/README.md +11 -1
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/pyproject.toml +1 -1
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/axes.py +14 -12
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/axes.pyi +22 -19
- tikzplot42-0.5.4/src/tikzplot/axes3d.py +1273 -0
- tikzplot42-0.5.4/src/tikzplot/axes3d.pyi +582 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/colorbar.py +1 -1
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/colors.py +64 -6
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/config.py +2 -2
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/elements.py +144 -11
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/figure.py +18 -5
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/figure.pyi +33 -4
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/plots.py +5 -4
- {tikzplot42-0.5.2 → tikzplot42-0.5.4/src/tikzplot42.egg-info}/PKG-INFO +12 -2
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot42.egg-info/SOURCES.txt +2 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test11.py +1 -1
- tikzplot42-0.5.4/tests/test17.py +40 -0
- tikzplot42-0.5.4/tests/test18.py +24 -0
- tikzplot42-0.5.2/src/tikzplot/axes3d.py +0 -591
- tikzplot42-0.5.2/src/tikzplot/axes3d.pyi +0 -43
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/LICENSE +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/setup.cfg +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/__init__.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/__init__.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/colorbar.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/config.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/elements.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/latex_special.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/plots.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/py.typed +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/state.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/styles.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/styles.pyi +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot/texts.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot42.egg-info/dependency_links.txt +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot42.egg-info/requires.txt +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/src/tikzplot42.egg-info/top_level.txt +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test1.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test10.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test12.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test13.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test14.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test15.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test16.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test2.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test3.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test4.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test5.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test6.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test7.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/tests/test8.py +0 -0
- {tikzplot42-0.5.2 → tikzplot42-0.5.4}/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.4
|
|
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
|
|
@@ -761,6 +761,16 @@ Some basic plot commands are already implemented with commonly used arguments:
|
|
|
761
761
|
- `axvline()/axhline()`,
|
|
762
762
|
- `axvspan()/axhspan()` (background span).
|
|
763
763
|
|
|
764
|
+
#### 3D plotting
|
|
765
|
+
- `plot()`,
|
|
766
|
+
- `scatter()`,
|
|
767
|
+
- `errorbar()`,
|
|
768
|
+
- `fill_between()`,
|
|
769
|
+
- `plot_wireframe()`,
|
|
770
|
+
- `plot_surface()`,
|
|
771
|
+
- `bar3d()`,
|
|
772
|
+
- `text()`.
|
|
773
|
+
|
|
764
774
|
#### Figures
|
|
765
775
|
- `plt.figure()` (currently only to give you figure object or to set `figsize`),
|
|
766
776
|
- `plt.subplot()`, `plt.subplots()` (with `sharex/sharey` fully implemented, projection `polar` and `3d` with basic support),
|
|
@@ -806,5 +816,5 @@ Currently supported parameters are listed with their default values in `src/tikz
|
|
|
806
816
|
|
|
807
817
|
## More features coming soon...
|
|
808
818
|
- additional arguments support for implemented commands,
|
|
809
|
-
- improved 3D
|
|
819
|
+
- improved 3D and polar plots,
|
|
810
820
|
- ...
|
|
@@ -62,6 +62,16 @@ Some basic plot commands are already implemented with commonly used arguments:
|
|
|
62
62
|
- `axvline()/axhline()`,
|
|
63
63
|
- `axvspan()/axhspan()` (background span).
|
|
64
64
|
|
|
65
|
+
#### 3D plotting
|
|
66
|
+
- `plot()`,
|
|
67
|
+
- `scatter()`,
|
|
68
|
+
- `errorbar()`,
|
|
69
|
+
- `fill_between()`,
|
|
70
|
+
- `plot_wireframe()`,
|
|
71
|
+
- `plot_surface()`,
|
|
72
|
+
- `bar3d()`,
|
|
73
|
+
- `text()`.
|
|
74
|
+
|
|
65
75
|
#### Figures
|
|
66
76
|
- `plt.figure()` (currently only to give you figure object or to set `figsize`),
|
|
67
77
|
- `plt.subplot()`, `plt.subplots()` (with `sharex/sharey` fully implemented, projection `polar` and `3d` with basic support),
|
|
@@ -107,5 +117,5 @@ Currently supported parameters are listed with their default values in `src/tikz
|
|
|
107
117
|
|
|
108
118
|
## More features coming soon...
|
|
109
119
|
- additional arguments support for implemented commands,
|
|
110
|
-
- improved 3D
|
|
120
|
+
- improved 3D and polar plots,
|
|
111
121
|
- ...
|
|
@@ -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.4"
|
|
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" }
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
from multiprocessing import parent_process
|
|
2
1
|
from typing import Any, Iterable
|
|
3
2
|
import copy
|
|
4
3
|
|
|
5
4
|
import numpy as _np
|
|
6
5
|
import matplotlib.pyplot as _plt
|
|
7
|
-
from scipy import datasets
|
|
8
6
|
|
|
9
7
|
from .elements import Graph
|
|
10
8
|
from .texts import Text
|
|
@@ -412,7 +410,7 @@ class BaseAxes:
|
|
|
412
410
|
except (ValueError, TypeError):
|
|
413
411
|
x_arr = _np.asarray(x)
|
|
414
412
|
if x_arr.ndim == 2:
|
|
415
|
-
datasets = [
|
|
413
|
+
datasets = [col for col in x_arr.T]
|
|
416
414
|
else:
|
|
417
415
|
raise ValueError("Invalid dataset structure.")
|
|
418
416
|
else:
|
|
@@ -420,7 +418,7 @@ class BaseAxes:
|
|
|
420
418
|
if x_arr.ndim == 1:
|
|
421
419
|
datasets = [x_arr]
|
|
422
420
|
elif x_arr.ndim == 2:
|
|
423
|
-
datasets = [
|
|
421
|
+
datasets = [col for col in x_arr.T]
|
|
424
422
|
else:
|
|
425
423
|
raise ValueError(f"Input must be 1D or 2D, got {x_arr.ndim}D.")
|
|
426
424
|
|
|
@@ -582,7 +580,7 @@ class BaseAxes:
|
|
|
582
580
|
except (ValueError, TypeError):
|
|
583
581
|
h_arr = _np.asarray(heights)
|
|
584
582
|
if h_arr.ndim == 2:
|
|
585
|
-
datasets = [
|
|
583
|
+
datasets = [col for col in h_arr.T]
|
|
586
584
|
else:
|
|
587
585
|
raise ValueError("Invalid dataset structure.")
|
|
588
586
|
else:
|
|
@@ -590,12 +588,12 @@ class BaseAxes:
|
|
|
590
588
|
if h_arr.ndim == 1:
|
|
591
589
|
datasets = [h_arr]
|
|
592
590
|
elif h_arr.ndim == 2:
|
|
593
|
-
datasets = [
|
|
591
|
+
datasets = [col for col in h_arr.T]
|
|
594
592
|
else:
|
|
595
593
|
raise ValueError(f"Input must be 1D or 2D, got {h_arr.ndim}D.")
|
|
596
594
|
|
|
597
|
-
xs = kwargs.pop("positions", range(len(datasets
|
|
598
|
-
if len(xs) != len(datasets
|
|
595
|
+
xs = kwargs.pop("positions", range(len(datasets)))
|
|
596
|
+
if len(xs) != len(datasets):
|
|
599
597
|
raise Warning("Length of positions does not match length of datasets.")
|
|
600
598
|
if _np.diff(xs).min() != _np.diff(xs).max():
|
|
601
599
|
raise Warning("Positions must be equidistant.")
|
|
@@ -1083,10 +1081,6 @@ class BaseAxes:
|
|
|
1083
1081
|
Y_INV = {v: k for k, v in Y_POS_MAP.items()}
|
|
1084
1082
|
self._axis_options["xtick pos"] = X_INV[(xt_t, xt_b)]
|
|
1085
1083
|
self._axis_options["ytick pos"] = Y_INV[(yt_l, yt_r)]
|
|
1086
|
-
if self._axis_options["xtick pos"] == "both":
|
|
1087
|
-
self._axis_options.pop("xtick pos")
|
|
1088
|
-
if self._axis_options["ytick pos"] == "both":
|
|
1089
|
-
self._axis_options.pop("ytick pos")
|
|
1090
1084
|
if "colors" in kwargs:
|
|
1091
1085
|
c = self._match_color(kwargs.pop("colors"))
|
|
1092
1086
|
self._update_axis_options(prefix + " tick style", {"draw": c})
|
|
@@ -1106,6 +1100,14 @@ class BaseAxes:
|
|
|
1106
1100
|
raise Warning(f"Invalid direction: {direction}. Must be one of 'in', 'out', or 'inout'.")
|
|
1107
1101
|
TICK_DIR_MAP = {"in": "inside", "out": "outside", "inout": "center"}
|
|
1108
1102
|
self._update_axis_options(prefix + "tick align", TICK_DIR_MAP[direction])
|
|
1103
|
+
if self._axis_options["xtick pos"] == "both":
|
|
1104
|
+
self._axis_options.pop("xtick pos")
|
|
1105
|
+
elif self._axis_options["xtick pos"] == "none":
|
|
1106
|
+
self._update_axis_options("xtick style", {"draw": self._axis_options.pop("xtick pos")})
|
|
1107
|
+
if self._axis_options["ytick pos"] == "both":
|
|
1108
|
+
self._axis_options.pop("ytick pos")
|
|
1109
|
+
elif self._axis_options["ytick pos"] == "none":
|
|
1110
|
+
self._update_axis_options("ytick style", {"draw": self._axis_options.pop("ytick pos")})
|
|
1109
1111
|
|
|
1110
1112
|
_LEGEND_LOC_MAP = ["best", "upper right", "upper left", "lower_left", "lower right", "right", "center left", "center right", "lower center", "upper center", "center"]
|
|
1111
1113
|
_ANCHOR_MAP = {"top": "north", "bottom": "south", "upper": "north", "lower": "south", "left": "west", "right": "east", "center": "center"}
|
|
@@ -12,7 +12,7 @@ HatchStyle = Literal["/", "\\", "|", "-", "+", "x", ".", "*"]
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class BaseAxes:
|
|
15
|
-
def plot(self, x: ArrayLike = ..., y: ArrayLike = ..., fmt: Optional[str] = ...,*, alpha:
|
|
15
|
+
def plot(self, x: ArrayLike = ..., y: ArrayLike = ..., fmt: Optional[str] = ...,*, alpha: float = 1.0, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
16
16
|
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
17
17
|
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ..., label:Optional[str]=...) -> Graph:
|
|
18
18
|
"""
|
|
@@ -49,7 +49,7 @@ class BaseAxes:
|
|
|
49
49
|
"""
|
|
50
50
|
...
|
|
51
51
|
|
|
52
|
-
def scatter(self, x: ArrayLike = ..., y: ArrayLike = ..., fmt: Optional[str] = ..., *,alpha:
|
|
52
|
+
def scatter(self, x: ArrayLike = ..., y: ArrayLike = ..., fmt: Optional[str] = ..., *,alpha: float = 1.0, color: Optional[Union[Sequence[ColorLike], ColorLike]] = ..., c: Optional[ColorLike] = ...,
|
|
53
53
|
marker: Optional[MarkerStyle] = ..., markersize: Optional[Union[ArrayLike, float]] = ..., s: Optional[Union[ArrayLike, float]] = ..., label:Optional[str]=..., cmap: Optional[Union[str, Colorbar]], vmin: Optional[float] = ..., vmax: Optional[float] = ...) -> Graph:
|
|
54
54
|
"""
|
|
55
55
|
Draw a scatter plot to the selected axis.
|
|
@@ -68,7 +68,6 @@ class BaseAxes:
|
|
|
68
68
|
color or c: array like or single: all matplotlib color formats (without X11/xkcd) or float for colormap, optional
|
|
69
69
|
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. Note that if the sequence if of the same length as x, it will be interpreted as color sequence for each point, otherwise it will be interpreted as a single color for all points.
|
|
70
70
|
|
|
71
|
-
|
|
72
71
|
label: str, optional
|
|
73
72
|
Legned entry
|
|
74
73
|
|
|
@@ -85,7 +84,7 @@ class BaseAxes:
|
|
|
85
84
|
Colorbar limits for scatter points, if color is given sequence of floats and cmap is given as string, otherwise ignored. If cmap is given as str and no vmin or vmax is provided, they will be set to the min and max of color sequence.
|
|
86
85
|
"""
|
|
87
86
|
...
|
|
88
|
-
def semilogy(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha:
|
|
87
|
+
def semilogy(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha: float = 1.0, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
89
88
|
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
90
89
|
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ..., label:Optional[str]=...) -> Graph:
|
|
91
90
|
"""
|
|
@@ -124,7 +123,7 @@ class BaseAxes:
|
|
|
124
123
|
Mark size in pt
|
|
125
124
|
"""
|
|
126
125
|
...
|
|
127
|
-
def errorbar(self, x: ArrayLike = ..., y: ArrayLike = ..., yerr: Optional[ArrayLike | float] = ..., xerr: Optional[ArrayLike | float] = ..., fmt: Optional[str] = ..., *, alpha:
|
|
126
|
+
def errorbar(self, x: ArrayLike = ..., y: ArrayLike = ..., yerr: Optional[ArrayLike | float] = ..., xerr: Optional[ArrayLike | float] = ..., fmt: Optional[str] = ..., *, alpha: float = 1.0, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
128
127
|
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
129
128
|
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ..., label: Optional[str]= ..., ecolor: Optional[ColorLike] = ..., elinewidth: Optional[float] = ..., capsize: Optional[float] = ..., elinestyle: Optional[LineStyle] = ...) -> Graph:
|
|
130
129
|
"""
|
|
@@ -202,7 +201,7 @@ class BaseAxes:
|
|
|
202
201
|
x: ArrayLike,
|
|
203
202
|
y1: ArrayLike,
|
|
204
203
|
y2: Optional[ArrayLike] = ...,
|
|
205
|
-
alpha:
|
|
204
|
+
alpha: float = 1.0,
|
|
206
205
|
color: Optional[ColorLike] = ...,
|
|
207
206
|
c: Optional[ColorLike] = ...,
|
|
208
207
|
label: Optional[str] = ...,
|
|
@@ -242,7 +241,7 @@ class BaseAxes:
|
|
|
242
241
|
"""
|
|
243
242
|
...
|
|
244
243
|
|
|
245
|
-
def text(self, x: float, y: float, s: str, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ..., fontsize: Optional[FontSize] = ...,
|
|
244
|
+
def text(self, x: float, y: float, s: str, alpha: float = 1, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ..., fontsize: Optional[FontSize] = ..., size: Optional[FontSize] = ..., backgroundcolor: Optional[ColorLike] = ..., horizontalalignment: Literal["left", "center", "right"] = "center", ha: Literal["left", "center", "right"] = "center", verticalalignment: Literal["bottom", "center", "top"] = "center", va: Literal["bottom", "center", "top"] = "center", rotation: float = 0, label: Optional[str] = ...) -> None:
|
|
246
245
|
"""
|
|
247
246
|
Add text to the selected axis.
|
|
248
247
|
|
|
@@ -306,7 +305,7 @@ class BaseAxes:
|
|
|
306
305
|
def hist(
|
|
307
306
|
self,
|
|
308
307
|
x: Union[ArrayLike, Sequence[ArrayLike]],
|
|
309
|
-
bins: int |
|
|
308
|
+
bins: int | ArrayLike = 10,
|
|
310
309
|
*,
|
|
311
310
|
weight: ArrayLike | None = None,
|
|
312
311
|
density: bool = False,
|
|
@@ -315,11 +314,12 @@ class BaseAxes:
|
|
|
315
314
|
orientation: Literal["horizontal","vertical"] = "vertical",
|
|
316
315
|
rwidth: float | None = None,
|
|
317
316
|
range: Tuple[float,float] | None = None,
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
317
|
+
alpha: float = 1.0,
|
|
318
|
+
color: ColorLike | Sequence[ColorLike] = ...,
|
|
319
|
+
facecolor: ColorLike | Sequence[ColorLike] = ...,
|
|
320
|
+
fc: ColorLike | Sequence[ColorLike] = ...,
|
|
321
|
+
edgecolor: ColorLike | Sequence[ColorLike] = ...,
|
|
322
|
+
ec: ColorLike | Sequence[ColorLike] = ...,
|
|
323
323
|
align: Literal["left", "mid", "right"] = ...,
|
|
324
324
|
stacked: bool = False,
|
|
325
325
|
fill: bool = True,
|
|
@@ -358,6 +358,9 @@ class BaseAxes:
|
|
|
358
358
|
range: tuple of float, optional
|
|
359
359
|
The lower and upper range of the bins. If not provided, the range is automatically determined from the data.
|
|
360
360
|
|
|
361
|
+
alpha: float, optional
|
|
362
|
+
Opacity between 0 and 1.
|
|
363
|
+
|
|
361
364
|
color, facecolor, fc, edgecolor, ec: ColorLike, optional
|
|
362
365
|
The color of the bars. Can be a single color or a sequence of colors for multiple datasets. If not provided, the default color cycle is used.
|
|
363
366
|
|
|
@@ -928,7 +931,7 @@ class BaseAxes:
|
|
|
928
931
|
Whether to draw ticks on the respective side of the axis, default True for all sides
|
|
929
932
|
"""
|
|
930
933
|
...
|
|
931
|
-
def legend(self, *args: Any, loc: Optional[Union[int,str,Tuple[float,float]]] = ..., facecolor: Optional[ColorLike] = ..., edgecolor: Optional[ColorLike] = ..., labelcolor: Optional[ColorLike] = ..., frameon: Optional[bool] = ..., anchor: Optional[Literal["north", "south", "east", "west", "center", "north west", "north east", "south west", "south east"]] = ..., fontsize: Optional[Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"] | int] =
|
|
934
|
+
def legend(self, *args: Any, loc: Optional[Union[int,str,Tuple[float,float]]] = ..., facecolor: Optional[ColorLike] = ..., edgecolor: Optional[ColorLike] = ..., labelcolor: Optional[ColorLike] = ..., frameon: Optional[bool] = ..., anchor: Optional[Literal["north", "south", "east", "west", "center", "north west", "north east", "south west", "south east"]] = ..., fontsize: Optional[Literal["xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large"] | int] = ..., ncols: Optional[int] = 1) -> None:
|
|
932
935
|
"""
|
|
933
936
|
Show legend for the selected axis. Despite arguments requires at least one plotted element on the axis (not necesarily with label) to show up (LaTeX does not allow legend on empty axis).
|
|
934
937
|
|
|
@@ -971,7 +974,7 @@ class BaseAxes:
|
|
|
971
974
|
|
|
972
975
|
class Axes(BaseAxes):
|
|
973
976
|
def __init__(self, nrows: int, ncols: int, index: int, fig: Any, pol: bool) -> None: ...
|
|
974
|
-
def loglog(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha:
|
|
977
|
+
def loglog(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha: float = 1.0, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
975
978
|
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
976
979
|
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ...) -> Graph:
|
|
977
980
|
"""
|
|
@@ -1010,7 +1013,7 @@ class Axes(BaseAxes):
|
|
|
1010
1013
|
Mark size in pt
|
|
1011
1014
|
"""
|
|
1012
1015
|
...
|
|
1013
|
-
def semilogx(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha:
|
|
1016
|
+
def semilogx(self, x: ArrayLike = ..., y: ArrayLike = ..., base: Optional[float] = 10, fmt: Optional[str] = ...,*, alpha: float = 1.0, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ...,
|
|
1014
1017
|
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...,
|
|
1015
1018
|
marker: Optional[MarkerStyle] = ..., markersize: Optional[float] = ..., ms: Optional[float] = ...) -> Graph:
|
|
1016
1019
|
"""
|
|
@@ -1092,8 +1095,7 @@ class Axes(BaseAxes):
|
|
|
1092
1095
|
Title location, default "center"
|
|
1093
1096
|
"""
|
|
1094
1097
|
...
|
|
1095
|
-
def grid(self, visible: bool = True, which: Literal["major","minor","both"] = "major", alpha:
|
|
1096
|
-
linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...) -> None:
|
|
1098
|
+
def grid(self, visible: bool = True, which: Literal["major","minor","both"] = "major", alpha: float = 1.0, color: Optional[ColorLike] = ..., c: Optional[ColorLike] = ..., linestyle: Optional[LineStyle] = ..., ls: Optional[LineStyle] = ..., linewidth: Optional[float]= ..., lw: Optional[float] = ...) -> None:
|
|
1097
1099
|
"""
|
|
1098
1100
|
Set grid.
|
|
1099
1101
|
|
|
@@ -1112,8 +1114,8 @@ class Axes(BaseAxes):
|
|
|
1112
1114
|
linewidth or lw: float, optional
|
|
1113
1115
|
Grid line width in pt
|
|
1114
1116
|
"""
|
|
1115
|
-
def set_minorticks_num(self, num: int) -> None:
|
|
1116
1117
|
...
|
|
1118
|
+
def set_minorticks_num(self, num: int) -> None:
|
|
1117
1119
|
"""
|
|
1118
1120
|
Set number of minor ticks between major ticks.
|
|
1119
1121
|
|
|
@@ -1122,6 +1124,7 @@ class Axes(BaseAxes):
|
|
|
1122
1124
|
num: int
|
|
1123
1125
|
Number of minor ticks between major ticks.
|
|
1124
1126
|
"""
|
|
1127
|
+
...
|
|
1125
1128
|
def set_xlim(self, *args: Any, left: Optional[float] = ..., right: Optional[float] = ...) -> None:
|
|
1126
1129
|
"""
|
|
1127
1130
|
Set x-axis limit(-s). Set as tuple or as kwargs (left, right).
|