src/django/shared/Monte.py
def plot_single(self):
        """
        Function that plots the first element in each set of simulations after a given time step.
        These elements are plotted to show a single simulated projection line.

        :returns: plot_single_str which is a string which contains the html for the graphical output.
        :rtype: str
        """

        single = []
        for item in self.monte_sims:
            single.append(item[0])

        plt.figure(figsize=(self.width, self.height))
        plt.plot(single)
        plt.xlabel('Days into the Future')
        plt.ylabel('Adjusted Closing Price')
        plt.title('Simulated Adjusted Closing Prices Over Time')

        single = plt.gcf()

        plot_single_str = mpld3.fig_to_html(single) # saves figure to string of html
        #plot_single_dict = mpld3.fig_to_dict(single)
        return plot_single_str

        Function that plots the first element in each set of simulations after a given time step.
        These elements are plotted to show a single simulated projection line.

        :returns: plot_single_str which is a string which contains the html for the graphical output.
        :rtype: str
        
Function that plots the first element in each set of simulations after a given time step.
These elements are plotted to show a single simulated projection line.
Function that plots the first element in each set of simulations after a given time step . These elements are plotted to show a single simulated projection line .
def plot_single(self):
        single = []
        for item in self.monte_sims:
            single.append(item[0])
        plt.figure(figsize=(self.width, self.height))
        plt.plot(single)
        plt.xlabel('Days into the Future')
        plt.ylabel('Adjusted Closing Price')
        plt.title('Simulated Adjusted Closing Prices Over Time')
        single = plt.gcf()
        plot_single_str = mpld3.fig_to_html(single) 
        return plot_single_str
def plot_single ( self ) : single = [ ] for item in self . monte_sims : single . append ( item [ 0 ] ) plt . figure ( figsize = ( self . width , self . height ) ) plt . plot ( single ) plt . xlabel ( 'Days into the Future' ) plt . ylabel ( 'Adjusted Closing Price' ) plt . title ( 'Simulated Adjusted Closing Prices Over Time' ) single = plt . gcf ( ) plot_single_str = mpld3 . fig_to_html ( single ) return plot_single_str
Function that plots the first element in each set of simulations after a given time step.
Function that plots the first element in each set of simulations after a given time step .
"""
        Function that plots the first element in each set of simulations after a given time step.
        These elements are plotted to show a single simulated projection line.

        :returns: plot_single_str which is a string which contains the html for the graphical output.
        :rtype: str
        """ # saves figure to string of html #plot_single_dict = mpld3.fig_to_dict(single)
plot_single_str which is a string which contains the html for the graphical output.
plot_single_str which is a string which contains the html for the graphical output .
str
self