From Fedora Project Wiki
(New page for "testing" the software shipped with Fedora scientific) |
No edit summary |
||
Line 35: | Line 35: | ||
import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
plt.plot([1,2,3]) | |||
plt.show() | |||
</pre> | |||
The default backend is <code>Qt4Agg</code>. The next scripts will test thee<code>TkAgg</code> backend. | |||
*Basic plotting with the <code>TkAgg</code> backend using the <code>pylab</code> module: | |||
<pre> | |||
# basic plotting with default backend | |||
import matplotlib | |||
matplotlib.use('TkAgg') | |||
from pylab import plot, show | |||
plot([1,2,3]) | |||
show() | |||
</pre> | |||
*Basic plotting with the <code>TkAgg</code> backend using the <code>maplotlib</code> package: | |||
<pre> | |||
# basic plotting using the matplotlib interface | |||
import matplotlib | |||
matplotlib.use('tkagg') | |||
import matplotlib.pyplot as plt | |||
plt.plot([1,2,3]) | plt.plot([1,2,3]) | ||
plt.show() | plt.show() |
Revision as of 06:47, 5 September 2013
(Refer: Scientific_Spin)
C programming
Including use of math, gsl
C++ programming
Use of libraries such as Bliz++ and others
Java programming
Use of libraries
matplotlib
Please test the following with both Python 2 and Python 3.
- Basic plotting with the default backend using the
pylab
module:
# basic plotting with default backend from pylab import plot, show plot([1,2,3]) show()
- Basic plotting with the default backend using the
maplotlib
package:
# basic plotting using the matplotlib interface import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.show()
The default backend is Qt4Agg
. The next scripts will test theeTkAgg
backend.
- Basic plotting with the
TkAgg
backend using thepylab
module:
# basic plotting with default backend import matplotlib matplotlib.use('TkAgg') from pylab import plot, show plot([1,2,3]) show()
- Basic plotting with the
TkAgg
backend using themaplotlib
package:
# basic plotting using the matplotlib interface import matplotlib matplotlib.use('tkagg') import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.show()