maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan (https://talk.maemo.org/showthread.php?t=80353)

rcolistete 2011-11-24 23:21

[Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
MatPlotLib is a Python library for making 2D and 3D plots, usually using NumPy to calculate the data. See the MatPlotLib gallery to have an idea of which plots can be make using a Nokia N9/N950.

Release history for MeeGo 1.2 Harmattan (see the version history "MatPlotLib What's New") :
- MatPlotLib 1.3.1 (10/10/2013) first release for MeeGo 1.2 Harmattan (20/10/2014). New WebAgg backend (from a web browser) and many new features;
- MatPlotLib 1.2.1-3 Harmattan release (12/10/2014). MatPlotLib is visible in MeeGo Harmattan Application Manager and is installed easier using Warehouse;
- MatPlotLib 1.2.1-2 Harmattan release (15/06/2013);
- MatPlotLib 1.2.1-1 (26/03/2013) released for MeeGo Harmattan (06/06/2013);
- MatPlotLib 1.2.0-2 Harmattan release (12/02/2013);
- MatPlotLib 1.2.0-1 (08/01/2013) released for MeeGo Harmattan (09/02/2013), with graphical backend (Qt4App/PySide) to interactively show plots. It also has animations and many more features;
- MatPlotLib 1.0.0 (06/07/2010), released for MeeGo Harmattan in 24/11/2011, based on the Maemo 5 version of Simon Pickering.Manual installation and configuration, with only Agg backend.

For MatPlotLib on Sailfish/Mer, see the topic "MatPlotLib - 2D & 3D plots for Sailfish".

Examples and screenshots of MatPlotLib on MeeGo Harmattan

Some graphics produced by using MatPlotLib 1.3.1 with NumPy 1.9.0 on a Nokia N9. See more examples in post #4. Download the .py (Python) script and using Terminal type in the the same directory the commands after the "$" :

2D plot of a function (sin) of one variable (takes 3.3 s).
$ python simple_plot.py
http://www.robertocolistete.net/matplotlib/figplot.png

Qt4/PySide backend showing a plot of one variable, f=f(x), of a damped harmonic oscillator, see plotfx.py script in post #4, where the "savefig" command was commented and "show()" was uncommented :
http://www.robertocolistete.net/MatP...Qt4backend.png

3D surface plot of a function of two variables (takes 3.9 s) :
$ python surface3d_demo.py
http://www.robertocolistete.net/matp...figsurface.png

The same above, shown by the Qt4/PySide backend using "plt.show()" instead of "plt.savefig" in the script, allows to touch to rotate the 3D plot :
http://www.robertocolistete.net/MatP...Qt4backend.png

2D vector field plot (takes 3.5 s):
$ python convfield.py
http://www.robertocolistete.net/matp.../convfield.png

Installing MatPlotLib on MeeGo Harmattan

See post #33 if you want to install MatPlotLib 1.0.0. The instructions below are for MatPlotLib 1.3.1.

MatPlotLib has 2 repositories options, so it can be :
- easily installed by using Warehouse / OpenRepos.net. Install Warehouse (OpenRepos.net client) for MeeGo Harmattan, then open Warehouse, search for "MatPlotLib", enable the repository and install;
- installed by using my Harmattan repository ("python-matplotlib" package).

Warehouse showing MatPlotLib 1.3.1 available to install :
http://www.robertocolistete.net/MatP...oHarmattan.png

The MatPlotLib v1.3.1 takes 26MB, while its dependencies (NumPy >= 1.7.0 and "python-dateutil", "python-pyparsing", "python-tornado", "python-tz", etc) take additionally 32 MB after automatic installation. "python-pyside" (if not installed by many MeeGo Harmattan other softwares), will be installed, taking >= 16MB.

MatPlotLib >= 1.3.x doesn't use '~/.matplotlib" configuration folder, but instead '~/.config/matplotlib". So upgrading from MatPlotLib < 1.3 to >= 1.3, then remove the older folder. Or, to remove any conflicting configuration of MatPlotLib 1.0.0 (previous versions), type in Terminal as user :
$ cd ~
$ rm -rf .matplotlib

The default backend is Qt4/PySide interactive graphical backend. If you don't want to use an interactive graphical backend by default, then as user in Terminal, type :
$ cd ~
$ mkdir .config/matplotlib
$ echo 'backend : Agg' > .config/matplotlib/matplotlibrc
so the Agg non interactive backend becomes the default one. With non interactive backend, the plots are not shown in the screen and can only be saved to PNG, PDF, PS and SVG files (by using "savefig" command).

The WebAgg backend is also available on MatPlotLib >= 1.3, so the figures are displayed in a web browser with the URL http://127.0.0.1:8988/, it is interactive and suppport MatPlotLib animations. If you want to use the WebAgg backend by default, then in Terminal, type :
$ cd ~
$ mkdir .config/matplotlib
$ echo 'backend : WebAgg' > .config/matplotlib/matplotlibrc

Using MatPlotLib on MeeGo Harmattan

It is strongly suggested to also install IPython for MeeGo Harmattan, so the interactive use of MatPlotLib/NumPy becomes a lot easier
With the new IPython 0.13.1-2 Harmattan, there are 3 interfaces : IPython terminal, IPython Notebook and IPython Qt console.


As a simple example (just type the text after the "In [n]:" lines) in IPython terminal :
http://www.robertocolistete.net/matp...9_terminal.png
In [1]: from pylab import *
In [2]: x = randn(10000); hist(x, 100)
In [3]: savefig('histogram.png')
In [4]: show()
The 1st line loads NumPy and MatPlotLib by using PyLab. The 2nd line calculates 10 thousand random numbers using NumPy, and makes a histogram (not shown in the screen). The 3rd line saves the histogram to a PNG file 'histogram.png' in the current directory (it could be a PDF figure, just use '.pdf' extension). Yeah, your Nokia N9 can easily create PDF files of plots ! The 4th line shows the plot in the interactive Qt4/PySide default backend of MatPlotLib >= 1.2, see below :
http://www.robertocolistete.net/matp...Qt4backend.png
The interactive Qt4/PySide default backend is not touch friendly (as there is no mouse and the N9/N950 screen is small compared to a desktop PC), so only some features are practical to use. But it shows the plot in full screen since MatPlotLib >= 1.2 Harmattan (12/02/20130 allows to rotate 3D plots, etc.

To run IPython with PyLab (NumPy + MatPlotLib) in interactive mode in Terminal, there are many options :
- tap the IPython icon (v0.13.1), then type "%pylab";
- open the Terminal, type "ipython", then type "%pylab";
- open the Terminal, type "ipython --pylab".

See post #42 for time measurements of MatPlotLib 1.3 x 1.2 x 1.0 with NumPy 1.7 and 1.9. Or older post #32 for time measurements of MatPlotLib 1.2 x 1.0 with NumPy 1.4 and 1.7.

IPython Notebook and IPython Qt console also support inline plots, just type "%pylab inline" inside the IPython Notebook session :
http://www.robertocolistete.net/ipyt...-0.13.1_N9.png

Or IPython Qt console session :
http://www.robertocolistete.net/ipyt...-0.13.1_N9.png

Documentation and Examples for MatPlotLib

MatPlotLib documentation is online in the official MatPlotLib site, in PDF format (63MB and more than 2,6 thousand pages), or help available in interactive mode by typing :
- "help(matplotlib)", after an "import matplotlib";
- "help(pylab)" or "help(pylab.matplotlib)", when using PyLab.

The package "python-matplotlib-doc_*.deb" only contains examples, but anyway it is purged as everything is in "/usr/share/doc/".

There is more than one hundred source code examples (.py Python files) in :
MatPlotLib gallery
MatPlotLib screenshots
MatPlotLib examples list
which can run on Nokia N9/N950.

MatPlotLib is often used together with NumPy (for numerical calculations in Python), so see topic about NumPy for MeeGo Harmattan.

For making plots with calculations using derivatives, integrals, etc, then SymPy is also available for MeeGo Harmattan :
SymPy (Computer Algebra System) for Maemo 4 & 5 & 6

By the way, be a N9/N950 proud user : MatPlotLib >= 1.2 is only available for Linux, Windows, Mac OS, iOS, Sailfish and MeeGo 1.2 Harmattan.

Next steps for MatPlotLib on MeeGo Harmattan :
- (DONE, see this post and post #4) show easy script examples (with documentation) to make the most useful plots;
- (DONE, see my Harmattan repository) release MatPlotLib packages in a public MeeGo Harmattan repository (App);
- (DONE, now with MatPlotLib 1.2.0 there is a interactive backend on Nokia N9/N950) try to release MatPlotLib 1.1 or 1.2, which includes animations, PySide compatibility (so, maybe, I say, maybe, interactive backend could run on Nokia N9/950);
- (DONE, see MatPlotLib 1.2.0 Harmattan2) try to show Qt4/PySide backend in full screen;
- release MatPlotLib 1.4.x;
- release softwares depending on MatPlotLib/Numpy with easy to use interface (in Qt Quick) to make from simple to complex plots of functions of 1 or 2 variables, of experimental data with error bars, eletrical vector field/potential, etc.

Python for MeeGo Harmattan

More Python packages are listed in the Python Harmattan Wiki. See also OpenRepos.net.

vielfrass 2011-11-25 06:26

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
from pylab import *
does not work for me after your described procedure:
No module named pylab

rcolistete 2011-11-25 07:37

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by vielfrass (Post 1128734)
from pylab import *
does not work for me after your described procedure:
No module named pylab

Please, give me the full error message.

Also check if, using Terminal :
$ apt-cache show python-matplotlib
shows a lot of information about the package (to confirm if it is installed).

rcolistete 2011-11-26 18:21

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Here are some useful examples/templates scripts for ploting with MatPlotLib/NumPy. They have many options to change : domain, function, labels, title, etc. To adapt them to your use, just open the .py file with a text editor (for example Nano for Nokia N9 in Nokia Store), change the definitions in the section "# Personalize your plot parameters here", save and run (using Terminal) :
$ python <scriptname>.py
Timings for MatPlotLib 1.2.0 and NumPy 1.4.1 on Nokia N9.

plotfx.py : Plot of one variable, f=f(x), saving to a (PNG) file. Takes 8.4 s on Nokia N9.
http://www.robertocolistete.net/MatPlotLib/plotfx.png

contourfxy.py : contour plot of two variables, f=f(x,y), saving to a (PNG) file. Takes 10.2 s on Nokia N9.
http://www.robertocolistete.net/MatP...contourfxy.png

densityfxy.py : density shaded relief plot of two variables, f=f(x,y), saving to a (PNG) file. Takes 10.3 s on Nokia N9.
http://www.robertocolistete.net/MatP...densityfxy.png

vectorfieldFxy.py : vector field plot in 2D, F=F(x,y), saving to a (PNG) file. Takes 8.2 s on Nokia N9.
http://www.robertocolistete.net/MatP.../vectorFxy.png

surfacefxy.py : surface plot of two variables, f=f(x,y), saving to a (PNG) file. Takes 16.6 s on Nokia N9.
http://www.robertocolistete.net/MatP...surfacefxy.png

vielfrass 2011-11-26 21:02

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by rcolistete (Post 1128757)
$ apt-cache show python-matplotlib
shows a lot of information about the package (to confirm if it is installed).

Thanks for the hint. I'm a Python newbie. Seems to installed uncomplete. I'm doing the procedure again.
:rolleyes:

vielfrass 2011-11-26 21:24

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by rcolistete (Post 1128757)
Please, give me the full error message.
$ apt-cache show python-matplotlib
shows a lot of information about the package (to confirm if it is installed).

:rolleyes: Actually reading the error message helps, some times...

This fixed it:
Code:

apt-get install python-central
Thanks a lot. This will help me learning Python and becoming more independent from MatLab.

vielfrass 2011-11-26 21:33

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Will it be possible to have the QT iPython console on the N9 some day?
http://ipython.org/ipython-doc/dev/i...qtconsole.html

rcolistete 2011-11-26 21:41

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by vielfrass (Post 1129350)
:rolleyes: Actually reading the error message helps, some times...

This fixed it:
Code:

apt-get install python-central
Thanks a lot. This will help me learning Python and becoming more independent from MatLab.

It was my fault, 'python-central' was missing in the installation instructions above. It was already installed in my Nokia N9 (due to 'python-imaging') and I missed this detail...

The installation instructions are now fixed and complete.

Thank you very much.

rcolistete 2011-11-26 22:00

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by vielfrass (Post 1129352)
Will it be possible to have the QT iPython console on the N9 some day?
http://ipython.org/ipython-doc/dev/i...qtconsole.html

I have answered your question in iPython for MeeGo Harmattan topic.

But my priority is to (try to) release MatPlotLib 1.1 with a possible Qt backend running on Nokia N9/N950.

blinkman04 2012-02-01 20:38

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Hello !

I had just a little problem when i try to install the Library...

When i enter this command : " # dpkg -i python-matplotlib-data_1.0.0-1_all.deb "

My N9 returning this error : "Aegis rejecting python-matplotlib-data_1.0.0-1_all.deb : Could not open debian archive
Aegis aborting dpkg -- all listed package files rejected


Sorry for my approxymatly english .. i'm french ^^

blinkman04 2012-02-01 20:39

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Hello !

I had just a little problem when i try to install the Library...

When i enter this command : " # dpkg -i python-matplotlib-data_1.0.0-1_all.deb "

My N9 returning this error : "Aegis rejecting python-matplotlib-data_1.0.0-1_all.deb : Could not open debian archive
Aegis aborting dpkg -- all listed package files rejected"

Can i clean this error ? What ? Thanks for your help... ^^


Sorry for my approxymatly english .. i'm french ^^

rcolistete 2012-02-01 20:40

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by blinkman04 (Post 1159159)
Hello !

I had just a little problem when i try to install the Library...

When i enter this command : " # dpkg -i python-matplotlib-data_1.0.0-1_all.deb "

My N9 returning this error : "Aegis rejecting python-matplotlib-data_1.0.0-1_all.deb : Could not open debian archive
Aegis aborting dpkg -- all listed package files rejected

Have you entered root mode by first typing 'devel-su' at Terminal, with password 'rootme' ?

blinkman04 2012-02-02 10:16

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Yes yes , i follow the instructions faithfully...


I just got this error for this step ^^ :(

rcolistete 2012-02-02 14:51

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by blinkman04 (Post 1159331)
Yes yes , i follow the instructions faithfully...

I just got this error for this step ^^ :(

Sorry, I am not able to reproduce your error (I have installed the matplotlib-data package some minutes ago on my Nokia N9 with PR1.1). Please, tell me more information :
- the version (PR1.0, PR1.1 or even PR1.2...) of your MeeGo Harmattan on your Nokia N9;
- if the 'python-matplotlib-data_1.0.0-1_all.deb' file was correctly downloaded with 1246086 bytes;
- if 'python-matplotlib_1.0.0-1_armel' and 'python-matplotlib-doc_1.0.0-1_all.deb' can be correctly installed using 'dpkg -i'.

blinkman04 2012-02-02 22:20

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Yes, no problems =)

I have a Nokia N9 16Gb PR 1.1 (20.2011.40-4.480.2_PR_480)

-'python-matplotlib-data_1.0.0-1_all.deb' was correctly downloaded with 1246086 bytes

-same thing for 'python-matplotlib_1.0.0-1_armel.deb' with 5*358*826 bytes

And 'python-matplotlib_1.0.0-1_armel' and 'python-matplotlib-doc_1.0.0-1_all.deb' are not installed because i had aegis error ..

For the moment i just do :

in root mode

# apt-get install python-central python-numpy
# apt-get install python-dateutil python-gobject python-cairo

Intalled with success.

How i can unistall 'python-central python-numpy' and 'python-dateutil python-gobject python-cairo' and test if 'python-matplotlib_1.0.0-1_armel' and 'python-matplotlib-doc_1.0.0-1_all.deb' are installed (with error ?).

If i can clean all the files , i can retry the installation at zero ...

I really want to install this library it's for a project with a Fox g20 card .. ^^

Thanks for your help !

rcolistete 2012-02-03 00:24

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by blinkman04 (Post 1159701)
Yes, no problems =)

What about your "Settings / Applications / Installations / Allow installations from non-Store sources" ? Is it on (blue toogle) ? I forgot to explain this needed step in the 1st message of this topic.

Another question : IPython 0.10.2 can be installed on your N9 ?

blinkman04 2012-02-03 07:40

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
yes it is on.

Python is installed and works fine when i enter 'ipython' command line

rcolistete 2012-02-03 12:54

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by blinkman04 (Post 1159821)
Python is installed and works fine when i enter 'ipython' command line

But can you install 'ipython_0.10.2-1harmattan1_all.deb' package on your N9 without errors ? Or 'python-sympy_0.7.1-harmattan-2_all.deb' package ? Look at the IPython and SymPy topics.

blinkman04 2012-02-06 15:54

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
I just tried to install 'ipython_0.10.2-1harmattan1_all.deb' package on my N9 and .. i had the same errors.. =/

(Sorry for the answer late .. i had lot of homework for school ^^ )

Do you think i lost this error with a reinstallation software with Nokia SU ?

rcolistete 2012-02-06 17:02

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by blinkman04 (Post 1161296)
I just tried to install 'ipython_0.10.2-1harmattan1_all.deb' package on my N9 and .. i had the same errors.. =/

Now I know that the problem is not specific to MatPlotLib, but problably any .deb outside Nokia Store.

The normal solution would be :

http://techprolonged.com/index.php/2...ego-harmattan/

which I suggested some posts before and you confirmed that this setting is already enabled.

Quote:

Originally Posted by blinkman04 (Post 1161296)
Do you think i lost this error with a reinstallation software with Nokia SU ?

Maybe you have a problem in your MeeGo Harmattan and indeed it is needed to reinstall it.

Try to install other .debs outside Nokia Store to confirm the nature of the problem. For example : FirexFox/Fennec (see My-MeeGo site), MeeFolders (here in Talk Maemo.org), etc.

Keep me updated about your problem.

thedead1440 2012-02-06 17:10

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
could you do a reboot and try installing it again. sometimes if a background installation isn't completed i've received the same error. a reboot and some wait later the installation goes through well. sry if not useful, just a tip to try.

blinkman04 2012-02-06 19:22

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Yes i try restart thedead1440 ^^ Don't worry !

rcolistete thanks i go try this solution , and for information Fenne it's already installed on my N9, but for install fennec i just double click on the file ^^

I keep you updated soon =):D

rcolistete 2012-02-06 19:28

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by blinkman04 (Post 1161372)
rcolistete thanks i go try this solution , and for information Fenne it's already installed on my N9, but for install fennec i just double click on the file ^^

IPython and SymPy for MeeGo Harmattan can also be installed by double tapping the file, see the topics :

http://talk.maemo.org/showthread.php?t=78568
http://talk.maemo.org/showthread.php?t=79997


Please try to install them. As I have packaged SymPy, IPython and MatPlotLib for MeeGo Harmattan, if one install and another don't, I can compare my configuration files to try to find the problem.

blinkman04 2012-02-06 19:47

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Python Sympy is installed but Ipthon don't ...

In french --> " Installation impossible. Programme d'installation invalide "

rcolistete 2012-02-14 21:16

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Anyone else with the same problem of blinkman04 ?

I have no solution because I am not able to reproduce the problem.

blinkman04 2012-02-14 23:47

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
If you want i show my problem with a vidéo .. But i try to intalled a 2nd fois my N9 soon.

ep1010 2012-05-28 06:42

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
I know this post has been around for awhile, but i faced the same problem, as i can't install those deb file for the exact same problem. I can install and run ipython, Numpy and Sympy but not Matlibplot, so it was kinda frustrating, as I tried all the method i can think of.
Quote:

Originally Posted by blinkman04 (Post 1159161)
Hello !

I had just a little problem when i try to install the Library...

When i enter this command : " # dpkg -i python-matplotlib-data_1.0.0-1_all.deb "

My N9 returning this error : "Aegis rejecting python-matplotlib-data_1.0.0-1_all.deb : Could not open debian archive
Aegis aborting dpkg -- all listed package files rejected"

Can i clean this error ? What ? Thanks for your help... ^^


Sorry for my approxymatly english .. i'm french ^^


rcolistete 2012-05-28 13:24

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by ep1010 (Post 1213622)
I know this post has been around for awhile, but i faced the same problem, as i can't install those deb file for the exact same problem. I can install and run ipython, Numpy and Sympy but not Matlibplot, so it was kinda frustrating, as I tried all the method i can think of.

Could you tell me more about your Harmattan smartphone ? Nokia N9 or N950 ? With PR1.2 ?

ep1010 2012-05-29 00:50

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Quote:

Originally Posted by rcolistete (Post 1213802)
Could you tell me more about your Harmattan smartphone ? Nokia N9 or N950 ? With PR1.2 ?

I am using a Nokia n9 with PR1.2(30.2012.07-1_PR_001).

rcolistete 2012-07-22 08:10

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
My N9 now has PR1.3 and MatPlotLib (python-matplotlib-data & python-matplotlib) is successfully installed using "# dpkg -i" as root and "Allow installations from non-store sources" turned on.

I symply can not reproduce the installation errors of blinkman4 and ep1010 users.

rcolistete 2013-02-01 19:33

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Updated the 1st post with easier installation instructions (using my Harmattan repository), and easier use of MatPlotLib with IPython 0.13.1 Notebook or Qt console.

rcolistete 2013-02-10 04:28

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
(09/02/2013) MatPlotLib 1.2.0 is now released for MeeGo Harmattan, just 1 month after the upstream release (08/01/2013), with interactive graphical backend on Nokia N9/N950 and many new features.

MatPlotLib 1.2.0 Harmattan is based on Ubuntu 13.04 version and MatPlotLib 1.2.0 source code, without Python 3 support, no debug package, adapted dependencies to MeeGo Harmattan, etc.

See 1st post por details about installing and using MatPlotLib 1.2.0.

Time to load MatPlotLib 1.2.0 on Nokia N9 :
- 0.7-0.9 s via "from matplotlib import *" ;
- 2.0-2.3 s (with NumPy 1.4.1 or 1.7.0) via "import pylab" or "from pylab import *".
Comparing with MatPlotLib 1.0.0 :
- 0.7-0.9 s via "from matplotlib import *" ;
- 1.5-1.7 s (with NumPy 1.4.1 or 1.7.0) via "import pylab" or "from pylab import *".

Benchmarks of MatPlotLib examples (see posts #1 and #4) with NumPy 1.4.1 (from Nokia repositories) on Nokia N9 :
simple_plot.py : 2.9s (1.0.0), 4.4s (1.2.0)
surface3d_demo.py : 10.0s (1.0.0), 9.7s (1.2.0)
convfield.py : 2.8s (1.0.0), 4.6s (1.2.0)
plotfx.py : 6.1s (1.0.0), 8.4s (1.2.0)
contourfxy.py : 7.4s (1.0.0), 10.2s (1.2.0)
densityfxy.py : 7.5s (1.0.0), 10.3s (1.2.0)
vectorfieldFxy.py : 5.8s (1.0.0), 8.2s (1.2.0)
surfacefxy.py : 19.7s (1.0.0), 16.6s (1.2.0)

The same, but using new NumPy 1.7.0 on Nokia N9 :
simple_plot.py : 3.2s (1.0.0), 4.8s (1.2.0)
surface3d_demo.py : 12.1s (1.0.0), 10.9s (1.2.0)
convfield.py : 3.2s (1.0.0), 4.8s (1.2.0)
plotfx.py : 6.4s (1.0.0), 8.9s (1.2.0)
contourfxy.py : 8.3s (1.0.0), 10.9s (1.2.0)
densityfxy.py : 8.0s (1.0.0), 10.6s (1.2.0)
vectorfieldFxy.py : 6.5s (1.0.0), 8.6s (1.2.0)
surfacefxy.py : 22.8s (1.0.0), 19.0s (1.2.0)

As we see above :
- MatPlotLib 1.2.0 is slower than v1.0.0, except for surface 3D plots;
- using NumPy 1.7.0 is slower than v1.4.1.

rcolistete 2013-02-11 16:03

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
If anyone still wants old MatPlotLib 1.0.0 for some reason :

1) download from my Harmattan repository :
python-matplotlib-data_1.0.0-1_all.deb
python-matplotlib_1.0.0-1_armel.deb

2) install dependencies, as root in Terminal :
# apt-get install python-central python-support python-numpy python-dateutil python-gobject python-cairo

3) install MatPlotLib 1.0.0, again as root in Terminal, in the same directory where the files where downloaded :
# dpkg -i python-matplotlib-data_1.0.0-1_all.deb
# dpkg -i python-matplotlib_1.0.0-1_armel.deb

4) configure MatPlotLib 1.0.0, in Terminal as root :
# mkdir /usr/lib/python2.6/dist-packages/matplotlib/mpl-data
As user :
$ cd ~
$ rm -rf .matplotlib
$ mkdir .matplotlib
$ echo 'datapath : /usr/share/matplotlib/mpl-data' > .matplotlib/matplotlibrc
MatPlotLib 1.0.0 has no interactive graphical backend, so "show()" doesn't work, instead use "savefig" command to save plots to files.

