File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed
Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 1414import io
1515import pytest
1616
17- import random
18-
1917
2018@check_figures_equal ()
2119def test_log_scales (fig_test , fig_ref ):
@@ -60,21 +58,17 @@ def test_symlog_mask_nan():
6058def test_symlog_linthresh ():
6159 fig , ax = plt .subplots ()
6260
63- n_samples = 100
64-
65- upper_bound = 1.0
61+ np . random . seed ( 19680801 )
62+ x = np . random . random ( 100 )
63+ y = np . random . random ( 100 )
6664
67- x = [random .uniform (0.0 , upper_bound ) for _ in range (n_samples )]
68- y = [random .uniform (0.0 , upper_bound ) for _ in range (n_samples )]
65+ plt .plot (x , y , 'o' )
66+ ax .set_xscale ('symlog' )
67+ ax .set_yscale ('symlog' )
6968
70- with pytest .warns (UserWarning ) as record :
71- plt .plot (x , y , 'o' )
72- ax .set_xscale ('symlog' )
73- ax .set_yscale ('symlog' )
69+ with pytest .warns (UserWarning ):
7470 plt .show ()
7571
76- assert len (record ) == 1
77-
7872
7973@image_comparison (['logit_scales.png' ], remove_text = True )
8074def test_logit_scales ():
You can’t perform that action at this time.
0 commit comments