@@ -33,45 +33,6 @@ def test_plot(self):
33
33
assert numLinesRaw - numLinesClean == 18
34
34
plt .close ("all" )
35
35
36
- def test_logplot (self ):
37
- x = np .logspace (- 3 , 3 , 20 )
38
- y = np .logspace (- 3 , 3 , 20 )
39
-
40
- with plt .rc_context (rc = RC_PARAMS ):
41
- fig , ax = plt .subplots (1 , 1 , figsize = (5 , 5 ))
42
- ax .plot (x , y )
43
- ax .set_xscale ("log" )
44
- ax .set_yscale ("log" )
45
- ax .set_ylim ([10 ** (- 2 ), 10 ** (2 )])
46
- ax .set_xlim ([10 ** (- 2 ), 10 ** (2 )])
47
- raw = get_tikz_code ()
48
-
49
- clean_figure (fig )
50
- clean = get_tikz_code ()
51
- numLinesRaw = raw .count ("\n " )
52
- numLinesClean = clean .count ("\n " )
53
- assert numLinesRaw - numLinesClean == 11
54
- plt .close ("all" )
55
-
56
- def test_semilogplot (self ):
57
- x = np .logspace (- 3 , 3 , 20 )
58
- y = np .linspace (1 , 100 , 20 )
59
-
60
- with plt .rc_context (rc = RC_PARAMS ):
61
- fig , ax = plt .subplots (1 , 1 , figsize = (5 , 5 ))
62
- ax .plot (x , y )
63
- ax .set_xscale ("log" )
64
- ax .set_xlim ([10 ** (- 2 ), 10 ** (2 )])
65
- ax .set_ylim ([20 , 80 ])
66
- raw = get_tikz_code ()
67
-
68
- clean_figure (fig )
69
- clean = get_tikz_code ()
70
- numLinesRaw = raw .count ("\n " )
71
- numLinesClean = clean .count ("\n " )
72
- assert numLinesRaw - numLinesClean == 6
73
- plt .close ("all" )
74
-
75
36
def test_step (self ):
76
37
x = np .linspace (1 , 100 , 20 )
77
38
y = np .linspace (1 , 100 , 20 )
@@ -664,6 +625,45 @@ def test_loglog_2(self):
664
625
assert numLinesClean == 27
665
626
plt .close ("all" )
666
627
628
+ def test_loglog_3 (self ):
629
+ x = np .logspace (- 3 , 3 , 20 )
630
+ y = np .logspace (- 3 , 3 , 20 )
631
+
632
+ with plt .rc_context (rc = RC_PARAMS ):
633
+ fig , ax = plt .subplots (1 , 1 , figsize = (5 , 5 ))
634
+ ax .plot (x , y )
635
+ ax .set_xscale ("log" )
636
+ ax .set_yscale ("log" )
637
+ ax .set_ylim ([10 ** (- 2 ), 10 ** (2 )])
638
+ ax .set_xlim ([10 ** (- 2 ), 10 ** (2 )])
639
+ raw = get_tikz_code ()
640
+
641
+ clean_figure (fig )
642
+ clean = get_tikz_code ()
643
+ numLinesRaw = raw .count ("\n " )
644
+ numLinesClean = clean .count ("\n " )
645
+ assert numLinesRaw - numLinesClean == 18
646
+ plt .close ("all" )
647
+
648
+ def test_xlog_3 (self ):
649
+ x = np .logspace (- 3 , 3 , 20 )
650
+ y = np .linspace (1 , 100 , 20 )
651
+
652
+ with plt .rc_context (rc = RC_PARAMS ):
653
+ fig , ax = plt .subplots (1 , 1 , figsize = (5 , 5 ))
654
+ ax .plot (x , y )
655
+ ax .set_xscale ("log" )
656
+ ax .set_xlim ([10 ** (- 2 ), 10 ** (2 )])
657
+ ax .set_ylim ([20 , 80 ])
658
+ raw = get_tikz_code ()
659
+
660
+ clean_figure (fig )
661
+ clean = get_tikz_code ()
662
+ numLinesRaw = raw .count ("\n " )
663
+ numLinesClean = clean .count ("\n " )
664
+ assert numLinesRaw - numLinesClean == 18
665
+ plt .close ("all" )
666
+
667
667
668
668
def test_memory ():
669
669
plt .plot (np .arange (100000 ))
0 commit comments