problem in plotting cylinders with differnet colour

import numpy

from enthought.mayavi import mlab

#def test_mesh():
#"""A very pretty picture of spherical harmonics translated from

#the octaviz example."""
for r in range (1,5):
   print r

   pi = numpy.pi

   cos = numpy.cos

   sin = numpy.sin

   dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01

   #[phi,theta] = numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
   [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]

   m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;

  # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
cos(m6*theta)**m7

   #x = 1*sin(phi)*cos(theta)

   #y = 1*sin(phi)*sin(theta)

   #z = 1*cos(phi);
   x=r*cos(phi)
   y=r*sin(phi)
   z=z
   i=['Reds','greens','autumn','purples']
   print i[r-1]
   e=i[r-1]

   mlab.mesh(x, y, z,colormap='e')
   #print i[r-1]

Error:
TypeError Traceback (most recent call last)
C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
execfile(fname, glob, loc)
   166 else:
   167 filename = fname
--> 168 exec compile(scripttext, filename, 'exec') in glob, loc
   169 else:
   170 def execfile(fname, *where):

C:\Users\as\jhgf.py in <module>()
    24 print i[r-1]
    25 e=i[r-1]
---> 26 mlab.mesh(x, y, z,'e')
    27 #print i[r-1]

    28

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
the_function(*args, **kwargs)
    32 def document_pipeline(pipeline):
    33 def the_function(*args, **kwargs):
---> 34 return pipeline(*args, **kwargs)
    35
    36 if hasattr(pipeline, 'doc'):

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call__(self, *args, **kwargs)
    77 scene.disable_render = True
    78 # Then call the real logic

---> 79 output = self.__call_internal__(*args, **kwargs)
    80 # And re-enable the rendering, if needed.

    81 if scene is not None:

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call_internal__(self, *args, **kwargs)
   830 filters.
   831 """
--> 832 self.source = self._source_function(*args, **kwargs)
   833 kwargs.pop('name', None)
   834 self.store_kwargs(kwargs)

TypeError: grid_source() takes exactly 3 arguments (4 given)

Didn't this get answered on the python tutor mailing list within the last couple of hours? What's with it with you?

···

On 14/02/2012 13:52, Debashish Saha wrote:

import numpy

from enthought.mayavi import mlab

#def test_mesh():
#"""A very pretty picture of spherical harmonics translated from

#the octaviz example."""
for r in range (1,5):
    print r

    pi = numpy.pi

    cos = numpy.cos

    sin = numpy.sin

    dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01

    #[phi,theta] = numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
    [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]

    m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;

   # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
cos(m6*theta)**m7

    #x = 1*sin(phi)*cos(theta)

    #y = 1*sin(phi)*sin(theta)

    #z = 1*cos(phi);
    x=r*cos(phi)
    y=r*sin(phi)
    z=z
    i=['Reds','greens','autumn','purples']
    print i[r-1]
    e=i[r-1]

    mlab.mesh(x, y, z,colormap='e')
    #print i[r-1]

Error:
TypeError Traceback (most recent call last)
C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
execfile(fname, glob, loc)
    166 else:
    167 filename = fname
--> 168 exec compile(scripttext, filename, 'exec') in glob, loc
    169 else:
    170 def execfile(fname, *where):

C:\Users\as\jhgf.py in<module>()
     24 print i[r-1]
     25 e=i[r-1]
---> 26 mlab.mesh(x, y, z,'e')
     27 #print i[r-1]

     28

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
the_function(*args, **kwargs)
     32 def document_pipeline(pipeline):
     33 def the_function(*args, **kwargs):
---> 34 return pipeline(*args, **kwargs)
     35
     36 if hasattr(pipeline, 'doc'):

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call__(self, *args, **kwargs)
     77 scene.disable_render = True
     78 # Then call the real logic