MatPlotLib 1.2.0 is a lot simpler to install (see 1st post) and has more features on MeeGo Harmattan. See the benchmark of MatPlotLib 1.0.0 x 1.2.0 in the previous post.

rcolistete 2013-02-11 18:06

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
NumPy 1.7.0 is released today (11/02/2013), just one day after the mainstream release.

MatPlotLib is compatible with both NumPy 1.4.1 (from Nokia repositories) and v1.7.0 (from my Harmattan repository). See the benchmarks in post #32 above.

rcolistete 2013-02-11 18:11

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
MatPlotLib 1.2.0 Harmattan1 from 09/02/2013 had an error (dependency of NumPy limited to v1.5) which was fixed late yesterday (10/02/2013). So who installed MatPlotLib 1.2.0 in 09-10/02/2013, please reinstall it, as root in Terminal :
# apt-get install --reinstall python-matplotlib

Mric 2013-02-11 18:33

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
This is an awesome program !!!
Thank you developer :)

rcolistete 2013-02-12 02:15

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
(12/02/2013) MatPlotLib 1.2.0-2 Harmattan is released, now the interactive Qt4/PySide default backend opens in full screen, so Nokia N9/N950 screen is better used.

See the 1st post to install/update, i.e., "apt-get update" then "apt-get install python-matplotlib" as root in Terminal.

