@@ -1532,6 +1532,7 @@ def plotting():
15321532 gci get the current image, or None
15331533 getp get a graphics property
15341534 hist make a histogram
1535+ hist2d make a 2d histogram
15351536 hold set the hold state on current axes
15361537 legend add a legend to the axes
15371538 loglog a log log plot
@@ -1588,7 +1589,7 @@ def plotting():
15881589def get_plot_commands (): return ( 'axes' , 'axis' , 'bar' , 'boxplot' , 'cla' , 'clf' ,
15891590 'close' , 'colorbar' , 'cohere' , 'csd' , 'draw' , 'errorbar' ,
15901591 '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' ,
15921593 'imshow' , 'legend' , 'loglog' , 'quiver' , 'rc' , 'pcolor' , 'pcolormesh' , 'plot' , 'psd' ,
15931594 'savefig' , 'scatter' , 'set' , 'semilogx' , 'semilogy' , 'show' ,
15941595 'specgram' , 'stem' , 'subplot' , 'table' , 'text' , 'title' , 'xlabel' ,
@@ -1937,17 +1938,16 @@ def getname_val(identifier):
19371938
19381939 draw_if_interactive ()
19391940
1940-
19411941def autogen_docstring (base ):
19421942 """Autogenerated wrappers will get their docstring from a base function
19431943 with an addendum."""
19441944 msg = "\n \n Additional kwargs: hold = [True|False] overrides default hold state"
19451945 addendum = docstring .Appender (msg , '\n \n ' )
19461946 return lambda func : addendum (docstring .copy_dedent (base )(func ))
19471947
1948-
19491948# This function cannot be generated by boilerplate.py because it may
19501949# return an image or a line.
1950+
19511951@autogen_docstring (Axes .spy )
19521952def spy (Z , precision = 0 , marker = None , markersize = None , aspect = 'equal' , hold = None , ** kwargs ):
19531953 ax = gca ()
@@ -1965,9 +1965,6 @@ def spy(Z, precision=0, marker=None, markersize=None, aspect='equal', hold=None,
19651965 sci (ret )
19661966 return ret
19671967
1968-
1969- ## Plotting part 2: autogenerated wrappers for axes methods ##
1970-
19711968# This function was autogenerated by boilerplate.py. Do not edit as
19721969# changes will be lost
19731970@autogen_docstring (Axes .acorr )
@@ -2079,7 +2076,7 @@ def axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs):
20792076# This function was autogenerated by boilerplate.py. Do not edit as
20802077# changes will be lost
20812078@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 ):
20832080 ax = gca ()
20842081 # allow callers to override the hold state by passing hold=True|False
20852082 washold = ax .ishold ()
@@ -2097,7 +2094,7 @@ def bar(left, height, width=0.80000000000000004, bottom=None, hold=None, **kwarg
20972094# This function was autogenerated by boilerplate.py. Do not edit as
20982095# changes will be lost
20992096@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 ):
21012098 ax = gca ()
21022099 # allow callers to override the hold state by passing hold=True|False
21032100 washold = ax .ishold ()
@@ -2346,6 +2343,24 @@ def hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, b
23462343
23472344 return ret
23482345
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+
23492364# This function was autogenerated by boilerplate.py. Do not edit as
23502365# changes will be lost
23512366@autogen_docstring (Axes .hlines )
@@ -2439,7 +2454,7 @@ def pcolormesh(*args, **kwargs):
24392454# This function was autogenerated by boilerplate.py. Do not edit as
24402455# changes will be lost
24412456@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 ):
24432458 ax = gca ()
24442459 # allow callers to override the hold state by passing hold=True|False
24452460 washold = ax .ishold ()
@@ -2655,7 +2670,7 @@ def step(x, y, *args, **kwargs):
26552670# This function was autogenerated by boilerplate.py. Do not edit as
26562671# changes will be lost
26572672@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 ):
26592674 ax = gca ()
26602675 # allow callers to override the hold state by passing hold=True|False
26612676 washold = ax .ishold ()
0 commit comments