Skip to content

Commit 10cc196

Browse files
committed
fix doctest
1 parent 0c2f24c commit 10cc196

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

spb/graphics/functions_3d.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,9 @@ def implicit_3d(
859859
.. k3d-screenshot::
860860
:camera: 10.29, -15.33, -9.3, 0, 0, 0, 0.28, -0.41, 0.87
861861
862+
from sympy import *
863+
from spb import *
864+
var("x:z")
862865
graphics(
863866
implicit_3d(x*y*z < 1, (x, -5, 5), (y, -5, 5), (z, -5, 5), n=150),
864867
backend=KB
@@ -867,6 +870,9 @@ def implicit_3d(
867870
.. k3d-screenshot::
868871
:camera: -5.2, -1.86, 2.06, 0, 0.87, 0, 0.23, 0.16, 0.96
869872
873+
from sympy import *
874+
from spb import *
875+
var("x:z")
870876
graphics(
871877
implicit_3d(
872878
(x**2 + y**2 + z**2 >= 1) & (x**2 + y**2 + z**2 <= 3) & (y >= 0),

spb/plot_functions/functions_2d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def plot_parametric(*args, **kwargs):
430430
:include-source: True
431431
432432
>>> from sympy import symbols, cos, sin, pi, floor, log
433-
>>> from spb import plot_parametric
433+
>>> from spb import plot_parametric, multiples_of_pi
434434
>>> t, u, v = symbols('t, u, v')
435435
436436
A parametric plot of a single expression (a Hypotrochoid using an equal

spb/plot_functions/functions_3d.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def plot3d_parametric_line(*args, **kwargs):
110110
... 3 * sin(t) + 2 * sin(3 * t), cos(t) - 2 * cos(3 * t), cos(5 * t),
111111
... (t, 0, 2 * pi), "t [rad]", {"cmap": "hsv", "lw": 1.5},
112112
... aspect="equal",
113-
... colorbar_ticks_formatter=multiples_of_pi_over_2()))
113+
... colorbar_ticks_formatter=multiples_of_pi_over_2())
114114
Plot object containing:
115115
[0]: 3D parametric cartesian line: (3*sin(t) + 2*sin(3*t), cos(t) - 2*cos(3*t), cos(5*t)) for t over (0, 2*pi)
116116
@@ -787,6 +787,9 @@ def plot3d_implicit(*args, **kwargs):
787787
.. k3d-screenshot::
788788
:camera: 10.29, -15.33, -9.3, 0, 0, 0, 0.28, -0.41, 0.87
789789
790+
from sympy import *
791+
from spb import *
792+
var("x:z")
790793
plot3d_implicit(
791794
x*y*z < 1, (x, -5, 5), (y, -5, 5), (z, -5, 5),
792795
n=150, backend=KB
@@ -795,6 +798,9 @@ def plot3d_implicit(*args, **kwargs):
795798
.. k3d-screenshot::
796799
:camera: -5.2, -1.86, 2.06, 0, 0.87, 0, 0.23, 0.16, 0.96
797800
801+
from sympy import *
802+
from spb import *
803+
var("x:z")
798804
plot3d_implicit(
799805
(x**2 + y**2 + z**2 >= 1) & (x**2 + y**2 + z**2 <= 3) & (y >= 0),
800806
(x, -2, 2), (y, -2, 2), (z, -2, 2),

0 commit comments

Comments
 (0)