Before the new release : Ahahhh, I've figured out how to show the Qt4/PySide backend in full screen :) Just one new line of code, PyQt4/PySide rocks ! And it deserves a new version : Matplotlib 1.2.0 Harmattan2.

See the new IPython 0.13.1-3 which fixes the bug which prevented dialog boxes to work on Qt4 backend, so save button, vkb on text fields, etc, don't work .

With MatPlotLib 1.2.0-2 and IPython 0.13.1-3, your Nokia N9/N950 will show Qt4/PySide backend in full screen and with working dialogs boxes.

rcolistete 2013-06-06 13:54

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
(06/06/2013) MatPlotLib 1.2.1 is released for MeeGo Harmattan.

MatPlotLib 1.2.1 (26/03/2013) is an upstream bug fix release for v1.2.0 (08/01/2013).

It needs NumPy >= 1.7.x, even if it asks for NumPy 1.4.1. See next version for this dependency fix.

MatPlotLib 1.2.1 Harmattan is based on Ubuntu 13.04 version and MatPlotLib 1.2.1 source code, without Python 3 support, no debug package, adapted dependencies to MeeGo Harmattan, etc.

See the 1st post to install/update, i.e., "apt-get update" then "apt-get install python-matplotlib" as root in Terminal.

rcolistete 2013-06-15 23:29

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
(15/06/2013) MatPlotLib 1.2.1-2 Harmattan released, just to force NumPy 1.7.x as dependency.

For some reason, MatPlotLib 1.2.1 needs NumPy 1.7.x to compile and also to run, while MatPlotLib 1.2.0 only needed NumPy 1.4.0.

rcolistete 2014-09-30 19:11

Re: [Announce] MatPlotLib - 2D & 3D plots for MeeGo Harmattan
 
Thanks, irulestar. There is a depency, "python-dateutil", needed by MatPlotLib 1.2.1 but not listed. Until I release a new MatPlotLib version (1.3.1 or 1.4.0) in the following days, a workaround is to install "python-dateutil" in Terminal (with developer mode on) :
$ devel-su
then type the root password (default is 'rootme'), then
# apt-get install python-dateutil


All times are GMT. The time now is 04:34.

vBulletin® Version 3.8.8