romspline/random_seeds.py
def plot_sizes(self, n=20, ax=None, show=True, xlabel='Size of reduced data', ylabel='Occurrence'):
    """Plot a histogram of the reduced data sizes produced by building
    reduced-order splines from random sets of seed points.
    
    Input
    -----
      n      -- number of histogram bins
                (default 20)
      ax     -- matplotlib plot/axis object
                (default None)
      show   -- display the plot?
                (default True)
      xlabel -- x-axis label 
                (default 'Size of reduced data')
      ylabel -- y-axis label
                (default 'Occurrence')
    
    Output
    ------
      If show=True then the plot is displayed.
      Otherwise, the matplotlib plot/axis object is output.
    """
    
    if self._made:
      
      if ax is None:
        fig, ax = plt.subplots(nrows=1, ncols=1)
      
      ax.hist(self.sizes, n, color='k', alpha=0.33);
      
      mean = np.mean(self.sizes)
      std = np.std(self.sizes)
      
      ax.axvline(x=mean, color='k', linewidth=2)
      ax.axvline(x=mean+std, color='k', linestyle='--', linewidth=1)
      ax.axvline(x=mean-std, color='k', linestyle='--', linewidth=1)
      
      ax.set_xlabel(xlabel)
      ax.set_ylabel(ylabel)
      
      if show:  # Display the plot
        plt.show()
      else:     # Otherwise, return plot objects for editing the plot in the future
        if ax is None:
          return fig, ax
        else:
          return ax
    
    else:
      print("No data to plot. Run make method or set _made attribute to True.")
Plot a histogram of the reduced data sizes produced by building
    reduced-order splines from random sets of seed points.
    
    Input
    -----
      n      -- number of histogram bins
                (default 20)
      ax     -- matplotlib plot/axis object
                (default None)
      show   -- display the plot?
                (default True)
      xlabel -- x-axis label 
                (default 'Size of reduced data')
      ylabel -- y-axis label
                (default 'Occurrence')
    
    Output
    ------
      If show=True then the plot is displayed.
      Otherwise, the matplotlib plot/axis object is output.
    
Plot a histogram of the reduced data sizes produced by building
reduced-order splines from random sets of seed points.

Input



Output

If show=True then the plot is displayed.
Otherwise, the matplotlib plot/axis object is output.
Plot a histogram of the reduced data sizes produced by building reduced - order splines from random sets of seed points . Input Output If show = True then the plot is displayed . Otherwise the matplotlib plot / axis object is output .
def plot_sizes(self, n=20, ax=None, show=True, xlabel='Size of reduced data', ylabel='Occurrence'):
    if self._made:
      if ax is None:
        fig, ax = plt.subplots(nrows=1, ncols=1)
      ax.hist(self.sizes, n, color='k', alpha=0.33);
      mean = np.mean(self.sizes)
      std = np.std(self.sizes)
      ax.axvline(x=mean, color='k', linewidth=2)
      ax.axvline(x=mean+std, color='k', linestyle='--', linewidth=1)
      ax.axvline(x=mean-std, color='k', linestyle='--', linewidth=1)
      ax.set_xlabel(xlabel)
      ax.set_ylabel(ylabel)
      if show:  
        plt.show()
      else:     
        if ax is None:
          return fig, ax
        else:
          return ax
    else:
      print("No data to plot. Run make method or set _made attribute to True.")
def plot_sizes ( self , n = 20 , ax = None , show = True , xlabel = 'Size of reduced data' , ylabel = 'Occurrence' ) : if self . _made : if ax is None : fig , ax = plt . subplots ( nrows = 1 , ncols = 1 ) ax . hist ( self . sizes , n , color = 'k' , alpha = 0.33 ) ; mean = np . mean ( self . sizes ) std = np . std ( self . sizes ) ax . axvline ( x = mean , color = 'k' , linewidth = 2 ) ax . axvline ( x = mean + std , color = 'k' , linestyle = '--' , linewidth = 1 ) ax . axvline ( x = mean - std , color = 'k' , linestyle = '--' , linewidth = 1 ) ax . set_xlabel ( xlabel ) ax . set_ylabel ( ylabel ) if show : plt . show ( ) else : if ax is None : return fig , ax else : return ax else : print ( "No data to plot. Run make method or set _made attribute to True." )
Plot a histogram of the reduced data sizes produced by building
reduced-order splines from random sets of seed points.
Plot a histogram of the reduced data sizes produced by building reduced - order splines from random sets of seed points .
"""Plot a histogram of the reduced data sizes produced by building
    reduced-order splines from random sets of seed points.
    
    Input
    -----
      n      -- number of histogram bins
                (default 20)
      ax     -- matplotlib plot/axis object
                (default None)
      show   -- display the plot?
                (default True)
      xlabel -- x-axis label 
                (default 'Size of reduced data')
      ylabel -- y-axis label
                (default 'Occurrence')
    
    Output
    ------
      If show=True then the plot is displayed.
      Otherwise, the matplotlib plot/axis object is output.
    """ # Display the plot # Otherwise, return plot objects for editing the plot in the future
self
n
ax
show
xlabel
ylabel