---> 79 output = self.__call_internal__(*args, **kwargs)
     80 # And re-enable the rendering, if needed.

     81 if scene is not None:

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call_internal__(self, *args, **kwargs)
    830 filters.
    831 """
--> 832 self.source = self._source_function(*args, **kwargs)
    833 kwargs.pop('name', None)
    834 self.store_kwargs(kwargs)

TypeError: grid_source() takes exactly 3 arguments (4 given)

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

--
Cheers.

Mark Lawrence.

A couple of things I would like to point out here:

1.) It is possible that Debashish sent similar questions to multiple mailing lists in the hopes to maximize the chance of getting a response. It may only “appear” that this thread was started after having the question answered on another mailing list because of the delays that are notorious on this list. I suspect he sent both emails at around the same time, but the python tutors list processed it faster than the matplotlib-users list.

Therefore…

2.) I would like to make sure that this mailing list remains a welcoming forum for all users, and for all of us to understand that people have different mailing habits that we may not be familiar with. Therefore, gentle reminders of mailing decorum (such as reminders to bottom-post) should be the response, not chastising.

– Debashish,

We are more than happy to help you. Please keep your question to a single mailing list at a time. The users on the mailing list will let you know if you should direct your question elsewhere. In the case of your problem, it is not matplotlib, but mayavi. Hopefully, you have been directed to the mayavi mailing list.

Cheers!
Ben Root

···

On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence <breamoreboy@…225…> wrote:

On 14/02/2012 13:52, Debashish Saha wrote:

import numpy

from enthought.mayavi import mlab

#def test_mesh():

#“”"A very pretty picture of spherical harmonics translated from

#the octaviz example.“”"

for r in range (1,5):

print r
pi = numpy.pi
cos = numpy.cos
sin = numpy.sin
dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
#[phi,theta] = numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]
[phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;

r = sin(m0phi)**m1 + cos(m2phi)**m3 + 5sin(m4theta)**m5 +

cos(m6*theta)**m7

#x = 1*sin(phi)*cos(theta)
#y = 1*sin(phi)*sin(theta)
#z = 1*cos(phi);
x=r*cos(phi)
y=r*sin(phi)
z=z
i=['Reds','greens','autumn','purples']
print i[r-1]
e=i[r-1]
mlab.mesh(x, y, z,colormap='e')
#print i[r-1]

Error:

TypeError Traceback (most recent call last)

C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in

execfile(fname, glob, loc)

166             else:
167                 filename = fname

→ 168 exec compile(scripttext, filename, ‘exec’) in glob, loc

169     else:
170         def execfile(fname, *where):

C:\Users\as\jhgf.py in()

 24     print i[r-1]
 25     e=i[r-1]

—> 26 mlab.mesh(x, y, z,‘e’)

 27     #print i[r-1]
 28

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

the_function(*args, **kwargs)

 32 def document_pipeline(pipeline):
 33     def the_function(*args, **kwargs):

—> 34 return pipeline(*args, **kwargs)

 35
 36     if hasattr(pipeline, 'doc'):

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

call(self, *args, **kwargs)

 77             scene.disable_render = True
 78         # Then call the real logic

—> 79 output = self.call_internal(*args, **kwargs)

 80         # And re-enable the rendering, if needed.
 81         if scene is not None:

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

call_internal(self, *args, **kwargs)

830         filters.
831         """

→ 832 self.source = self._source_function(*args, **kwargs)

833         kwargs.pop('name', None)
834         self.store_kwargs(kwargs)

TypeError: grid_source() takes exactly 3 arguments (4 given)


Keep Your Developer Skills Current with LearnDevNow!

The most comprehensive online learning library for Microsoft developers

is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,

Metro Style Apps, more. Free future releases when you subscribe now!

http://p.sf.net/sfu/learndevnow-d2d

Didn’t this get answered on the python tutor mailing list within the

last couple of hours? What’s with it with you?

Cheers.

Mark Lawrence.

Please accept my apologies if I breached protocol but there are five threads from the OP on the Python tutor mailing list, each of which has had one or more replies. Two of them don't actually ask a question, the above being one, and the OP hasn't had the courtesy to reply to anyone with a thank you or anything else.

