Difference between revisions of "MatPlotLib Tutorial 1"

From dftwiki3
Jump to: navigation, search
(Created page with "--~~~~ ---- {| | width="40%" | __TOC__ | <br /> <bluebox> right | 80px <br /> <br /> This tutorial will introduce you to the MatPlotLib Python library...")
 
(Setup)
Line 26: Line 26:
 
# EDP from Enthought: https://www.enthought.com/products/.  It contains all you need to run MatPlotLib.
 
# EDP from Enthought: https://www.enthought.com/products/.  It contains all you need to run MatPlotLib.
  
:'' '''Note''': You may have to change the version of Python that PyDev uses in Eclipse to make the MatPlotLib visible to the Eclipse IDEFind information on how to modify the Pydev's Python Interpreter in the Eclipse Preferences menu.''
+
:'' '''Note''': You should make  the Python version installed by EDP as the default Python interpreter for Eclipse.  To
 +
 
 +
==Testing==
 +
* To test that your installation is ready to go, load up the code from this URL http://matplotlib.sourceforge.net/examples/api/unicode_minus.html and run itYou should get a plot, as shown below:
 +
 
 +
<br />
 +
<center>
 +
[[Image:MatPlotLib1.png|700px]]
 +
</center>
 +
<br />

Revision as of 10:15, 25 April 2011

--D. Thiebaut 10:27, 25 April 2011 (EDT)



MatPlotLib.png



This tutorial will introduce you to the MatPlotLib Python library for generating graphs.




Setup

We use the Eclipse IDE and PyDev to develop Python packages. If you want to setup your environment to match the one used here you will need to install:

  1. Eclipse: http://www.eclipse.org/downloads/
  2. Python: http://www.python.org/download/
  3. PyDev: http://pydev.org/download.html
  4. EDP from Enthought: https://www.enthought.com/products/. It contains all you need to run MatPlotLib.
Note: You should make the Python version installed by EDP as the default Python interpreter for Eclipse. To

Testing


MatPlotLib1.png