[Matplotlib-users] Failed to save eps

2010-05-10 Thread afancy
Hi,

Could anybody help me to take a look my following code? When I save it to
eps format, the eps file is corrupted. But i can save as pdf format
successfully instead.

Regards
tommy


from matplotlib.font_manager import FontProperties
data = ((16.31, 76.35, 62.62, 135.2),
(6.4, 12.64, 87, 124.8 ),
(6.08,60.18,75.2,100.59))

color=('b','r','g','y')
width = 0.2
fig = plt.figure()
fig.set_size_inches((4.2,4.2))

ax = fig.add_axes((0.2,0.1,0.75,0.
8))
rects=[]
xticks=[]
patterns = ('...','//','xx', '')

for i in range(len(data)):
row = data[i]
for j in range(len(row)):
rect, = ax.bar(i+width*j, row[j], width,fill=False,
edgecolor='black', hatch=patterns[j])
rect.set_hatch(patterns[j])
rect.set_fill(False)
if i==0:
rects.append(rect)
xticks.append(i+2*width)

ax.set_xticks(xticks)
ax.set_xticklabels(('Q1(s,p1,*)','Q2(s,p2,*)','Q3(s,p3,*)'))
ax.set_ylabel('Resp. time (ms)')
lg=fig.legend(rects,
('3XL-Array','3XL-MP','Jena2(db-based)','Jena2(file-based)'),
loc=(0.65,0.7), prop=FontProperties(size=9))
lg.draw_frame(False)
draw()
fig.savefig("4b.eps", format="eps",  bbox_inches='tight')   # Failed to
save, the eps is corrupted
#fig.savefig("4b.pdf", format="pdf",  bbox_inches='tight')   # pdf format
can be save correctly.
--

___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] IRC for matplotlib

2010-03-11 Thread afancy
Hi,

Could anybody know if there is IRC for matplotlib? as I cannot find it.
Thanks


Regards,
afancy
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Hi, why do i get KeyError: 'Patch' ? thanks

2010-02-28 Thread afancy
xi...@master:/tmp/matplotlib-0.99.1.1$ python
Python 2.6 (r26:66714, Nov  3 2009, 17:33:38)
[GCC 4.4.1 20090725 (Red Hat 4.4.1-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):

  File "", line 1, in 

  File "/usr/lib/python2.6/site-packages/matplotlib/pyplot.py", line
6, in 

from matplotlib.figure import Figure, figaspect
  File "/usr/lib/python2.6/site-packages/matplotlib/figure.py", line
18, in 

from axes import Axes, SubplotBase, subplot_class_factory

  File "/usr/lib/python2.6/site-packages/matplotlib/axes.py", line 24,
in 

import matplotlib.spines as mspines
  File "/usr/lib/python2.6/site-packages/matplotlib/spines.py", line
17, in 

class Spine(mpatches.Patch):
  File "/usr/lib/python2.6/site-packages/matplotlib/spines.py", line
39, in Spine

@docstring.dedent_interpd
  File "/usr/lib/python2.6/site-packages/matplotlib/docstring.py",
line 103, in dedent_interpd

return interpd(dedent(func))
  File "/usr/lib/python2.6/site-packages/matplotlib/docstring.py",
line 36, in __call__

func.__doc__ = func.__doc__ and func.__doc__ % self.params
KeyError: 'Patch'
>>>
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Problem on matplot installation

2010-02-28 Thread afancy
xi...@master:/tmp/matplotlib-0.99.1.1$ python setup.py build

BUILDING MATPLOTLIB
matplotlib: 0.99.1.1
python: 2.6 (r26:66714, Nov  3 2009, 17:33:38)  [GCC 4.4.1
20090725 (Red Hat 4.4.1-2)]
  platform: linux2

REQUIRED DEPENDENCIES
 numpy: 1.3.0
 freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.37
   Tkinter: Tkinter: 65971, Tk: 8.5, Tcl: 8.5
  wxPython: 2.8.10.1
* WxAgg extension not required for wxPython >= 2.8
  Gtk+: gtk+: 2.16.6, glib: 2.20.5, pygtk: 2.14.1,
pygobject: 2.16.1
   Mac OS X native: no
Qt: no
   Qt4: no
 Cairo: 1.8.2

OPTIONAL DATE/TIMEZONE DEPENDENCIES
  datetime: present, version unknown
  dateutil: 1.4.1
  pytz: 2008i

OPTIONAL USETEX DEPENDENCIES
dvipng: no
   ghostscript: 8.70
 latex: 3.141592
   pdftops: 0.10.7

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections',
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid',
'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', '
matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra',
'matplotlib.numerix.random_array', 'matplotlib.numerix.fft',
'matplotlib.delaunay']
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf ->
build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
xi...@master:/tmp/matplotlib-0.99.1.1$ sudo python setup.py install

BUILDING MATPLOTLIB
matplotlib: 0.99.1.1
python: 2.6 (r26:66714, Nov  3 2009, 17:33:38)  [GCC 4.4.1
20090725 (Red Hat 4.4.1-2)]
  platform: linux2

REQUIRED DEPENDENCIES
 numpy: 1.3.0
 freetype2: 9.20.3

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.37
   Tkinter: Tkinter: 65971, Tk: 8.5, Tcl: 8.5
  wxPython: 2.8.10.1
