Saturday, September 30, 2017

Adventures in Python: Installing and Matplotlib Package

Adventures in Python: Installing and Matplotlib Package

October: Adventures in Python

I am going to spend some of October concentrating on programming in the popular program Python.  Python is available on most operating systems:  Windows, iOS (such as Pythonista), Android (most popular QPython), and Linux.  

Python comes in two versions, 2 and 3.  The latest version is 3.6.

My focus is on mathematics and mathematical application.  I plan to use a Windows version of Python and the iOS Python.

Python comes with several expansion modules out of the box:  math (mathematics), random (random numbers and generation), statistics, cmath (complex numbers), and time (time functions). 

However, if we want to generate plots, including histograms and box plots, we will need to download and add an appropriate package.  The package that I am going to use is matlibplot, which also contains the module numpy which allows for matrices and matrix calculations.  The file format of matlibplot is .whl (wheel). 

Download – Windows

Download Python here:  https://www.python.org/ 


I downloaded the Win32 verison.

When downloading, make sure you use custom installation. I recommend watching this YouTube video by APMonitor here:  https://www.youtube.com/watch?v=Ju6zw83PoKo&feature=youtu.be

The video saved me a lot of headaches when I tried to download and install Python, along with downloading and installing mathlibplot.  For instance, to install mathlibplot (which includes numpy), you will need to work with the Windows command prompt.

Note:  To install matplotlib, you must install pip and matplotlib thorugh the Windows Command Prompt, not the program itself.

For the Windows version, I am going to use the IDLE program which allows me to run Python both on the module and also create and run scripts. 




Android – installing matplotlib – Help Needed!

I tried to install matplotlib on QPython3 without success.  There documentation for this is scare and often not a help at all.   If anyone knows how to do it, please share.  I need type of version (Linux, win32, etc) is needed, what folder, etc. 

Download Pythonista – Apple iOS

For portable Python I am going to use the Pythonista app for Apple iOS engine.  It costs $9.99.  The best part about Pythonista is that numpy and matplotlib are both included.

More information about the app can be found here:  http://omz-software.com/pythonista/

Eddie

This blog is property of Edward Shore, 2017.



  Casio fx-7000G vs Casio fx-CG 50: A Comparison of Generating Statistical Graphs Today’s blog entry is a comparison of how a hist...