Thread
:
[Announce] MatPlotLib  2D & 3D plots for MeeGo Harmattan
View Single Post
rcolistete
20111126 , 18:21
Posts: 1,125  Thanked: 2,952 times  Joined on May 2011 @ Brazil
#
4
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.
contourfxy.py : contour plot of two variables, f=f(x,y), saving to a (PNG) file. Takes 10.2 s on Nokia N9.
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.
vectorfieldFxy.py : vector field plot in 2D, F=F(x,y), saving to a (PNG) file. Takes 8.2 s on Nokia N9.
surfacefxy.py : surface plot of two variables, f=f(x,y), saving to a (PNG) file. Takes 16.6 s on Nokia N9.
__________________
Python, C/C++, Qt and CAS developer. For Maemo/MeeGo/Sailfish :
Integral
,
Derivative
,
Limit
 calculating mathematical integrals, derivatives and limits.
SymPy
 Computer Algebra System.
MatPlotLib
 2D & 3D plots in Python.
IPython
 Python interactive shell.

My blog about mobile & scientific computing

Jolla. 2 Nokia N9 16GB Black @ 1.35 GHz, 1 with Sailfish, Stowaway foldable BT keyboard.
Nexus 4 with Sailfish. Nokia N900 @ 1.1 GHz. N810. Nokia 9500. Psion Revo+.
Last edited by rcolistete; 20130211 at
16:42
. Reason: Timings for MatPlotLib 1.2.0.
Quote & Reply

The Following 6 Users Say Thank You to rcolistete For This Useful Post:
aRTee
,
Joseph9560
,
lolloo
,
StefanL
,
vielfrass
,
Wikiwide
rcolistete
View Public Profile
Send a private message to rcolistete
Visit rcolistete's homepage!
Find all posts by rcolistete