title: Python Dash_ empty scatter plot with callbacks
body: <p>I am new to python and dash. I came from C++ background.
  I am following tutorial 3 “<a href="https://dash.plot.ly/getting-started-part-2" rel="nofollow noreferrer">Basic Dash Callbacks</a>”. And I wanted to do scatter or (Scatter3d) on “<a href="https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv" rel="nofollow noreferrer">gapminderDataFiveYear.csv</a>” with multiple ‘drop down’ and ‘radio items’. But I tried many times however the data is not showing in the scatter plot. Please help with bugs in the code below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>import dash
  import dash_core_components as dcc
  import dash_html_components as html
  import pandas as pd
  import plotly.graph_objs as go
  import numpy as np
  import webbrowser as wb
  from os import listdir
  from os.path import isfile, join
  import numpy as np
  #
  
  df = pd.read_csv(
      'https://raw.githubusercontent.com/plotly/'
      'datasets/master/gapminderDataFiveYear.csv')
  df.to_csv('test.csv')
  df = pd.read_csv('./test.csv')
  df['test'] = np.random.randint (10, 100, size = len(df))
  col_to_choose = df.loc[:, df.dtypes == np.float64].columns.values.tolist()
  app = dash.Dash()
  
  app.layout = html.Div([
      html.Div([
          html.Div([
              dcc.Dropdown(
                  id = 'xaxis-column',
                  options = [{'label' : i, 'value': i} for i in col_to_choose],    
                  value = 'pop'
              ),  
              dcc.RadioItems(
                  id = 'xaxis-type',
                  options = [{'label' : i, 'value' : i} for i in ['Linear', 'Log']],
                  value = 'Linear',
                  labelStyle = {'display':'inline-block'}
              )
          ],
          style = {'width' : '48%', 'display' : 'inline-block'}),
  
          html.Div([
              dcc.Dropdown(
                  id = 'yaxis-column',
                  options = [{'label' : i, 'value': i} for i in col_to_choose],    
                  value = 'gdpPercap'
              ),  
              dcc.RadioItems(
                  id = 'yaxis-type',
                  options = [{'label' : i, 'value' : i} for i in ['Linear', 'Log']],
                  value = 'log',
                  labelStyle = {'display':'inline-block'}
              )
          ],
          style = {'width' : '48%', 'display' : 'inline-block'}),
      ]),
      
      dcc.Graph(id = 'graph-practice'),
      
      dcc.Slider(
          id = 'year-slider',
          min = df['year'].min(),
          max = df['year'].max(),
          value = df['year'].max(),
          step = None,
          marks = {str(year):str(year) for year in df ['year'].unique()}
      )
  ])
  
  
  @app.callback(
      dash.dependencies.Output('graph-practice', 'figure'),
      
      [dash.dependencies.Input('xaxis-column', 'value'),     
       dash.dependencies.Input('yaxis-column', 'value'),
       dash.dependencies.Input('xaxis-type', 'value'),
       dash.dependencies.Input('yaxis-type', 'value'),
       dash.dependencies.Input('year-slider', 'value')
      ]
  )
  def update_graph(xaxis_column_name, yaxis_column_name,
                   xaxis_type, yaxis_type,
                   year_value):
      dff = df[df.Year == year_value]
      
      return {
          'data' : [go.Scatter(
              x = dff['xaxis_column_name'].values,
              y = dff['yaxis_column_name'].values,
              text = dff['country'],
              mode = 'markers',
              marker = {
                  'size' : 15,
                  'opacity' :0.5,
                  'line': {'width': 0.5, 'color': 'white'}
              }
          )],
          'layout' : go.Layout(
              xaxis = {
                  'title': xaxis_column_name,
                  'type' : 'linear' if xaxis_type == 'Linear' else 'log'
                  
              },
              yaxis = {
                  'title': yaxis_column_name,
                  'type' : 'linear' if yaxis_type == 'Linear' else 'log'
                  
              },
              margin = {'l' : 40, 'b': 40, 't':10, 'r':0},
              hovermode = 'closest'
          )
      }
  
  
  if __name__ == '__main__':
      wb.open_new('http://127.0.0.1:8050/')    
      app.run_server(debug = False)</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://i.stack.imgur.com/UfC9q.png" rel="nofollow noreferrer">enter image description here</a></p>