problem using matplotlib

Hi Marc,

    > Just installed matplotlib and tried an example from the

    > Numeric import failed... trying numarray.

This is not an error, but it looks like you have numarray installed
but not Numeric, but you haven't set your numerix preference to
numarray. This is a parameter in .matplotlibrc. See
http://matplotlib.sourceforge.net/.matplotlibrc. If indeed you want
to use numarray, I suggests setting

numerix : numarray

or else install Numeric. This will stop the numeric/numarray
warnings.

    > line 118, in _ make_red self.red = 1.0/self.N*arange(self.N,
    > typecode=Float) TypeError: arange() got an unexpected
    > keyword argument 'typecode'

    > Why is this? Any suggestions?

    > thanks, marc

This is a bug. We've tried to replace all the numeric only code with
code that works with both numeric and numarray. Todd Miller has
already fixed this one in CVS. Here's the latest colors.py; just
replace the current file with this one and let us know how it goes:

colors.py (6.52 KB)

John Hunter wrote:

"marc" == marc schellens <m_schellens@...32...> writes:

Hi Marc,

    > Just installed matplotlib and tried an example from the

    > Numeric import failed... trying numarray.

This is not an error, but it looks like you have numarray installed
but not Numeric, but you haven't set your numerix preference to
numarray. This is a parameter in .matplotlibrc. See
http://matplotlib.sourceforge.net/.matplotlibrc. If indeed you want
to use numarray, I suggests setting

numerix : numarray

or else install Numeric. This will stop the numeric/numarray
warnings.

If matplotlib honours the HOME environmental variable, could it not be used on windows system as well?

Regards,
ST

···

--

Hello:

I am currently using matplotlib for all the plotting in the software I am writing. I will however need to produce polar plots. As John has mentioned they should be added at one point. So my shameless question is roughly what version could I expect them to be included in? My options are to either wait for it, write it on my own, or write a simple interface (for my code) to GNUPlot or some other tool. I have not done very much poking around in the current matplotlib libraries (other than changing some rather minor details) and have a feeling that this might take me the longest. Interfacing GNUPLot to my code would not take more than a few hours, but I would prefer to stay with matplotlib.

Thanks for the great work.
Best,

···

--
Peter Groszkowski Gemini Observatory
Tel: +1 808 974-2509 670 N. A'ohoku Place
Fax: +1 808 935-9235 Hilo, Hawai'i 96720, USA

As a temporary solution you might try just transforming your r,theta
data to x, y and then drawing a grid over it.

I looked at the classes and with the loglog already done as an example,
it shouldn't be too hard to add polar plotting. So far though I haven't
got any further than printing out some of the code.

Here's a very rough example of a workaround.

#!/usr/bin/python
from Numeric import *
from matplotlib.matlab import *

def drawgrid(sp,rticlevels,thetaticlevels):
    for r in rticlevels:
        theta = arange(0,2*pi+0.05,0.05)
        x = r*cos(theta)
        y = r*sin(theta)
        sp.plot(x,y,'k-')
    for theta in thetaticlevels:
        x = rticlevels[-1]*cos(theta)
        y = rticlevels[-1]*sin(theta)
        sp.plot([0,x],[0,y],'k-')

def polar(sp,r,theta,marker,rticlevels,thetaticlevels):
    x = r*cos(theta)
    y = r*sin(theta)
    sp.plot(x,y,marker)
    drawgrid(sp,rticlevels,thetaticlevels)
    return sp

sp = subplot(111)
theta = arange(0,pi,0.1)
r = 0.5 + cos(theta)
polar(sp,r,theta,'b-',arange(0.5,2.0,0.5),arange(0.,2*pi,pi/9.))

···

On Tue, 2004-03-30 at 14:32, Peter Groszkowski wrote:

Hello:

I am currently using matplotlib for all the plotting in the software I am writing. I will however need to produce polar plots. As John has mentioned they should be added at one point. So my shameless question is roughly what version could I expect them to be included in? My options are to either wait for it, write it on my own, or write a simple interface (for my code) to GNUPlot or some other tool. I have not done very much poking around in the current matplotlib libraries (other than changing some rather minor details) and have a feeling that this might take me the longest. Interfacing GNUPLot to my code would not take more than a few hours, but I would prefer to stay with matplotlib.

Thanks for the great work.
Best,