       _visualizations.splice index, 1, newVisualization
     return
 
-  addMetricsVisualization = (variableX, variableY) ->
-    rendering =  createMetricsVisualization _metricFrame.metrics, variableX, variableY, (metric) ->
+  createMetricsVisualizationPane = (variableX, variableY) ->
+    rendering =  createMetricsVisualization _filteredMetrics, variableX, variableY, (metric) ->
       _.inspect
         content: createMetricInspection _metricFrame.metricVariables, metric
         template: 'geyser'

    _.configureScoringVisualization caption, parameters, (action, response) ->
      switch action
        when 'confirm'
          switch response.visualizationType
            when _metricsVisualizationType
              go addMetricsVisualization response.variableX, response.variableY
            when _thresholdVisualizationType
              go addThresholdVisualization response.variableX, response.variableY, no

  addVisualization = ->
    configureVisualization 'Add Visualization', _metricsVisualizationType, _metricsVisualizationType.variables[0], _metricsVisualizationType.variables[1], (visualization) -> _visualizations.push visualization


  invalidate = ->
    _metricTable createMetricTable()
    newVisualizations = []
    forEach _visualizations(), (oldVisualization) ->
      { type, variableX, variableY } = oldVisualization.data
      createVisualizationPane type, variableX, variableY, (visualization) ->
        newVisualizations.push visualization
    _visualizations newVisualizations

  createMetricTable = ->
    [ table, thead, tbody, tr, th, thAsc, thDesc, td ] = geyser.generate words 'table.table.table-condensed thead tbody tr th th.y-sorted-asc th.y-sorted-desc td'
