Ejemplo n.º 1
0
    def plot_N_iter_with_error( self ):
        N_iters, errors = self.N_iters, self.errors
        N_iter_with_error = Grapher( "V(r): N_iter vs. error", '', 'N_iter, the number of relaxations', 'error', 'upper right' )
        N_iter_with_error.add_data_scatter( N_iters, errors, 'Error = Sum(squared differences of phi[i][j], between iterations' )
#        N_iter_with_error.ax.set_ylim( 0, 2e-5 )
        N_iter_with_error.save_to_file( '/tmp/N_iter_with_error2.png' )
        N_iter_with_error.show_figure()
Ejemplo n.º 2
0
 def plot_V_of_r( self ):
     r, V = self.get_V_of_r()
     graph = Grapher( "V(r): Electric Potential of a Static Dipole", '', 'radius from origin', 'Potential', 'upper right' )
     graph.add_data_scatter( r, V, 'V(r)' )
     graph.save_to_file( '/home/res/Documents/duke/2012S/PHY260/midterm/V_r.png' )
     graph.show_figure()