Skip to content

Commit d99ce15

Browse files
author
Matthias Koeppe
committed
sage -fixdoctests src/sage/plot
1 parent c7d62f2 commit d99ce15

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

src/sage/plot/graphics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1799,7 +1799,7 @@ def show(self, **kwds):
17991799
18001800
::
18011801
1802-
sage: G.show(scale='semilogy', base=(3,2)) # base ignored for x-axis # needs sage.symbolic
1802+
sage: G.show(scale='semilogy', base=(3,2)) # base ignored for x-axis # needs sage.symbolic
18031803
18041804
The scale can be also given as a 2-tuple or a 3-tuple.::
18051805

src/sage/plot/histogram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ def histogram(datalist, **options):
274274
275275
sage: nv = normalvariate
276276
sage: H = histogram([nv(0, 1) for _ in range(1000)], bins=20, density=True, range=[-5, 5])
277-
sage: P = plot(1/sqrt(2*pi)*e^(-x^2/2), (x, -5, 5), color='red', linestyle='--') # needs sage.symbolic
278-
sage: H + P # needs sage.symbolic
277+
sage: P = plot(1/sqrt(2*pi)*e^(-x^2/2), (x, -5, 5), color='red', linestyle='--') # needs sage.symbolic
278+
sage: H + P # needs sage.symbolic
279279
Graphics object consisting of 2 graphics primitives
280280
281281
.. PLOT::

src/sage/plot/plot3d/transform.pyx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,11 @@ def rotate_arbitrary(v, double theta):
174174
175175
sage: rotate_arbitrary((1,2,3), -1).det()
176176
1.0000000000000002
177-
sage: rotate_arbitrary((1,1,1), 2*pi/3) * vector(RDF, (1,2,3)) # rel tol 2e-15 # needs sage.symbolic
177+
sage: rotate_arbitrary((1,1,1), 2*pi/3) * vector(RDF, (1,2,3)) # rel tol 2e-15 # needs sage.symbolic
178178
(1.9999999999999996, 2.9999999999999996, 0.9999999999999999)
179179
sage: rotate_arbitrary((1,2,3), 5) * vector(RDF, (1,2,3)) # rel tol 2e-15
180180
(1.0000000000000002, 2.0, 3.000000000000001)
181-
sage: rotate_arbitrary((1,1,1), pi/7)^7 # rel tol 2e-15 # needs sage.symbolic
181+
sage: rotate_arbitrary((1,1,1), pi/7)^7 # rel tol 2e-15 # needs sage.symbolic
182182
[-0.33333333333333337 0.6666666666666671 0.6666666666666665]
183183
[ 0.6666666666666665 -0.33333333333333337 0.6666666666666671]
184184
[ 0.6666666666666671 0.6666666666666667 -0.33333333333333326]
@@ -194,7 +194,7 @@ def rotate_arbitrary(v, double theta):
194194
195195
Setup some variables::
196196
197-
sage: vx,vy,vz,theta = var('x y z theta') # needs sage.symbolic
197+
sage: vx,vy,vz,theta = var('x y z theta') # needs sage.symbolic
198198
199199
Symbolic rotation matrices about X and Y axis::
200200
@@ -205,32 +205,32 @@ def rotate_arbitrary(v, double theta):
205205
way to tell Maxima that `x^2+y^2+z^2=1` which would make for
206206
a much cleaner calculation::
207207
208-
sage: vy = sqrt(1-vx^2-vz^2) # needs sage.symbolic
208+
sage: vy = sqrt(1-vx^2-vz^2) # needs sage.symbolic
209209
210210
Now we rotate about the `x`-axis so `v` is in the `xy`-plane::
211211
212-
sage: t = arctan(vy/vz)+pi/2 # needs sage.symbolic
213-
sage: m = rotX(t) # needs sage.symbolic
214-
sage: new_y = vy*cos(t) - vz*sin(t) # needs sage.symbolic
212+
sage: t = arctan(vy/vz)+pi/2 # needs sage.symbolic
213+
sage: m = rotX(t) # needs sage.symbolic
214+
sage: new_y = vy*cos(t) - vz*sin(t) # needs sage.symbolic
215215
216216
And rotate about the `z` axis so `v` lies on the `x` axis::
217217
218-
sage: s = arctan(vx/new_y) + pi/2 # needs sage.symbolic
219-
sage: m = rotZ(s) * m # needs sage.symbolic
218+
sage: s = arctan(vx/new_y) + pi/2 # needs sage.symbolic
219+
sage: m = rotZ(s) * m # needs sage.symbolic
220220
221221
Rotating about `v` in our old system is the same as rotating
222222
about the `x`-axis in the new::
223223
224-
sage: m = rotX(theta) * m # needs sage.symbolic
224+
sage: m = rotX(theta) * m # needs sage.symbolic
225225
226226
Do some simplifying here to avoid blow-up::
227227
228-
sage: m = m.simplify_rational() # needs sage.symbolic
228+
sage: m = m.simplify_rational() # needs sage.symbolic
229229
230230
Now go back to the original coordinate system::
231231
232-
sage: m = rotZ(-s) * m # needs sage.symbolic
233-
sage: m = rotX(-t) * m # needs sage.symbolic
232+
sage: m = rotZ(-s) * m # needs sage.symbolic
233+
sage: m = rotX(-t) * m # needs sage.symbolic
234234
235235
And simplify every single entry (which is more effective that simplify
236236
the whole matrix like above)::

0 commit comments

Comments
 (0)