Nullclines
Nullcline2D
Nullcline2D
Class dedicated to 2 dimensions phase portraits. Useful where it is necessary to plot nulclines in a plot.
Integrated via method add_nullclines
in:
- PhasePortrait2D
Methods
- plot : Plots the nullclines.
Source code in phaseportrait/nullclines/nullclines.py
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
__init__(portrait, funcion, *, precision=0.01, xprecision=None, yprecision=None, show=None, offset=0, density=50, xRange=None, yRange=None, dF_args=None, xcolor='r', ycolor='b', bgcolor='w', alpha=0, polar=False)
Creates an instance of Nullcline2D
Parameters:
Name | Type | Description | Default |
---|---|---|---|
portrait |
Object)
|
The class that uses Nullcline2D |
required |
funcion |
callable)
|
A |
required |
precision |
float, optional)
|
The minimum diferencie from |
0.01
|
xprecision |
float, optional)
|
For a different precision value only in the x axis, by default |
None
|
yprecision |
float, optional)
|
For a different precision value only in the y axis, by default |
None
|
show |
Literal['x', 'y', None], optinal)
|
Used to show only x or y nullclines, both if None, by default None |
None
|
offset |
float, optional)
|
If you want, for instance, a twoclide, by default 0 |
0
|
density |
int, optional)
|
Number of inner divisions on the x axis and y axis, by default 50 |
50
|
xRange |
Union[float,list], optional)
|
The range in which the nullclines are calculated, by default |
None
|
yRange |
Union[float,list], optional)
|
The range in which the nullclines are calculated, by default |
None
|
dF_args |
dict, optional)
|
If necesary, must contain the kargs for the |
None
|
xcolor |
str, optional)
|
X nullcline color, by default 'r' |
'r'
|
ycolor |
str, optional)
|
Y nullcline color], by default 'b' |
'b'
|
bgcolor |
str, optional)
|
Background color, by default 'w' |
'w'
|
alpha |
int, optional)
|
Opacity of the background, by default 0 |
0
|
polar |
bool, optional)
|
If the dF funcion requires polar coordinates, by default False |
False
|
Source code in phaseportrait/nullclines/nullclines.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
plot(*, axis=None)
Plots the nullclines in the given axis
Parameters:
Name | Type | Description | Default |
---|---|---|---|
axis |
matplotlib.Axis, optional)
|
The axis in which the nullclines will be represented, by default |
None
|
Returns:
Type | Description |
---|---|
matplotlib.contour.QuadContourSet, matplotlib.contour.QuadContourSet
|
X and Y contours. |
Source code in phaseportrait/nullclines/nullclines.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|