title: How to surface plot/3d plot from dataframe?
body: <p>I am new to <code>pandas</code> and <code>matplotlib</code>. Couldn't able to get exact reference to plot my <code>DataFrame</code> whose schema is as follows</p>
  <pre><code>schema = StructType([
  StructField(&quot;x&quot;, IntegerType(), True),
  StructField(&quot;y&quot;, IntegerType(), True),
  StructField(&quot;z&quot;, IntegerType(), True)])
  </code></pre>
  <p>Like to plot 3d graph w.r.t. x, y and z</p>
  <p>Here is the sample code i used</p>
  <pre><code>import matplotlib.pyplot as pltt
  
  dfSpark = sqlContext.createDataFrame(tupleRangeRDD, schema) // reading as spark df
  df = dfSpark.toPandas()
  fig = pltt.figure();
  ax = fig.add_subplot(111, projection='3d')
  ax.plot_surface(df['x'], df['y'], df['z']) 
  </code></pre>
  <p>I am getting a empty graph plot. definitely missing something. Any pointers?</p>
  <p>-Thx</p>
  <p>Request-1: Print df</p>
  <pre><code>def print_full(x):
      pd.set_option('display.max_rows', len(x))
      print(x)
      pd.reset_option('display.max_rows')
  
  
  print_full(df)
  </code></pre>
  <p>Result of top 10</p>
  <pre><code>         x    y       z
  0      301  301      10
  1      300  301      16
  2      300  300       6
  3      299  301      30
  4      299  300      20
  5      299  299      14
  6      298  301      40
  7      298  300      30
  8      298  299      24
  9      298  298      10
  10     297  301      48
  </code></pre>