···

On 15/02/2012 17:21, Benjamin Root wrote:

On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<breamoreboy@...225...>wrote:

On 14/02/2012 13:52, Debashish Saha wrote:

import numpy

from enthought.mayavi import mlab

#def test_mesh():
#"""A very pretty picture of spherical harmonics translated from

#the octaviz example."""
for r in range (1,5):
     print r

     pi = numpy.pi

     cos = numpy.cos

     sin = numpy.sin

     dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01

     #[phi,theta] =

numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]

     [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]

     m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;

    # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
cos(m6*theta)**m7

     #x = 1*sin(phi)*cos(theta)

     #y = 1*sin(phi)*sin(theta)

     #z = 1*cos(phi);
     x=r*cos(phi)
     y=r*sin(phi)
     z=z
     i=['Reds','greens','autumn','purples']
     print i[r-1]
     e=i[r-1]

     mlab.mesh(x, y, z,colormap='e')
     #print i[r-1]

Error:
TypeError Traceback (most recent call

last)

C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
execfile(fname, glob, loc)
     166 else:
     167 filename = fname
--> 168 exec compile(scripttext, filename, 'exec') in glob,

loc

     169 else:
     170 def execfile(fname, *where):

C:\Users\as\jhgf.py in<module>()
      24 print i[r-1]
      25 e=i[r-1]
---> 26 mlab.mesh(x, y, z,'e')
      27 #print i[r-1]

      28

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
the_function(*args, **kwargs)
      32 def document_pipeline(pipeline):
      33 def the_function(*args, **kwargs):
---> 34 return pipeline(*args, **kwargs)
      35
      36 if hasattr(pipeline, 'doc'):

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call__(self, *args, **kwargs)
      77 scene.disable_render = True
      78 # Then call the real logic

---> 79 output = self.__call_internal__(*args, **kwargs)
      80 # And re-enable the rendering, if needed.

      81 if scene is not None:

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call_internal__(self, *args, **kwargs)
     830 filters.
     831 """
--> 832 self.source = self._source_function(*args, **kwargs)
     833 kwargs.pop('name', None)
     834 self.store_kwargs(kwargs)

TypeError: grid_source() takes exactly 3 arguments (4 given)

------------------------------------------------------------------------------

Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

Didn't this get answered on the python tutor mailing list within the
last couple of hours? What's with it with you?

--
Cheers.

Mark Lawrence.

A couple of things I would like to point out here:

1.) It is possible that Debashish sent similar questions to multiple
mailing lists in the hopes to maximize the chance of getting a response.
It may only "appear" that this thread was started after having the question
answered on another mailing list because of the delays that are notorious
on this list. I suspect he sent both emails at around the same time, but
the python tutors list processed it faster than the matplotlib-users list.

Therefore...

2.) I would like to make sure that this mailing list remains a welcoming
forum for all users, and for all of us to understand that people have
different mailing habits that we may not be familiar with. Therefore,
gentle reminders of mailing decorum (such as reminders to bottom-post)
should be the response, not chastising.

-- Debashish,

We are more than happy to help you. Please keep your question to a single
mailing list at a time. The users on the mailing list will let you know if
you should direct your question elsewhere. In the case of your problem, it
is not matplotlib, but mayavi. Hopefully, you have been directed to the
mayavi mailing list.

Cheers!
Ben Root

------------------------------------------------------------------------------
Virtualization& Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Cheers.

Mark Lawrence.

Mark,

That may be the case, but he has only posted one other question before on this mailing list. I do not frequent the python tutors list, and I do not know how that list is run. I don’t even “run” this list, either, so I shouldn’t be considered a moderator. However, as a fellow poster, I would rather leave emails unanswered if we don’t have anything constructive to say, IMHO.

Cheers!
Ben Root

···

On Wed, Feb 15, 2012 at 2:52 PM, Mark Lawrence <breamoreboy@…225…> wrote:

On 15/02/2012 17:21, Benjamin Root wrote:

On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<breamoreboy@…225…>wrote:

On 14/02/2012 13:52, Debashish Saha wrote:

import numpy

from enthought.mayavi import mlab

#def test_mesh():

#“”"A very pretty picture of spherical harmonics translated from

#the octaviz example.“”"

for r in range (1,5):

 print r
 pi = numpy.pi
 cos = numpy.cos
 sin = numpy.sin
 dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
 #[phi,theta] =

numpy.mgrid[0:pi+dphi1.5:dphi,0:2pi+dtheta*1.5:dtheta]

 [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
 m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
# r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +

cos(m6*theta)**m7

 #x = 1*sin(phi)*cos(theta)
 #y = 1*sin(phi)*sin(theta)
 #z = 1*cos(phi);
 x=r*cos(phi)
 y=r*sin(phi)
 z=z
 i=['Reds','greens','autumn','purples']
 print i[r-1]
 e=i[r-1]
 mlab.mesh(x, y, z,colormap='e')
 #print i[r-1]

Error:

TypeError Traceback (most recent call

last)

C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in

execfile(fname, glob, loc)

 166             else:
 167                 filename = fname

→ 168 exec compile(scripttext, filename, ‘exec’) in glob,

loc

 169     else:
 170         def execfile(fname, *where):

C:\Users\as\jhgf.py in()

  24     print i[r-1]
  25     e=i[r-1]

—> 26 mlab.mesh(x, y, z,‘e’)

  27     #print i[r-1]
  28

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

the_function(*args, **kwargs)

  32 def document_pipeline(pipeline):
  33     def the_function(*args, **kwargs):

—> 34 return pipeline(*args, **kwargs)

  35
  36     if hasattr(pipeline, 'doc'):

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

call(self, *args, **kwargs)

  77             scene.disable_render = True
  78         # Then call the real logic

—> 79 output = self.call_internal(*args, **kwargs)

  80         # And re-enable the rendering, if needed.
  81         if scene is not None:

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

call_internal(self, *args, **kwargs)

 830         filters.
 831         """

