@@ -2583,16 +2583,16 @@ def get_handles():
2583
2583
#### Specialized plotting
2584
2584
2585
2585
2586
- def bar (self , left , height , width = 0.8 , bottom = None ,
2586
+ def bar (self , left , height , width = 0.8 , bottom = 0 ,
2587
2587
color = None , edgecolor = None , linewidth = None ,
2588
2588
yerr = None , xerr = None , ecolor = None , capsize = 3 ,
2589
- align = 'edge' , orientation = 'vertical' , log = False
2589
+ align = 'edge' , orientation = 'vertical'
2590
2590
):
2591
2591
"""
2592
2592
BAR(left, height, width=0.8, bottom=0,
2593
2593
color=None, edgecolor=None, linewidth=None,
2594
2594
yerr=None, xerr=None, ecolor=None, capsize=3,
2595
- align='edge', orientation='vertical', log=False )
2595
+ align='edge', orientation='vertical')
2596
2596
2597
2597
Make a bar plot with rectangles bounded by
2598
2598
@@ -2631,9 +2631,6 @@ def bar(self, left, height, width=0.8, bottom=None,
2631
2631
2632
2632
orientation = 'vertical' | 'horizontal'
2633
2633
2634
- log = False | True - False (default) leaves the orientation
2635
- axis as-is; True sets it to log scale
2636
-
2637
2634
For vertical bars, 'edge' aligns bars by their left edges in left,
2638
2635
while 'center' interprets these values as the x coordinates
2639
2636
of the bar centers.
@@ -2657,41 +2654,21 @@ def make_iterable(x):
2657
2654
return x
2658
2655
2659
2656
# make them safe to take len() of
2660
- _left = left
2661
2657
left = make_iterable (left )
2662
2658
height = make_iterable (height )
2663
2659
width = make_iterable (width )
2664
- _bottom = bottom
2665
2660
bottom = make_iterable (bottom )
2666
2661
linewidth = make_iterable (linewidth )
2667
2662
2668
- adjust_ylim = False
2669
- adjust_xlim = False
2670
2663
if orientation == 'vertical' :
2671
- if log :
2672
- self .set_yscale ('log' )
2673
2664
# size width and bottom according to length of left
2674
- if _bottom is None :
2675
- if self .get_yscale () == 'log' :
2676
- bottom = [1e-100 ]
2677
- adjust_ylim = True
2678
- else :
2679
- bottom = [0 ]
2680
2665
nbars = len (left )
2681
2666
if len (width ) == 1 :
2682
2667
width *= nbars
2683
2668
if len (bottom ) == 1 :
2684
2669
bottom *= nbars
2685
2670
elif orientation == 'horizontal' :
2686
- if log :
2687
- self .set_xscale ('log' )
2688
2671
# size left and height according to length of bottom
2689
- if _left is None :
2690
- if self .get_xscale () == 'log' :
2691
- left = [1e-100 ]
2692
- adjust_xlim = True
2693
- else :
2694
- left = [0 ]
2695
2672
nbars = len (bottom )
2696
2673
if len (left ) == 1 :
2697
2674
left *= nbars
@@ -2783,25 +2760,11 @@ def make_iterable(x):
2783
2760
2784
2761
self .hold (holdstate ) # restore previous hold state
2785
2762
2786
- if adjust_xlim :
2787
- xmin , xmax = self .dataLim .intervalx ().get_bounds ()
2788
- xmin = amin (w )
2789
- if xerr is not None :
2790
- xmin = xmin - amax (xerr )
2791
- xmin = max (xmin * 0.9 , 1e-100 )
2792
- self .dataLim .intervalx ().set_bounds (xmin , xmax )
2793
- if adjust_ylim :
2794
- ymin , ymax = self .dataLim .intervaly ().get_bounds ()
2795
- ymin = amin (h )
2796
- if yerr is not None :
2797
- ymin = ymin - amax (yerr )
2798
- ymin = max (ymin * 0.9 , 1e-100 )
2799
- self .dataLim .intervaly ().set_bounds (ymin , ymax )
2800
2763
self .autoscale_view ()
2801
2764
return patches
2802
2765
2803
2766
2804
- def barh (self , bottom , width , height = 0.8 , left = None ,
2767
+ def barh (self , bottom , width , height = 0.8 , left = 0 ,
2805
2768
color = None , edgecolor = None , linewidth = None ,
2806
2769
xerr = None , yerr = None , ecolor = None , capsize = 3 ,
2807
2770
align = 'edge'
@@ -4301,13 +4264,11 @@ def table(self, **kwargs):
4301
4264
#### Data analysis
4302
4265
4303
4266
4304
- def hist (self , x , bins = 10 , normed = 0 , bottom = None ,
4305
- align = 'edge' , orientation = 'vertical' , width = None ,
4306
- log = False , ** kwargs ):
4267
+ def hist (self , x , bins = 10 , normed = 0 , bottom = 0 ,
4268
+ align = 'edge' , orientation = 'vertical' , width = None , ** kwargs ):
4307
4269
"""
4308
- HIST(x, bins=10, normed=0, bottom=None,
4309
- align='edge', orientation='vertical', width=None,
4310
- log=False, **kwargs)
4270
+ HIST(x, bins=10, normed=0, bottom=0,
4271
+ align='edge', orientation='vertical', width=None, **kwargs)
4311
4272
4312
4273
Compute the histogram of x. bins is either an integer number of
4313
4274
bins or a sequence giving the bins. x are the data to be binned.
@@ -4334,8 +4295,6 @@ def hist(self, x, bins=10, normed=0, bottom=None,
4334
4295
width: the width of the bars. If None, automatically compute
4335
4296
the width.
4336
4297
4337
- log: if True, the histogram axis will be set to a log scale
4338
-
4339
4298
kwargs are used to update the properties of the
4340
4299
hist Rectangles:
4341
4300
%(Rectangle)s
@@ -4344,11 +4303,9 @@ def hist(self, x, bins=10, normed=0, bottom=None,
4344
4303
n , bins = matplotlib .mlab .hist (x , bins , normed )
4345
4304
if width is None : width = 0.9 * (bins [1 ]- bins [0 ])
4346
4305
if orientation == 'horizontal' :
4347
- patches = self .barh (bins , n , height = width , left = bottom ,
4348
- align = align , log = log )
4306
+ patches = self .barh (bins , n , height = width , left = bottom , align = align )
4349
4307
elif orientation == 'vertical' :
4350
- patches = self .bar (bins , n , width = width , bottom = bottom ,
4351
- align = align , log = log )
4308
+ patches = self .bar (bins , n , width = width , bottom = bottom , align = align )
4352
4309
else :
4353
4310
raise ValueError , 'invalid orientation: %s' % orientation
4354
4311
for p in patches :
0 commit comments