@@ -22,12 +22,13 @@ def test_recursive_cleanfigure():
22
22
23
23
def test_pruneOutsideBox ():
24
24
"""test against matlab2tikz implementation
25
-
26
- octave code to generate baseline results. Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
25
+
26
+ octave code to generate baseline results.
27
+ Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
27
28
```octave
28
29
x = linspace(1, 100, 20);
29
30
y1 = linspace(1, 100, 20);
30
-
31
+
31
32
figure
32
33
plot(x, y1)
33
34
xlim([20, 80])
@@ -50,13 +51,14 @@ def test_pruneOutsideBox():
50
51
51
52
52
53
def test_replaceDataWithNaN ():
53
- """test against matlab2tikz implementation
54
-
55
- octave code to generate baseline results. Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
54
+ """test against matlab2tikz implementation.
55
+
56
+ octave code to generate baseline results.
57
+ Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
56
58
```octave
57
59
x = linspace(1, 100, 20);
58
60
y1 = linspace(1, 100, 20);
59
-
61
+
60
62
figure
61
63
plot(x, y1)
62
64
xlim([20, 80])
@@ -83,13 +85,14 @@ def test_replaceDataWithNaN():
83
85
84
86
85
87
def test_removeData ():
86
- """test against matlab2tikz implementation
87
-
88
- octave code to generate baseline results. Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
88
+ """test against matlab2tikz implementation.
89
+
90
+ octave code to generate baseline results.
91
+ Note that octave has indexing 1...N, whereas python has indexing 0...N-1.
89
92
```octave
90
93
x = linspace(1, 100, 20);
91
94
y1 = linspace(1, 100, 20);
92
-
95
+
93
96
figure
94
97
plot(x, y1)
95
98
xlim([20, 80])
@@ -102,7 +105,6 @@ def test_removeData():
102
105
id_remove = np .array ([1 , 2 , 3 , 17 , 18 , 19 ])
103
106
xData = np .linspace (1 , 100 , 20 )
104
107
yData = xData .copy ()
105
- data = np .stack ([xData , yData ], axis = 1 )
106
108
107
109
with plt .rc_context (rc = RC_PARAMS ):
108
110
fig , ax = plt .subplots (1 , 1 , figsize = (5 , 5 ))
@@ -134,7 +136,6 @@ def test_removeNaNs():
134
136
id_remove = np .array ([1 , 2 , 3 , 17 , 18 , 19 ])
135
137
xData = np .linspace (1 , 100 , 20 )
136
138
yData = xData .copy ()
137
- data = np .stack ([xData , yData ], axis = 1 )
138
139
139
140
with plt .rc_context (rc = RC_PARAMS ):
140
141
fig , ax = plt .subplots (1 , 1 , figsize = (5 , 5 ))
@@ -178,10 +179,10 @@ def test_getVisualLimits():
178
179
"""octave code
179
180
```octave
180
181
addpath ("../matlab2tikz/src")
181
-
182
+
182
183
x = linspace(1, 100, 20);
183
184
y1 = linspace(1, 100, 20);
184
-
185
+
185
186
figure
186
187
plot(x, y1)
187
188
xlim([20, 80])
@@ -210,10 +211,10 @@ def test_movePointsCloser():
210
211
"""octave code
211
212
```octave
212
213
addpath ("../matlab2tikz/src")
213
-
214
+
214
215
x = linspace(1, 100, 20);
215
216
y1 = linspace(1, 100, 20);
216
-
217
+
217
218
figure
218
219
plot(x, y1)
219
220
xlim([20, 80])
@@ -491,7 +492,6 @@ def test_hist(self):
491
492
492
493
def test_plot3d (self ):
493
494
""" """
494
- from mpl_toolkits .mplot3d import Axes3D
495
495
496
496
theta = np .linspace (- 4 * np .pi , 4 * np .pi , 100 )
497
497
z = np .linspace (- 2 , 2 , 100 )
@@ -519,7 +519,6 @@ def test_plot3d(self):
519
519
520
520
def test_scatter3d (self ):
521
521
""" """
522
- from mpl_toolkits .mplot3d import Axes3D
523
522
524
523
x , y = np .meshgrid (np .linspace (1 , 100 , 20 ), np .linspace (1 , 100 , 20 ))
525
524
z = np .abs (x - 50 ) + np .abs (y - 50 )
@@ -552,7 +551,6 @@ def test_wireframe3D(self):
552
551
553
552
def test_surface3D (self ):
554
553
""" """
555
- from mpl_toolkits .mplot3d import Axes3D
556
554
from matplotlib import cm
557
555
from matplotlib .ticker import LinearLocator , FormatStrFormatter
558
556
@@ -589,7 +587,6 @@ def test_trisurface3D(Self):
589
587
:param Self:
590
588
591
589
"""
592
- from mpl_toolkits .mplot3d import Axes3D
593
590
import matplotlib .pyplot as plt
594
591
import numpy as np
595
592
@@ -636,7 +633,6 @@ def test_contour3D(self):
636
633
637
634
def test_polygon3D (self ):
638
635
""" """
639
- from mpl_toolkits .mplot3d import Axes3D
640
636
from matplotlib .collections import PolyCollection
641
637
from matplotlib import colors as mcolors
642
638
@@ -677,7 +673,6 @@ def cc(arg):
677
673
678
674
def test_bar3D (self ):
679
675
""" """
680
- from mpl_toolkits .mplot3d import Axes3D
681
676
import matplotlib .pyplot as plt
682
677
import numpy as np
683
678
@@ -702,7 +697,6 @@ def test_bar3D(self):
702
697
703
698
def test_quiver3D (self ):
704
699
""" """
705
- from mpl_toolkits .mplot3d import axes3d
706
700
import matplotlib .pyplot as plt
707
701
import numpy as np
708
702
@@ -733,7 +727,6 @@ def test_quiver3D(self):
733
727
734
728
def test_2D_in_3D (self ):
735
729
""" """
736
- from mpl_toolkits .mplot3d import Axes3D
737
730
import numpy as np
738
731
import matplotlib .pyplot as plt
739
732
0 commit comments