→ 832 self.source = self._source_function(*args, **kwargs)

 833         kwargs.pop('name', None)
 834         self.store_kwargs(kwargs)

TypeError: grid_source() takes exactly 3 arguments (4 given)


Keep Your Developer Skills Current with LearnDevNow!

The most comprehensive online learning library for Microsoft developers

is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,

Metro Style Apps, more. Free future releases when you subscribe now!

http://p.sf.net/sfu/learndevnow-d2d

Didn’t this get answered on the python tutor mailing list within the

last couple of hours? What’s with it with you?

Cheers.

Mark Lawrence.

A couple of things I would like to point out here:

1.) It is possible that Debashish sent similar questions to multiple

mailing lists in the hopes to maximize the chance of getting a response.

It may only “appear” that this thread was started after having the question

answered on another mailing list because of the delays that are notorious

on this list. I suspect he sent both emails at around the same time, but

the python tutors list processed it faster than the matplotlib-users list.

Therefore…

2.) I would like to make sure that this mailing list remains a welcoming

forum for all users, and for all of us to understand that people have

different mailing habits that we may not be familiar with. Therefore,

gentle reminders of mailing decorum (such as reminders to bottom-post)

should be the response, not chastising.

– Debashish,

We are more than happy to help you. Please keep your question to a single

mailing list at a time. The users on the mailing list will let you know if

you should direct your question elsewhere. In the case of your problem, it

is not matplotlib, but mayavi. Hopefully, you have been directed to the

mayavi mailing list.

Cheers!

Ben Root


Virtualization& Cloud Management Using Capacity Planning

Cloud computing makes use of virtualization - but cloud computing

also focuses on allowing computing to be delivered as a service.

http://www.accelacomm.com/jaw/sfnl/114/51521223/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Please accept my apologies if I breached protocol but there are five

threads from the OP on the Python tutor mailing list, each of which has