* WxAgg extension not required for wxPython >= 2.8
  Gtk+: gtk+: 2.16.6, glib: 2.20.5, pygtk: 2.14.1,
pygobject: 2.16.1
   Mac OS X native: no
Qt: no
   Qt4: no
 Cairo: 1.8.2

OPTIONAL DATE/TIMEZONE DEPENDENCIES
  datetime: present, version unknown
  dateutil: 1.4.1
  pytz: 2008i

OPTIONAL USETEX DEPENDENCIES
dvipng: no
   ghostscript: 8.70
 latex: 3.141592
   pdftops: 0.10.7

[Edit setup.cfg to suppress the above messages]

pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.projections',
'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid',
'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', '
matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra',
'matplotlib.numerix.random_array', 'matplotlib.numerix.fft',
'matplotlib.delaunay']
running install
running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc ->
build/lib.linux-i686-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf ->
build/lib.linux-i686-2.6/matplotlib/mpl-data
running build_ext
running install_lib
copying build/lib.linux-i686-2.6/matplotlib/mpl-data/matplotlibrc ->
/usr/lib/python2.6/site-packages/matplotlib/mpl-data
copying build/lib.linux-i686-2.6/matplotlib/mpl-data/matplotlib.conf ->
/usr/lib/python2.6/site-packages/matplotlib/mpl-data
running install_egg_info
Removing /usr/lib/python2.6/site-packages/matplotlib-0.99.1.1-py2.6.egg-info
Writing /usr/lib/python2.6/site-packages/matplotlib-0.99.1.1-py2.6.egg-info
xi...@master:/tmp/matplotlib-0.99.1.1$ ipython -pylab
/usr/lib/python2.6/site-packages/IPython/Magic.py:38: DeprecationWarning:
the sets module is deprecated
  from sets import Set
Traceback (most recent call last):
  File "/usr/bin/ipython", line 28, in 
IPython.Shell.start().mainloop()
  File "/usr/lib/python2.6/site-packages/IPython/Shell.py", line 1233, in
start
return shell(user_ns = user_ns)
  File "/usr/lib/python2.6/site-packages/IPython/Shell.py", line 1108, in
__init__
shell_class=MatplotlibMTShell)
  File "/usr/lib/python2.6/site-packages/IPython/Shell.py", line 793, in
__init__
on_kill=[mainquit])
  File "/usr/lib/python2.6/site-packages/IPython/ipmaker.py", li

[Matplotlib-users] Cannot change the fontsize in table.

2010-02-25 Thread afancy
Hi,

I want to generate a graph with line, and table at the bottom. However, I
found that the fontsize is very small and it is unchangeable.  Could anybody
help me? thanks

Regards
afancy


fig=figure()

ax=fig.add_subplot(111)

data=(
  (0.529, 0.612,   0.855, 0.178,  1.432, 6.43,   41.311,  1.62,
71.012,  1.59,   0.271,  0.066,  4.721),
 (0.014, 0.512,   0.015, 0.161,  1.177, 6.793,  0.089,   1.495,
25.65,   0.014,  0.045,  0.052,  5.423),
   (0.493, 834.351, 0.156, 743.193,0.428, 84.101, 1058.062,8.652,
1023,0.168,  7.101,  8.135,  152.646),
  (118.90,2035.35, 89.35, 15.402, 10.856,110.049,3024.42,
8054.74,5214.36, 5.539,  11.539, 515.632,150.411)
 )

rowLabels=['row1','row2', 'row3', 'row4']

colLabels=['Q%d'%(x+1) for x in range(13)]

the_table = table(cellText=txtdata, rowLabels=rowLabels,
colLabels=colLabels,  loc='bottom')

the_table.set_fontsize(20.0)
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Cannot draw bar chart with log scale

2010-02-25 Thread afancy
Hi,

I have some difficulty to use the log scale on bar chart. Could anybody help
me, thanks in advace.

Regards,
afancy

from matplotlib.font_manager import FontProperties
data=((0.014, 0.512,   0.015, 0.161,  1.177, 6.793,  0.089,   1.495,
25.65,   0.014,  0.045,  0.052,  5.423),
  (0.529, 0.612,   0.855, 0.178,  1.432, 6.43,   41.311,  1.62,
71.012,  1.59,   0.271,  0.066,  4.721),
  (0.493, 834.351, 0.156, 743.193,0.428, 84.101, 1058.062,8.652,
1023,0.168,  7.101,  8.135,  152.646),
  (118.90,2035.35, 89.35, 15.402, 10.856,110.049,3024.42,
8054.74,5214.36, 5.539,  11.539, 515.632,150.411)
  )

rects=[]
xticks=[]
patterns = ('/','x', '\\','o')
colors=['r','b','y', 'g']

fig = figure()
ax=fig.add_subplot(111)

ax.set_yscale('log')
ax.set_ylim(1e-4, 1e5)
width=0.1

for q in range(13):
for n in range(4):
l = q+width*n
h = data[n][q]
w =  width
rect, = ax.bar(l, h, w, bottom=0, fill=False, hatch=patterns[n],
log=True)


draw()
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users