Create Graphs in Python 2.5.4

Hi,

Someone can help me to configure the python to create uma image graph
with the matplotlib or can sugest other way to create one graph in
this version of python?

I need use the Python 2.5.*
I instaled the Python 2.5.4, the "numpy-1.3.0.win32-py2.5", the
"matplotlib-1.1.0.win32-py2.5" and the "basemap-1.0.2.win32-py2.5".

####### This is the code that I try to run #########################

#set up matplotlib and the figure
import matplotlib.pyplot as plt
plt.figure

#create data
x_series = [0,1,2,3,4,5]
y_series_1 = [x**2 for x in x_series]
y_series_2 = [x**3 for x in x_series]

#plot data
plt.plot(x_series, y_series_1, label="x^2")
plt.plot(x_series, y_series_2, label="x^3")

#add in labels and title
plt.xlabel("Small X Interval")
plt.ylabel("Calculated Data")
plt.title("Our Fantastic Graph")

#add limits to the x and y axis
plt.xlim(0, 6)
plt.ylim(-5, 80)

#create legend
plt.legend(loc="upper left")

#save figure to png
plt.savefig("example.png")

####### The error that I received ##########################

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

···

****************************************************************
    Personal firewall software may warn about the connection IDLE
    makes to its subprocess using this computer's internal loopback
    interface. This connection is not visible on any external
    interface and no data is sent to or received from the Internet.
    ****************************************************************

IDLE 1.2.4 ==== No Subprocess ====

Traceback (most recent call last):
  File "C:\Projeto\Scripts\teste.py", line 2, in <module>
    import matplotlib.pyplot as plt
  File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line 23,
in <module>
    from matplotlib.figure import Figure, figaspect
  File "C:\Python25\lib\site-packages\matplotlib\figure.py", line 16,
in <module>
    import artist
  File "C:\Python25\lib\site-packages\matplotlib\artist.py", line 6, in <module>
    from transforms import Bbox, IdentityTransform, TransformedBbox,
TransformedPath
  File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line
34, in <module>
    from matplotlib._path import affine_transform
ImportError: DLL load failed: The specified module could not be found.

Best regards,
Vítor Carvalho

The C++ runtime library msvcp71.dll is probably missing on your system. Try install "vc71crt-3052.4.win32-py2.5.‌exe" from <http://www.lfd.uci.edu/~gohlke/pythonlibs/#vc.crt>.

Christoph

···

On 1/11/2012 7:37 AM, Vítor Carvalho wrote:

Hi,

Someone can help me to configure the python to create uma image graph
with the matplotlib or can sugest other way to create one graph in
this version of python?

I need use the Python 2.5.*
I instaled the Python 2.5.4, the "numpy-1.3.0.win32-py2.5", the
"matplotlib-1.1.0.win32-py2.5" and the "basemap-1.0.2.win32-py2.5".

####### This is the code that I try to run #########################

#set up matplotlib and the figure
import matplotlib.pyplot as plt
plt.figure

#create data
x_series = [0,1,2,3,4,5]
y_series_1 = [x**2 for x in x_series]
y_series_2 = [x**3 for x in x_series]

#plot data
plt.plot(x_series, y_series_1, label="x^2")
plt.plot(x_series, y_series_2, label="x^3")

#add in labels and title
plt.xlabel("Small X Interval")
plt.ylabel("Calculated Data")
plt.title("Our Fantastic Graph")

#add limits to the x and y axis
plt.xlim(0, 6)
plt.ylim(-5, 80)

#create legend
plt.legend(loc="upper left")

#save figure to png
plt.savefig("example.png")

####### The error that I received ##########################

Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
Type "copyright", "credits" or "license()" for more information.

     ****************************************************************
     Personal firewall software may warn about the connection IDLE
     makes to its subprocess using this computer's internal loopback
     interface. This connection is not visible on any external
     interface and no data is sent to or received from the Internet.
     ****************************************************************

IDLE 1.2.4 ==== No Subprocess ====

Traceback (most recent call last):
   File "C:\Projeto\Scripts\teste.py", line 2, in<module>
     import matplotlib.pyplot as plt
   File "C:\Python25\lib\site-packages\matplotlib\pyplot.py", line 23,
in<module>
     from matplotlib.figure import Figure, figaspect
   File "C:\Python25\lib\site-packages\matplotlib\figure.py", line 16,
in<module>
     import artist
   File "C:\Python25\lib\site-packages\matplotlib\artist.py", line 6, in<module>
     from transforms import Bbox, IdentityTransform, TransformedBbox,
TransformedPath
   File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line
34, in<module>
     from matplotlib._path import affine_transform
ImportError: DLL load failed: The specified module could not be found.

Best regards,
Vítor Carvalho