had one or more replies. Two of them don’t actually ask a question, the

above being one, and the OP hasn’t had the courtesy to reply to anyone

with a thank you or anything else.

Cheers.

Mark Lawrence.

Correct, four minutes after posting it on the Python tutor mailing list. Presumably the people over there were discourteous for not answering quickly enough? Of course if you're happy to see people just slap a Python traceback here without even asking a question and presumably expect somebody to give a positive response then that's fine by me, but to do it in two separate places is just plain rude as far as I'm concerned and needs responding to. It seems as if the two of us think differently so I think it best if we agree to disagree and leave it at that. Is this ok with you?

···

On 15/02/2012 21:34, Benjamin Root wrote:

On Wed, Feb 15, 2012 at 2:52 PM, Mark Lawrence<breamoreboy@...225...>wrote:

On 15/02/2012 17:21, Benjamin Root wrote:

On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<breamoreboy@...225... >>> wrote:

On 14/02/2012 13:52, Debashish Saha wrote:

import numpy

from enthought.mayavi import mlab

#def test_mesh():
#"""A very pretty picture of spherical harmonics translated from

#the octaviz example."""
for r in range (1,5):
      print r

      pi = numpy.pi

      cos = numpy.cos

      sin = numpy.sin

      dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01

      #[phi,theta] =

numpy.mgrid[0:pi+dphi*1.5:dphi,0:2*pi+dtheta*1.5:dtheta]

      [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]

      m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;

     # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +
cos(m6*theta)**m7

      #x = 1*sin(phi)*cos(theta)

      #y = 1*sin(phi)*sin(theta)

      #z = 1*cos(phi);
      x=r*cos(phi)
      y=r*sin(phi)
      z=z
      i=['Reds','greens','autumn','purples']
      print i[r-1]
      e=i[r-1]

      mlab.mesh(x, y, z,colormap='e')
      #print i[r-1]

Error:
TypeError Traceback (most recent call

last)

C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in
execfile(fname, glob, loc)
      166 else:
      167 filename = fname
--> 168 exec compile(scripttext, filename, 'exec') in

glob,

loc

      169 else:
      170 def execfile(fname, *where):

C:\Users\as\jhgf.py in<module>()
       24 print i[r-1]
       25 e=i[r-1]
---> 26 mlab.mesh(x, y, z,'e')
       27 #print i[r-1]

       28

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
the_function(*args, **kwargs)
       32 def document_pipeline(pipeline):
       33 def the_function(*args, **kwargs):
---> 34 return pipeline(*args, **kwargs)
       35
       36 if hasattr(pipeline, 'doc'):

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call__(self, *args, **kwargs)
       77 scene.disable_render = True
       78 # Then call the real logic

