File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -4800,15 +4800,10 @@ def test_fillbetween_cycle():
4800
4800
4801
4801
4802
4802
@cleanup
4803
- def test_log_margins ():
4804
- plt .rcParams ['axes.autolimit_mode' ] = 'data'
4803
+ def test_color_length_mismatch ():
4804
+ N = 500
4805
+ x , y = np .random .rand (N ), np .random .rand (N )
4806
+ colors = np .random .rand (N + 1 )
4805
4807
fig , ax = plt .subplots ()
4806
- margin = 0.05
4807
- ax .set_xmargin (margin )
4808
- ax .semilogx ([1 , 10 ], [1 , 10 ])
4809
- xlim0 , xlim1 = ax .get_xlim ()
4810
- transform = ax .xaxis .get_transform ()
4811
- xlim0t , xlim1t = transform .transform ([xlim0 , xlim1 ])
4812
- x0t , x1t = transform .transform ([1 , 10 ])
4813
- delta = (x1t - x0t ) * margin
4814
- assert_allclose ([xlim0t + delta , xlim1t - delta ], [x0t , x1t ])
4808
+ with pytest .raises (ValueError ):
4809
+ ax .scatter (x , y , c = colors )
You can’t perform that action at this time.
0 commit comments