parameters: (plots, workspaces)
return_statement: return plots
docstring: :param plots: a dictionary of figure managers.
          :param workspaces: a list of workspace names.
          :return: a dictionary of figure managers containing plots that only use the workspaces in workspaces.
docstring_summary: :param plots: a dictionary of figure managers.
          :param workspaces: a list of workspace names.
          :return: a dictionary of figure managers containing plots that only use the workspaces in workspaces.
docstring_tokens: : param plots : a dictionary of figure managers . : param workspaces : a list of workspace names . : return : a dictionary of figure managers containing plots that only use the workspaces in workspaces .
function: def _filter_plots_with_unaltered_workspaces(plots, workspaces):
          """
          :param plots: a dictionary of figure managers.
          :param workspaces: a list of workspace names.
          :return: a dictionary of figure managers containing plots that only use the workspaces in workspaces.
          """
          plots_copy = plots.copy()
          for i, plot in plots_copy.items():
              # check that every axes only uses workspaces that are being saved, otherwise delete the plot
              if not all(all(ws in workspaces for ws in ax.tracked_workspaces if isinstance(ax, MantidAxes))
                         for ax in plot.canvas.figure.axes):
                  del plots[i]
  
          return plots
function_tokens: def _filter_plots_with_unaltered_workspaces ( plots , workspaces ) : plots_copy = plots . copy ( ) for i , plot in plots_copy . items ( ) : # check that every axes only uses workspaces that are being saved, otherwise delete the plot if not all ( all ( ws in workspaces for ws in ax . tracked_workspaces if isinstance ( ax , MantidAxes ) ) for ax in plot . canvas . figure . axes ) : del plots [ i ] return plots