title: Plot your own Data in pythong using pyrolite
body: <p>So this is the example code from pyrolite. This example uses preexisting example data, but I would like to plot my own data.</p>
  <pre><code>import pandas as pd
  import numpy as np
  import matplotlib.pyplot as plt
  from pyrolite.plot import pyroplot
  
  from pyrolite.util.synthetic import example_spider_data
  
  df = example_spider_data(noise_level=0.1, size=20)
  
  ax = df.pyroplot.REE(color=&quot;0.5&quot;, figsize=(8, 4))
  plt.show()
  
  df.pyroplot.REE(mode=&quot;fill&quot;, color=&quot;0.5&quot;, alpha=0.5, figsize=(8, 4))
  plt.show()
  
  fig, ax = plt.subplots(1, 2, sharey=True, figsize=(12, 4))
  
  df.pyroplot.REE(ax=ax[0])
  # we can also change the index of the second axes
  another_df = example_spider_data(noise_level=0.2, size=20)  # some 'nosier' data
  another_df.pyroplot.REE(ax=ax[1], color=&quot;k&quot;, index=&quot;radii&quot;)
  
  plt.tight_layout()
  plt.show()
  </code></pre>
  <p>I tried this:</p>
  <pre><code>d = open(&quot;XXX.txt&quot;, 'r')
  for row in d:
  row = row.split(' ')
  names.append(row[0]) 
  marks.append(float(row[1]))
  </code></pre>
  <p>And now I thought I could just exchange the example_spider_data with d, but I cannot. 'iOTextIOWrapper' object is not callable. I understand that d is not callable sounds logical, but how to create something callable? Or how to figure out where I can read about this?</p>
  <p>How do I figure out which format the data needs to be in? I cannot find any help on this. In the
  documentation they always use example data...</p>
  <p>Thank you very much in advance.</p>
  <p>I only ever programmed stupid useless university exercises but would like to plot some real data now. I plotted stuff before, but I cannot grasp how to load in your data in python. I used some tutorials, but I doesn't work with pyrolite or rather I just don't not how I can be made to work.</p>