---> 79 output = self.__call_internal__(*args, **kwargs)
       80 # And re-enable the rendering, if needed.

       81 if scene is not None:

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in
__call_internal__(self, *args, **kwargs)
      830 filters.
      831 """
--> 832 self.source = self._source_function(*args, **kwargs)
      833 kwargs.pop('name', None)
      834 self.store_kwargs(kwargs)

TypeError: grid_source() takes exactly 3 arguments (4 given)

------------------------------------------------------------------------------

Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,

MVC3,

Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d

Didn't this get answered on the python tutor mailing list within the
last couple of hours? What's with it with you?

--
Cheers.

Mark Lawrence.

A couple of things I would like to point out here:

1.) It is possible that Debashish sent similar questions to multiple
mailing lists in the hopes to maximize the chance of getting a response.
It may only "appear" that this thread was started after having the

question

answered on another mailing list because of the delays that are notorious
on this list. I suspect he sent both emails at around the same time, but
the python tutors list processed it faster than the matplotlib-users

list.

Therefore...

2.) I would like to make sure that this mailing list remains a welcoming
forum for all users, and for all of us to understand that people have
different mailing habits that we may not be familiar with. Therefore,
gentle reminders of mailing decorum (such as reminders to bottom-post)
should be the response, not chastising.

-- Debashish,

We are more than happy to help you. Please keep your question to a

single

mailing list at a time. The users on the mailing list will let you know

if

you should direct your question elsewhere. In the case of your problem,

it

is not matplotlib, but mayavi. Hopefully, you have been directed to the
mayavi mailing list.

Cheers!
Ben Root

------------------------------------------------------------------------------

Virtualization& Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Please accept my apologies if I breached protocol but there are five
threads from the OP on the Python tutor mailing list, each of which has
had one or more replies. Two of them don't actually ask a question, the
above being one, and the OP hasn't had the courtesy to reply to anyone
with a thank you or anything else.

--
Cheers.

Mark Lawrence.

Mark,

That may be the case, but he has only posted one other question before on
*this* mailing list. I do not frequent the python tutors list, and I do
not know how that list is run. I don't even "run" this list, either, so I
shouldn't be considered a moderator. However, as a fellow poster, I would
rather leave emails unanswered if we don't have anything constructive to
say, IMHO.

Cheers!
Ben Root

------------------------------------------------------------------------------
Virtualization& Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
Cheers.

Mark Lawrence.

I am more of a live-and-let-live kind of person. I don’t disagree that it is rude. Certainly, if there is an apparent need to teach a user how to provide more useful questions and not spam the lists, then let’s do so in a teaching manner. However, if the person continues to not provided useful questions, then what can you do? If you want to vent, vent at stuffed animal.

I welcome all on this list regardless of past “transgressions”, and I want to make sure everyone feels welcomed. As far as I am concerned, nothing more needs to be said.

Ben Root

···

On Wed, Feb 15, 2012 at 3:57 PM, Mark Lawrence <breamoreboy@…225…> wrote:

On 15/02/2012 21:34, Benjamin Root wrote:

On Wed, Feb 15, 2012 at 2:52 PM, Mark Lawrence<breamoreboy@…225…>wrote:

On 15/02/2012 17:21, Benjamin Root wrote:

On Tue, Feb 14, 2012 at 8:58 AM, Mark Lawrence<breamoreboy@…225… > > >>> wrote:

On 14/02/2012 13:52, Debashish Saha wrote:

import numpy

from enthought.mayavi import mlab

#def test_mesh():

#“”"A very pretty picture of spherical harmonics translated from

#the octaviz example.“”"

for r in range (1,5):

  print r
  pi = numpy.pi
  cos = numpy.cos
  sin = numpy.sin
  dphi, dtheta, dz = pi/250.0, pi/250.0, 0.01
  #[phi,theta] =

numpy.mgrid[0:pi+dphi1.5:dphi,0:2pi+dtheta*1.5:dtheta]

  [phi,z] = numpy.mgrid[0:2*pi+dphi*1.5:dphi,0:2+dz*1.5:dz]
  m0 = 4; m1 = 3; m2 = 2; m3 = 3; m4 = 6; m5 = 2; m6 = 6; m7 = 4;
 # r = sin(m0*phi)**m1 + cos(m2*phi)**m3 + 5*sin(m4*theta)**m5 +

cos(m6*theta)**m7

  #x = 1*sin(phi)*cos(theta)
  #y = 1*sin(phi)*sin(theta)
  #z = 1*cos(phi);
  x=r*cos(phi)
  y=r*sin(phi)
  z=z
  i=['Reds','greens','autumn','purples']
  print i[r-1]
  e=i[r-1]
  mlab.mesh(x, y, z,colormap='e')
  #print i[r-1]

Error:

TypeError Traceback (most recent call

last)

C:\Python27\lib\site-packages\IPython\utils\py3compat.pyc in

execfile(fname, glob, loc)

  166             else:
  167                 filename = fname

→ 168 exec compile(scripttext, filename, ‘exec’) in

glob,

loc

  169     else:
  170         def execfile(fname, *where):

C:\Users\as\jhgf.py in()

   24     print i[r-1]
   25     e=i[r-1]

—> 26 mlab.mesh(x, y, z,‘e’)

   27     #print i[r-1]
   28

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

the_function(*args, **kwargs)

   32 def document_pipeline(pipeline):
   33     def the_function(*args, **kwargs):

—> 34 return pipeline(*args, **kwargs)

   35
   36     if hasattr(pipeline, 'doc'):

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

call(self, *args, **kwargs)

   77             scene.disable_render = True
   78         # Then call the real logic

—> 79 output = self.call_internal(*args, **kwargs)

   80         # And re-enable the rendering, if needed.
   81         if scene is not None:

C:\Python27\lib\site-packages\mayavi\tools\helper_functions.pyc in

call_internal(self, *args, **kwargs)

  830         filters.
  831         """

