Index: src/sas/qtgui/MainWindow/DataExplorer.py
===================================================================
--- src/sas/qtgui/MainWindow/DataExplorer.py	(revision 515c23dfb58987d8db53d729636b6df99b427fc8)
+++ src/sas/qtgui/MainWindow/DataExplorer.py	(revision d9150d8b0b9b0d85ee6266b1b50adf1e6dc8aee9)
@@ -56,5 +56,8 @@
         self.mutex = QtCore.QMutex()
 
-        # Active plots
+        # Plot widgets {name:widget}, required to keep track of plots shown as MDI subwindows
+        self.plot_widgets = {}
+
+        # Active plots {id:Plotter1D/2D}, required to keep track of currently displayed plots
         self.active_plots = {}
 
@@ -554,4 +557,5 @@
                 if not 'new_plot' in locals():
                     new_plot = Plotter(self)
+                    new_plot.item = item
                 new_plot.plot(plot_set)
                 # active_plots may contain multiple charts
@@ -592,9 +596,12 @@
 
         # Add the plot to the workspace
-        self.parent.workspace().addSubWindow(new_plot)
+        plot_widget = self.parent.workspace().addSubWindow(new_plot)
 
         # Show the plot
         new_plot.show()
         new_plot.canvas.draw()
+
+        # Update the plot widgets dict
+        self.plot_widgets[title]=plot_widget
 
         # Update the active chart list
@@ -1026,13 +1033,13 @@
             return
 
-        proxy = self.current_view.model()
-        model = proxy.sourceModel()
-
-        deleted_items = []
-        deleted_names = []
-
         # Every time a row is removed, the indices change, so we'll just remove
         # rows and keep calling selectedIndexes until it returns an empty list.
         indices = self.current_view.selectedIndexes()
+
+        proxy = self.current_view.model()
+        model = proxy.sourceModel()
+
+        deleted_items = []
+        deleted_names = []
 
         while len(indices) > 0:
@@ -1046,4 +1053,7 @@
                 deleted_names.append(item_to_delete.text())
                 deleted_items.append(item_to_delete)
+
+                # Delete corresponding open plots
+                self.closePlotsForItem(item_to_delete)
 
                 if item_to_delete.parent():
@@ -1060,4 +1070,43 @@
         # update stored_data
         self.manager.update_stored_data(deleted_names)
+
+    def closePlotsForItem(self, item):
+        """
+        Given standard item, close all its currently displayed plots
+        """
+        # item - HashableStandardItems of active plots
+
+        # {} -> 'Graph1' : HashableStandardItem()
+        current_plot_items = {}
+        for plot_name in PlotHelper.currentPlots():
+            current_plot_items[plot_name] = PlotHelper.plotById(plot_name).item
+
+        # item and its hashable children
+        items_being_deleted = []
+        if item.rowCount() > 0:
+            items_being_deleted = [item.child(n) for n in range(item.rowCount())
+                                   if isinstance(item.child(n), GuiUtils.HashableStandardItem)]
+        items_being_deleted.append(item)
+        # Add the parent in case a child is selected
+        if isinstance(item.parent(), GuiUtils.HashableStandardItem):
+            items_being_deleted.append(item.parent())
+
+        # Compare plot items and items to delete
+        plots_to_close = set(current_plot_items.values()) & set(items_being_deleted)
+
+        for plot_item in plots_to_close:
+            for plot_name in current_plot_items.keys():
+                if plot_item == current_plot_items[plot_name]:
+                    plotter = PlotHelper.plotById(plot_name)
+                    # try to delete the plot
+                    try:
+                        plotter.close()
+                        #self.parent.workspace().removeSubWindow(plotter)
+                        self.plot_widgets[plot_name].close()
+                        self.plot_widgets.pop(plot_name, None)
+                    except AttributeError as ex:
+                        logging.error("Closing of %s failed:\n %s" % (plot_name, str(ex)))
+
+        pass # debugger anchor
 
     def onAnalysisUpdate(self, new_perspective=""):
@@ -1174,8 +1223,2 @@
         self.theory_model.appendRow(model_item)
 
-
-if __name__ == "__main__":
-    app = QtWidgets.QApplication([])
-    dlg = DataExplorerWindow()
-    dlg.show()
-    sys.exit(app.exec_())
