parameters: (self, event)
docstring: If the event data contains a workspace reference then
          request a plot of the workspace.
  
          :param event: A QDropEvent containing the MIME
                        data of the action
docstring_summary: If the event data contains a workspace reference then
          request a plot of the workspace.
docstring_tokens: If the event data contains a workspace reference then request a plot of the workspace .
function: def dropEvent(self, event):
          """
          If the event data contains a workspace reference then
          request a plot of the workspace.
  
          :param event: A QDropEvent containing the MIME
                        data of the action
          """
          from matplotlib.backend_bases import LocationEvent
          workspace_names = event.mimeData().text().split('\n')
  
          # This creates a matplotlib LocationEvent so that the axis in which the
          # drop event occurred can be calculated
          try:
              x, y = self._canvas.mouseEventCoords(event.pos())
          except AttributeError:  # matplotlib v1.5 does not have mouseEventCoords
              try:
                  dpi_ratio = self._canvas.devicePixelRatio() or 1
              except AttributeError:
                  dpi_ratio = 1
              x = dpi_ratio * event.pos().x()
              y = dpi_ratio * self._canvas.figure.bbox.height / dpi_ratio - event.pos().y()
  
          location_event = LocationEvent('AxesGetterEvent', self._canvas, x, y)
          ax = location_event.inaxes if location_event.inaxes else self._canvas.figure.axes[0]
  
          self._plot_on_here(workspace_names, ax)
          QMainWindow.dropEvent(self, event)
          self.plot_updated.emit()
function_tokens: def dropEvent ( self , event ) : from matplotlib . backend_bases import LocationEvent workspace_names = event . mimeData ( ) . text ( ) . split ( '\n' ) # This creates a matplotlib LocationEvent so that the axis in which the # drop event occurred can be calculated try : x , y = self . _canvas . mouseEventCoords ( event . pos ( ) ) except AttributeError : # matplotlib v1.5 does not have mouseEventCoords try : dpi_ratio = self . _canvas . devicePixelRatio ( ) or 1 except AttributeError : dpi_ratio = 1 x = dpi_ratio * event . pos ( ) . x ( ) y = dpi_ratio * self . _canvas . figure . bbox . height / dpi_ratio - event . pos ( ) . y ( ) location_event = LocationEvent ( 'AxesGetterEvent' , self . _canvas , x , y ) ax = location_event . inaxes if location_event . inaxes else self . _canvas . figure . axes [ 0 ] self . _plot_on_here ( workspace_names , ax ) QMainWindow . dropEvent ( self , event ) self . plot_updated . emit ( )