→ 832 self.source = self._source_function(*args, **kwargs)

  833         kwargs.pop('name', None)
  834         self.store_kwargs(kwargs)

TypeError: grid_source() takes exactly 3 arguments (4 given)


Keep Your Developer Skills Current with LearnDevNow!

The most comprehensive online learning library for Microsoft developers

is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3,

MVC3,

Metro Style Apps, more. Free future releases when you subscribe now!

http://p.sf.net/sfu/learndevnow-d2d

Didn’t this get answered on the python tutor mailing list within the

last couple of hours? What’s with it with you?

Cheers.

Mark Lawrence.

A couple of things I would like to point out here:

1.) It is possible that Debashish sent similar questions to multiple

mailing lists in the hopes to maximize the chance of getting a response.

It may only “appear” that this thread was started after having the

question

answered on another mailing list because of the delays that are notorious

on this list. I suspect he sent both emails at around the same time, but

the python tutors list processed it faster than the matplotlib-users

list.

Therefore…

2.) I would like to make sure that this mailing list remains a welcoming

forum for all users, and for all of us to understand that people have

different mailing habits that we may not be familiar with. Therefore,

gentle reminders of mailing decorum (such as reminders to bottom-post)

should be the response, not chastising.

– Debashish,

We are more than happy to help you. Please keep your question to a

single

mailing list at a time. The users on the mailing list will let you know

if

you should direct your question elsewhere. In the case of your problem,

it

is not matplotlib, but mayavi. Hopefully, you have been directed to the

mayavi mailing list.

Cheers!

Ben Root


Virtualization& Cloud Management Using Capacity Planning

Cloud computing makes use of virtualization - but cloud computing

also focuses on allowing computing to be delivered as a service.

http://www.accelacomm.com/jaw/sfnl/114/51521223/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Please accept my apologies if I breached protocol but there are five

threads from the OP on the Python tutor mailing list, each of which has

had one or more replies. Two of them don’t actually ask a question, the

above being one, and the OP hasn’t had the courtesy to reply to anyone

with a thank you or anything else.

Cheers.

Mark Lawrence.

Mark,

That may be the case, but he has only posted one other question before on

this mailing list. I do not frequent the python tutors list, and I do

not know how that list is run. I don’t even “run” this list, either, so I

shouldn’t be considered a moderator. However, as a fellow poster, I would

rather leave emails unanswered if we don’t have anything constructive to

say, IMHO.

Cheers!

Ben Root


Virtualization& Cloud Management Using Capacity Planning

Cloud computing makes use of virtualization - but cloud computing

also focuses on allowing computing to be delivered as a service.

http://www.accelacomm.com/jaw/sfnl/114/51521223/


Matplotlib-users mailing list

Matplotlib-users@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Correct, four minutes after posting it on the Python tutor mailing list.

Presumably the people over there were discourteous for not answering

quickly enough? Of course if you’re happy to see people just slap a

Python traceback here without even asking a question and presumably

expect somebody to give a positive response then that’s fine by me, but

to do it in two separate places is just plain rude as far as I’m

concerned and needs responding to. It seems as if the two of us think

differently so I think it best if we agree to disagree and leave it at

that. Is this ok with you?

Cheers.

Mark Lawrence.