Plot specifying column by name, upper case issue
<p>I'm learning how to plot things (CSV files) in Python, using <code>import matplotlib.pyplot as plt</code>. </p>

<pre><code>Column1;Column2;Column3;
1;4;6;
2;2;6;
3;3;8;
4;1;1;
5;4;2;
</code></pre>

<p>I can plot the one above with <code>plt.plotfile('test0.csv', (0, 1), delimiter=';')</code>, which gives me the figure below.</p>

<p>Do you see the axis labels, <code>column1</code> and <code>column2</code>? They are in lower case in the figure, but in the data file they beggin with upper case.</p>

<p>Also, I tried <code>plt.plotfile('test0.csv', ('Column1', 'Column2'), delimiter=';')</code>, which does not work.</p>

<p>So it seems <code>matplotlib.pyplot</code> works only with lowercase names :(</p>

<p>Summing this issue with <a href="http://stackoverflow.com/questions/39907407/plot-a-csv-file-where-the-delimiter-is-semicolon-space">this other</a>, I guess it's time to try something else.</p>

<p>As I am pretty new to plotting in Python, I would like to ask: Where should I go from here, to get a little more than what <code>matplotlib.pyplot</code> provides?</p>

<p>Should I go to <a href="http://pandas.pydata.org/" rel="nofollow">pandas</a>?</p>

<p><a href="http://i.stack.imgur.com/Mvqbd.png" rel="nofollow"><img src="http://i.stack.imgur.com/Mvqbd.png" alt="enter image description here"></a></p>

<p>You are mixing up two things here.<br>
Matplotlib is designed for plotting data. It is not designed for managing data.<br>
Pandas is designed for data analysis. Even if you were using pandas, you would still need to plot the data. How? Well, probably using matplotlib!
Independently of what you're doing, think of it as a three step process:</p>

<ol>
<li>Data aquisition, data read-in  </li>
<li>Data processing</li>
<li>Data representation / plotting</li>
</ol>

<p><code>plt.plotfile()</code> is a convenience function, which you can use if you don't need step 2. at all. But it surely has its limitations. </p>

<p>Methods to read in data (not complete of course) are using pure python <code>open</code>, python <code>csvReader</code> or similar, <code>numpy</code> / <code>scipy</code>, <code>pandas</code> etc.</p>

<p>Depeding on what you want to do with your data, you can already chose a suitable input method. <code>numpy</code> for large numerical data sets, <code>pandas</code> for datasets which include qualitative data or heavily rely on cross correlations etc.</p>

python python-2.7 matplotlib