@@ -1532,6 +1532,7 @@ def plotting():
1532
1532
gci get the current image, or None
1533
1533
getp get a graphics property
1534
1534
hist make a histogram
1535
+ hist2d make a 2d histogram
1535
1536
hold set the hold state on current axes
1536
1537
legend add a legend to the axes
1537
1538
loglog a log log plot
@@ -1588,7 +1589,7 @@ def plotting():
1588
1589
def get_plot_commands (): return ( 'axes' , 'axis' , 'bar' , 'boxplot' , 'cla' , 'clf' ,
1589
1590
'close' , 'colorbar' , 'cohere' , 'csd' , 'draw' , 'errorbar' ,
1590
1591
'figlegend' , 'figtext' , 'figimage' , 'figure' , 'fill' , 'gca' ,
1591
- 'gcf' , 'gci' , 'get' , 'gray' , 'barh' , 'jet' , 'hist' , 'hold' , 'imread' , 'imsave' ,
1592
+ 'gcf' , 'gci' , 'get' , 'gray' , 'barh' , 'jet' , 'hist' , 'hist2d' , ' hold' , 'imread' , 'imsave' ,
1592
1593
'imshow' , 'legend' , 'loglog' , 'quiver' , 'rc' , 'pcolor' , 'pcolormesh' , 'plot' , 'psd' ,
1593
1594
'savefig' , 'scatter' , 'set' , 'semilogx' , 'semilogy' , 'show' ,
1594
1595
'specgram' , 'stem' , 'subplot' , 'table' , 'text' , 'title' , 'xlabel' ,
@@ -1937,17 +1938,16 @@ def getname_val(identifier):
1937
1938
1938
1939
draw_if_interactive ()
1939
1940
1940
-
1941
1941
def autogen_docstring (base ):
1942
1942
"""Autogenerated wrappers will get their docstring from a base function
1943
1943
with an addendum."""
1944
1944
msg = "\n \n Additional kwargs: hold = [True|False] overrides default hold state"
1945
1945
addendum = docstring .Appender (msg , '\n \n ' )
1946
1946
return lambda func : addendum (docstring .copy_dedent (base )(func ))
1947
1947
1948
-
1949
1948
# This function cannot be generated by boilerplate.py because it may
1950
1949
# return an image or a line.
1950
+
1951
1951
@autogen_docstring (Axes .spy )
1952
1952
def spy (Z , precision = 0 , marker = None , markersize = None , aspect = 'equal' , hold = None , ** kwargs ):
1953
1953
ax = gca ()
@@ -1965,9 +1965,6 @@ def spy(Z, precision=0, marker=None, markersize=None, aspect='equal', hold=None,
1965
1965
sci (ret )
1966
1966
return ret
1967
1967
1968
-
1969
- ## Plotting part 2: autogenerated wrappers for axes methods ##
1970
-
1971
1968
# This function was autogenerated by boilerplate.py. Do not edit as
1972
1969
# changes will be lost
1973
1970
@autogen_docstring (Axes .acorr )
@@ -2079,7 +2076,7 @@ def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs):
2079
2076
# This function was autogenerated by boilerplate.py. Do not edit as
2080
2077
# changes will be lost
2081
2078
@autogen_docstring (Axes .bar )
2082
- def bar (left , height , width = 0.80000000000000004 , bottom = None , hold = None , ** kwargs ):
2079
+ def bar (left , height , width = 0.8 , bottom = None , hold = None , ** kwargs ):
2083
2080
ax = gca ()
2084
2081
# allow callers to override the hold state by passing hold=True|False
2085
2082
washold = ax .ishold ()
@@ -2097,7 +2094,7 @@ def bar(left, height, width=0.80000000000000004, bottom=None, hold=None, **kwarg
2097
2094
# This function was autogenerated by boilerplate.py. Do not edit as
2098
2095
# changes will be lost
2099
2096
@autogen_docstring (Axes .barh )
2100
- def barh (bottom , width , height = 0.80000000000000004 , left = None , hold = None , ** kwargs ):
2097
+ def barh (bottom , width , height = 0.8 , left = None , hold = None , ** kwargs ):
2101
2098
ax = gca ()
2102
2099
# allow callers to override the hold state by passing hold=True|False
2103
2100
washold = ax .ishold ()
@@ -2346,6 +2343,24 @@ def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, b
2346
2343
2347
2344
return ret
2348
2345
2346
+ # This function was autogenerated by boilerplate.py. Do not edit as
2347
+ # changes will be lost
2348
+ @autogen_docstring (Axes .hist2d )
2349
+ def hist2d (x , y , bins = 10 , range = None , weights = None , cmin = None , cmax = None , hold = None , ** kwargs ):
2350
+ ax = gca ()
2351
+ # allow callers to override the hold state by passing hold=True|False
2352
+ washold = ax .ishold ()
2353
+
2354
+ if hold is not None :
2355
+ ax .hold (hold )
2356
+ try :
2357
+ ret = ax .hist2d (x , y , bins , range , weights , cmin , cmax , ** kwargs )
2358
+ draw_if_interactive ()
2359
+ finally :
2360
+ ax .hold (washold )
2361
+ sci (ret [- 1 ])
2362
+ return ret
2363
+
2349
2364
# This function was autogenerated by boilerplate.py. Do not edit as
2350
2365
# changes will be lost
2351
2366
@autogen_docstring (Axes .hlines )
@@ -2439,7 +2454,7 @@ def pcolormesh(*args, **kwargs):
2439
2454
# This function was autogenerated by boilerplate.py. Do not edit as
2440
2455
# changes will be lost
2441
2456
@autogen_docstring (Axes .pie )
2442
- def pie (x , explode = None , labels = None , colors = None , autopct = None , pctdistance = 0.59999999999999998 , shadow = False , labeldistance = 1.1000000000000001 , hold = None ):
2457
+ def pie (x , explode = None , labels = None , colors = None , autopct = None , pctdistance = 0.6 , shadow = False , labeldistance = 1.1 , hold = None ):
2443
2458
ax = gca ()
2444
2459
# allow callers to override the hold state by passing hold=True|False
2445
2460
washold = ax .ishold ()
@@ -2655,7 +2670,7 @@ def step(x, y, *args, **kwargs):
2655
2670
# This function was autogenerated by boilerplate.py. Do not edit as
2656
2671
# changes will be lost
2657
2672
@autogen_docstring (Axes .streamplot )
2658
- def streamplot (x , y , u , v , density = 1 , linewidth = None , color = None , cmap = None , arrowsize = 1 , arrowstyle = '-|>' , minlength = 0.10000000000000001 , hold = None ):
2673
+ def streamplot (x , y , u , v , density = 1 , linewidth = None , color = None , cmap = None , arrowsize = 1 , arrowstyle = '-|>' , minlength = 0.1 , hold = None ):
2659
2674
ax = gca ()
2660
2675
# allow callers to override the hold state by passing hold=True|False
2661
2676
washold = ax .ishold ()
0 commit comments