def make_plot(self, b):
     controller = self.controller
     b.description = 'Creating plot... Please Wait.'
     b.disabled = True
     try:
         b.pvals = controller.pvals.copy()
         if b.plot_type.value == 'Design Space (interactive)':
             self.make_interactive_plot(b)
         elif b.plot_type.value == 'Design Space':
             self.make_static_plot(b)
         elif b.plot_type.value == 'Stability':
             self.make_stability_plot(b)
         elif b.plot_type.value == 'Eigenvalues':
             self.make_eigenvalue_plot(b)
         else:
             self.make_function_plot(b)
     except Exception as e:
         close_button = Button(description="Close")
         error_message = '<div width="200px" style="float:center; text-align:center;">'
         error_message += '<b>An error occured while plotting</b></div>'
         error_window = Popup(children=[HTML(value=error_message),close_button])
         close_button.window = error_window
         close_button.on_click(lambda x: x.window.close())
         if old_ipython is False:
             error_window.box_style='danger'
             close_button.float = 'center'
             error_window.width='250px'
             error_window.height='150px'
         display(error_window)
         b.description = 'Add Plot'
         b.disabled = False
     else:
         b.description = 'Add Plot'
         b.disabled = False
 def create_case_widget(self):
     controller = self.controller 
     if controller.ds is None:
         return
     case = self.case
     self.info = VBox()
     self.equations = VBox()
     self.log_gains = VBox()
     self.parameter_table = VBox() 
     self.tolerances_table = VBox() 
     self.bounding_box_table = VBox()
     calculate_pvals = Button(description='Determine values for the parameters')
     calculate_pvals.visible = False
     calculate_pvals.on_click(self.identify_parameters)
     if case.is_valid() is True and case.is_cyclical is False:
         if self.pvals is None:
             calculate_pvals.visible = True
     close_button = Button(description='Close Tab')
     close_button.on_click(self.close_widget)
     wi = Popup(children=[self.info, 
                                        self.equations,
                                        self.log_gains,
                                        self.bounding_box_table,
                                        calculate_pvals,
                                        self.parameter_table,
                                        self.tolerances_table,
                                        close_button])
     if ipy_old is True:
         wi.set_css('height', '400px')
     else:
         wi.width = '700px'
     self.update_display()
     subtitle = self.subtitle
     if subtitle != '':
         subtitle = ' (' + subtitle + ')'
     self.title = 'Case ' + self.case.case_number + subtitle
     controller.update_child(self.title, wi)