[Matplotlib-users] multiple annotation in one line

2010-07-07 Thread Bala subramanian
Friends
1) Excuse me if this questions is posted already. I have to make 5 to 6
annotations in my figure. Is there any way that i can make all of them in
one shot instead of writting a separate line of code for each of them.

for instance plot function accepts a series of x,y data. Is it possible with
annotate function also.

2) Is it possible to use an axis range to place a text. Ie we use a
something like xy=(160,0) to indicate the axes positions where the text
should be placed, instead i want specify for instance x-axis range 160-180
and place the text in the center of this range.

Thanks,
Bala
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ANN: matplotlib 1.0.0

2010-07-07 Thread Dharhas Pothina

> Contour fixes and and triplot:
>  Additionally, he has contributed a new module matplotlib.tri and
>  helper function triplot for creating and plotting unstructured
>  triangular grids.  See
>  http://matplotlib.sf.net/api/pyplot_api.html#matplotlib.pyplot.triplot 
>  for the function and
>  http://matplotlib.sf.net/examples/pylab_examples/triplot_demo.html 
>  for example code.

This is an awesome addition. Thanks to Ian Thomas. We do a lot of ocean 
modeling with unstructured triangular grids and this will be very useful. There 
currently is no good way to do this without using commercial packages like 
tecplot.

- dharhas




--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ANN: matplotlib 1.0.0

2010-07-07 Thread John Hunter
On Wed, Jul 7, 2010 at 12:46 AM, Jason Grout
 wrote:
> Wow, this is great news!  Thanks to everyone that has worked on this!
>
> I tried to find the html5/canvas backend in the 1.0.0 tarball.  Is it
> included in matplotlib?  The heading "What's new *in* matplotlib 1.0"
> makes it seem like I should find the files in the matplotlib
> distribution, but I can't seem to find the code that I see up on the
> code.google.com site.

It's not in mpl -- we may ship it one day but it is still brand new
and likely to undergo significant development and bug-fixing as people
start to deploy it and report problems.  If the html5 developers would
like to host it in our tree they are welcome to, but for now they
choose google code.

The svn report can be obtained from
http://code.google.com/p/mplh5canvas/source/checkout

JDH

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] NonUniformImage: problem with axis reversal

2010-07-07 Thread Ryan May
On Wed, Jul 7, 2010 at 1:54 AM, Matthias Michler
 wrote:
> On Wednesday July 7 2010 05:53:59 jezhill wrote:
>> Hi all,
>>
>> I've been experimenting with the NonUniformImage class.  (Actually I want
>> *uniform* pixel spacing, but I want the image x and y coordinates to have
>> the correct *scaling* in the style of Matlab's  image(x,y,C).  The
>> AxesImage class, created via pylab.imshow, didn't seem to offer that, so I
>> landed on NonUniformImage, but if there's a better solution I'd be
>> grateful for tips...)
>>
>>
>> And here's the problem (or bug?):  with my Python 2.5.4 and my matplotlib
>> 1.0, I go and run the
>> http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.
>> html gallery demo  but I decide that I want the y axis reversed (as is
>> common in image visualization).  So I either call
>> pylab.gca().invert_yaxis() at the end, or I change one of the lines that
>> says
>>
>> ax.set_ylim(-4,4)
>>
>> to read
>>
>> ax.set_ylim(4,-4)
>>
>> which I believe is the approved method.  However the result I get is
>> non-sensical:  no more image variation in the vertical direction. Can
>> anyone tell me what, if anything, I'm doing wrong?
>
> Hi jez,
>
> I attached a slightly modified version of the image_nonuniform.py. I
> additionally inverted the y-limits in the extent-kwarg and in the set_data of
> the last example. I'm not sure why this is needed and if there is a better
> solution to it, but at least for me it works.
> Does anybody know why we have to invert all data concerning y-axis?

We have to invert because the image data is assumed to be starting in
the upper left. You can change this assumption by passing:

orgin='lower'

All of these options are supported by imshow(), so if one has uniform
data and just needs proper data scaling, imshow() will be sufficient.

Ryan

-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] remove matplotlib

2010-07-07 Thread Samuel Teixeira Santos
Hi all

on my server (ubuntu 8.04 lts)
I installed matplotlib

and was that kind of installation who compile various files with gcc,
gfortran and so on

now I wanna remove them
to install the new version...

could anyone help me with this? because I don't wann to do something who
could be bad to the server...

thanks in advanced...
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] install from svn, pick correct of two numpy header locations

2010-07-07 Thread Angus McMorland
Hi all,

I'm trying to install matplotlib from svn. I have two versions of
numpy on my computer: one installed by the Ubuntu package manager in
/usr/lib and one installed from source in /usr/local/lib which takes
precedence based on the order of my PYTHONPATH. I'm trying to install
the latest matplotlib from source, also into /usr/local using

python setup.py install --prefix=/usr/local

but mpl's setup.py appears to not use np.get_include() when working
out where to look for the numpy headers, so is finding the old ones in
/usr/lib. Is this the correct behaviour, and/or am I doing something
wrong? Is there another way to specify where the headers should be
found?

Thanks,

Angus.
-- 
AJC McMorland
Post-doctoral research fellow
Neurobiology, University of Pittsburgh

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] remove matplotlib

2010-07-07 Thread Benjamin Root
Samuel,

Fortunately, matplotlib keeps all of the files that it compiles with the
python files that it installs.  On Ubuntu, I believe that the installation
directory was /usr/lib/python2.?/dist-packages/matplotlib* (note, I don't
remember the exact version of python and the exact name of the matplotlib
directory).  If you remove that matplotlib directory and the corresponding
matplotlib egg info file that is also in the dist-packages directory, that
should get everything with respect to matplotlib.

Also, if you use basemap, remember that it is installed separately from
matplotlib and it would also have to be removed in a similar manner, if you
needed it removed.

I hope that is helpful.

Ben Root


On Wed, Jul 7, 2010 at 8:59 AM, Samuel Teixeira Santos
wrote:

> Hi all
>
> on my server (ubuntu 8.04 lts)
> I installed matplotlib
>
> and was that kind of installation who compile various files with gcc,
> gfortran and so on
>
> now I wanna remove them
> to install the new version...
>
> could anyone help me with this? because I don't wann to do something who
> could be bad to the server...
>
> thanks in advanced...
>
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib 1.0 and Python 2.7

2010-07-07 Thread David Grudoski

Thanks for the info I'll give it a try.



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] remove matplotlib

2010-07-07 Thread Eric Firing
On 07/07/2010 05:01 AM, Benjamin Root wrote:
> Samuel,
>
> Fortunately, matplotlib keeps all of the files that it compiles with the
> python files that it installs.  On Ubuntu, I believe that the
> installation directory was /usr/lib/python2.?/dist-packages/matplotlib*

ubuntu 8.04 was still using site-packages; the switch to dist-packages 
was in 9.10, if I remember correctly.  8.04 uses python 2.5.

Also check the /usr/local path along with the /usr path. I'm not sure 
whether the installation from source put things by default in /usr or 
/usr/local.  I always do installations from tarball in /usr/local so as 
to keep them separate from packages installed via the distro packaging 
system.

Eric

> (note, I don't remember the exact version of python and the exact name
> of the matplotlib directory).  If you remove that matplotlib directory
> and the corresponding matplotlib egg info file that is also in the
> dist-packages directory, that should get everything with respect to
> matplotlib.
>
> Also, if you use basemap, remember that it is installed separately from
> matplotlib and it would also have to be removed in a similar manner, if
> you needed it removed.
>
> I hope that is helpful.
>
> Ben Root
>
>
> On Wed, Jul 7, 2010 at 8:59 AM, Samuel Teixeira Santos
> mailto:arcano...@gmail.com>> wrote:
>
> Hi all
>
> on my server (ubuntu 8.04 lts)
> I installed matplotlib
>
> and was that kind of installation who compile various files with
> gcc, gfortran and so on
>
> now I wanna remove them
> to install the new version...
>
> could anyone help me with this? because I don't wann to do something
> who could be bad to the server...
>
> thanks in advanced...
>
>
>
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first  --
> http://p.sf.net/sfu/sprint-com-first
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>
>
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] install from svn, pick correct of two numpy header locations

2010-07-07 Thread Eric Firing
On 07/07/2010 04:25 AM, Angus McMorland wrote:
> Hi all,
>
> I'm trying to install matplotlib from svn. I have two versions of
> numpy on my computer: one installed by the Ubuntu package manager in
> /usr/lib and one installed from source in /usr/local/lib which takes
> precedence based on the order of my PYTHONPATH. I'm trying to install
> the latest matplotlib from source, also into /usr/local using
>
> python setup.py install --prefix=/usr/local
>
> but mpl's setup.py appears to not use np.get_include() when working
> out where to look for the numpy headers, so is finding the old ones in
> /usr/lib. Is this the correct behaviour, and/or am I doing something
> wrong? Is there another way to specify where the headers should be
> found?

I can't investigate properly right now, but get_include() is getting called:

efir...@manini:~/programs/py/mpl/mpl_trunk$ grep get_include *.py
setupext.py:module.include_dirs.append(numpy.get_include())

You could try putting in print statements to see what version of numpy 
has been imported at that point, and if it is the wrong one, how that 
comes about.  When numpy is being imported for the first time in 
setupext.py, is PYTHONPATH what you think it is?

Eric

>
> Thanks,
>
> Angus.


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] install from svn, pick correct of two numpy header locations

2010-07-07 Thread John Hunter
On Wed, Jul 7, 2010 at 12:12 PM, Eric Firing  wrote:
> On 07/07/2010 04:25 AM, Angus McMorland wrote:
>> Hi all,
>>
>> I'm trying to install matplotlib from svn. I have two versions of
>> numpy on my computer: one installed by the Ubuntu package manager in
>> /usr/lib and one installed from source in /usr/local/lib which takes
>> precedence based on the order of my PYTHONPATH. I'm trying to install
>> the latest matplotlib from source, also into /usr/local using
>>
>> python setup.py install --prefix=/usr/local
>>
>> but mpl's setup.py appears to not use np.get_include() when working
>> out where to look for the numpy headers, so is finding the old ones in
>> /usr/lib. Is this the correct behaviour, and/or am I doing something
>> wrong? Is there another way to specify where the headers should be
>> found?
>
> I can't investigate properly right now, but get_include() is getting called:
>
> efir...@manini:~/programs/py/mpl/mpl_trunk$ grep get_include *.py
> setupext.py:    module.include_dirs.append(numpy.get_include())
>
> You could try putting in print statements to see what version of numpy
> has been imported at that point, and if it is the wrong one, how that
> comes about.  When numpy is being imported for the first time in
> setupext.py, is PYTHONPATH what you think it is?

That was my first thought -- when you call setup.py install are you
running as root.  If so, it may not be picking up your userland
PYTHONPATH.  Try adding the python path on the install line, eg

PYTHONPATH=/usr/local/lib/python2.6/site-packages python setup.py
install --prefix=/usr/local

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] install from svn, pick correct of two numpy header locations

2010-07-07 Thread Angus McMorland
On 7 July 2010 14:00, John Hunter  wrote:
> On Wed, Jul 7, 2010 at 12:12 PM, Eric Firing  wrote:
>> On 07/07/2010 04:25 AM, Angus McMorland wrote:
>>> Hi all,
>>>
>>> I'm trying to install matplotlib from svn. I have two versions of
>>> numpy on my computer: one installed by the Ubuntu package manager in
>>> /usr/lib and one installed from source in /usr/local/lib which takes
>>> precedence based on the order of my PYTHONPATH. I'm trying to install
>>> the latest matplotlib from source, also into /usr/local using
>>>
>>> python setup.py install --prefix=/usr/local
>>>
>>> but mpl's setup.py appears to not use np.get_include() when working
>>> out where to look for the numpy headers, so is finding the old ones in
>>> /usr/lib. Is this the correct behaviour, and/or am I doing something
>>> wrong? Is there another way to specify where the headers should be
>>> found?
>>
>> I can't investigate properly right now, but get_include() is getting called:
>>
>> efir...@manini:~/programs/py/mpl/mpl_trunk$ grep get_include *.py
>> setupext.py:    module.include_dirs.append(numpy.get_include())
>>
>> You could try putting in print statements to see what version of numpy
>> has been imported at that point, and if it is the wrong one, how that
>> comes about.  When numpy is being imported for the first time in
>> setupext.py, is PYTHONPATH what you think it is?
>
> That was my first thought -- when you call setup.py install are you
> running as root.  If so, it may not be picking up your userland
> PYTHONPATH.  Try adding the python path on the install line, eg
>
> PYTHONPATH=/usr/local/lib/python2.6/site-packages python setup.py
> install --prefix=/usr/local

Thanks guys- that was exactly the problem: sudo not carrying
PYTHONPATH through from userland. In case anyone's interested, I fixed
it by adding

Defaults env_keep+="PYTHONPATH"

to my /etc/sudoers file, so the problem should now be permanently
fixed. Sorry for the noise.

Angus.

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] installation of matplotlib on OS X 10.5 with python.org Python 2.6

2010-07-07 Thread Friedrich Romstedt
resending to the list too, fwiw.

2010/7/5 Stephen T. :
> Hi, I am having trouble installing matplotlib. I have OS X 10.5 with Python
> 2.6 downloaded and installed from python.org. (10.5 came with Apple Python
> 2.5). I've also installed NumPy and SciPy for Python 2.6.

Since you are 10.5, I think your default compiler is gcc-4.0 if I'm
not very much mistaken.  Can you please verify that by issuing gcc
--version?

I had a private conversation with the "owner" of the previous thread
about OS X, and it seems that there are two ways to build matplotlib.
I personally had no luck with the prebuilt version either, but I don't
remember the issue, I think it wasn't compatible with my gcc-4.2
compiled freetype2 (I'm on 10.6).

a) Use make.osx.  This is quite easy, but you have no control over
where the libraries are installed, and if you do not log it via 2>&1 |
tee log.txt we will be unable to diagnose.  make.osx installs
libraries in your system, so be aware of this.

b) Install the libraries on your own.  This seems to be a little more
complicated, but it isn't really.  I used libpng 1.4 with a few
modifications, just a few lines in src/_png.cpp.  (You also may
already have recent enough versions through your /opt/ path.)

Sorry, I'm writing this again and again to all the users I tried to
convice of this way, but I didn't find inclination to do it properly
together with the developers on the website.

Did you compile Python 2.6 yourself?  If yes, have you made sure to
use the --enable-framework switch for configure?

> I've tried EasyInstall, svn, and dmg. The dmg expects Apple Python 2.6 so
> that's out. For the EasyInstall and svn routes I think I must be missing
> some external libraries? Below are some snippets of warnings/error messages:

It would be helpful to have information about the initial diagnostic
output of the setup.py call, but I don't know if easy_install works
that way.  The installation routine tells there what libraries are
found and if you have pkg-config it tells also the version found.

> from EasyInstall:
> $ easy_install matplotlib
>
> matplotlib: 0.99.3
> warning: no files found matching 'MANIFEST'
> warning: no files found matching 'lib/mpl_toolkits'
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libpng12.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
> for architecture ppc

I think /opt/ installs are macports or similar?  What kind of "package
system" for Mac do you have installed?

> collect2: ld returned 1 exit status

It doesn't tell which arch it's missing.  I'm a bit confused about
this "missing architecture".  What arch does your system have?

> ld warning: duplicate dylib /opt/local/lib/libz.1.dylib

That's strange to me.

> lipo: can't open input file:
> /var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//ccWD9nm4.out (No such
> file or directory)
> error: Setup script exited with error: command 'c++' failed with exit status
> 1

This is the normal error when it failed.

> from SVN:
> $ python setup.py build
> matplotlib: 1.0.svn

Somewhere here comes the output about the libraries and dependencies.

> ld warning: in /opt/local/lib/libfreetype.dylib, file is not of required
> architecture
> ld warning: in /opt/local/lib/libz.dylib, file is not of required
> architecture
> ld: in /opt/local/lib/libxml2.2.dylib, file is not of required architecture
> for architecture ppc
> collect2: ld returned 1 exit status
> ld warning: duplicate dylib /opt/local/lib/libz.1.dylib
> lipo: can't open input file:
> /var/folders/Yh/Yh3On1j+FXW+r-334Wk-vk+++TI/-Tmp-//cc6cv190.out (No such
> file or directory)
> error: command 'c++' failed with exit status 1

This all seems the same as above.

> and in both throughout the messages there are references to "linker input
> file unused because linking not done" for
> powerpc-apple-darwin9-gcc-4.0.1 and i686-apple-darwin9-gcc-4.0.1.

I don't know, I also encountered this often, seems to be an extra
option issued by the distutils, which is not needed.

> I'd tried the EPD version also (and had it working), but then EasyInstall
> would direct me to their repositories (for which I did not have a password)
> so I could not download and install RPy2 and other modules (easily), so I
> decided to build up from individual components...

I did without EPD and 0.99.3 is working fine.

> A

[Matplotlib-users] hammer/aitoff projection-changing the axis

2010-07-07 Thread abbb

Hi there,
I am trying to rotate the axis of my hammer plot. They are set to span from
-pi to pi along the x-axis and pi/2 to -pi/2 on the y-axis, however, I would
like the axis to go from 0 to 2*pi on the x-axis. I am using this for the
first time, my code is just:

subplot(111, projection="hammer")
p=plot([a],[b],"o")
grid(True)
show()

does anyone know what i need to add to this to change the limits of the
x-axis?

-- 
View this message in context: 
http://old.nabble.com/hammer-aitoff-projection-changing-the-axis-tp29094391p29094391.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib 1.0 dateutils missing on MacOS X

2010-07-07 Thread Edward Barnard
Hi All

I had a problem installing matplotlib 1.0.0 on MacOS X 10.6 using python.org 
2.6.5 with the binary installer (dmg). When importing pylab, datautils was 
missing. I fixed that by easy_installing python-dateutils, but it seems like it 
should be included in the installer or listed in the install requirements.

Thanks for a great piece of software!

-Ed



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib 1.0 dateutils missing on MacOS X

2010-07-07 Thread John Hunter
On Wed, Jul 7, 2010 at 12:39 PM, Edward Barnard  wrote:
> Hi All
>
> I had a problem installing matplotlib 1.0.0 on MacOS X 10.6 using python.org 
> 2.6.5 with the binary installer (dmg). When importing pylab, datautils was 
> missing. I fixed that by easy_installing python-dateutils, but it seems like 
> it should be included in the installer or listed in the install requirements.
>
> Thanks for a great piece of software!

Russell -- did you use setup.cfg for the mac binaries?  pytz and
dateutil should be turned on in that file (copy setup.cfg.template to
setup.cfg)

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contourf shows a unwanted white space

2010-07-07 Thread Benjamin Root
Bala,

the white space you see is due to contourf trying to have the axes ticks end
on a round number.  If you don't want that behavior, you can set the limits
of the plot after calling contourf() with something like this:

contourf(X, Y, Z)
xlim(x_min, x_max)
ylim(y_min, y_max)

presuming you would know which values to use for the min and max variables.

Somebody else will have to explain the locator and the x,y units kargs
because I am not familiar with them.

Ben Root

On Wed, Jul 7, 2010 at 5:34 AM, Bala subramanian
wrote:

> Friends,
>
> I used contourf function to plot a matrix, the output figure is attached.
> In the figure, i observe a strange white space at the corners. What is going
> wrong here. Herewith i have also attached the code.
>
> Also someone please explaing me the usage of locator and x,y units **kargs
> available for contourf function.
>
> Thanks,
> Bala
>
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Updating Scatter Plot data

2010-07-07 Thread Aman Thakral
Hi,

I was just curious if there is a way to update the data for a scatter plot
similar to the set_data function for a axes.plot object?  The reason is
because I need to update a scatter plot at various zoom levels and
colors/distribution of the circles will change with the zoom level.  I
looked at the output from the get_paths and it does not correspond to the
vertices of circles that are in the plot.

Any help would be greatly appreciated.

Thanks,
Aman
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Updating Scatter Plot data

2010-07-07 Thread Aman Thakral
I found one method to work around this.  I iterate through the list of
collections by accessing the axes.collections list and checking to see if
the type of the collection is a CircleCollection.  If so, I remove the item
then redraw the collection for the appropriate zoom level.  This doesn't
really seem like an optimal way of doing this though.

-Aman

On Wed, Jul 7, 2010 at 4:36 PM, Aman Thakral  wrote:

> Hi,
>
> I was just curious if there is a way to update the data for a scatter plot
> similar to the set_data function for a axes.plot object?  The reason is
> because I need to update a scatter plot at various zoom levels and
> colors/distribution of the circles will change with the zoom level.  I
> looked at the output from the get_paths and it does not correspond to the
> vertices of circles that are in the plot.
>
> Any help would be greatly appreciated.
>
> Thanks,
> Aman
>



-- 
Aman Thakral
B.Eng & Biosci, M.Eng Design
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] hammer/aitoff projection-changing the axis

2010-07-07 Thread Benjamin Root
Try out the xlim() function.  It can take a tuple of values, or two
arguments.

Ben Root

On Wed, Jul 7, 2010 at 4:57 AM, abbb  wrote:

>
> Hi there,
> I am trying to rotate the axis of my hammer plot. They are set to span from
> -pi to pi along the x-axis and pi/2 to -pi/2 on the y-axis, however, I
> would
> like the axis to go from 0 to 2*pi on the x-axis. I am using this for the
> first time, my code is just:
>
> subplot(111, projection="hammer")
> p=plot([a],[b],"o")
> grid(True)
> show()
>
> does anyone know what i need to add to this to change the limits of the
> x-axis?
>
> --
> View this message in context:
> http://old.nabble.com/hammer-aitoff-projection-changing-the-axis-tp29094391p29094391.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Plot irregular spaced data

2010-07-07 Thread Ross Williamson
Hi Everyone

I think I'm being dumb but I have a set of 2d data (2d array) z
(100x100) which I need to plot - I have a nominal set of x and y
positions say:

x = linspace(0,100)
y = linspace(0,100)

Now the actual positions of the points in z are given by the following:



-- 
Ross Williamson
University of Chicago
Department of Astronomy & Astrophysics
773-834-9785 (office)
312-504-3051 (Cell)

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plotting irregular spaced data

2010-07-07 Thread Ross Williamson
Hi Everyone

I think I'm being dumb but I have a set of 2d data (2d array) z
(100x100) which I need to plot - I have a nominal set of x and y
positions say:

x = linspace(0,100)
y = linspace(0,100)

Now the actual positions of the points in z are given by the following:

u,v = meshgrid(x,y)

phi = arctan2(v,u)
theta = arcsin(u/cos(phi))

so I have three 2d arrays (100x100) which describe the postion
(phi,theta) of the points in z

How do I go about plotting these say using imshow?

Cheers

Ross

-- 
Ross Williamson
University of Chicago
Department of Astronomy & Astrophysics
773-834-9785 (office)
312-504-3051 (Cell)

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plotting irregular spaced data

2010-07-07 Thread Benjamin Root
imshow requires the data to be regularly spaced.  use pcolor instead.

Also, to be clear, pcolor() can take 1-D X and Y arguments, but only if it
is regular.  If the coordinates are irregular, then you need to use 2D X and
Y arguments.

Ben Root

On Wed, Jul 7, 2010 at 5:15 PM, Ross Williamson <
rosswilliamson@gmail.com> wrote:

> Hi Everyone
>
> I think I'm being dumb but I have a set of 2d data (2d array) z
> (100x100) which I need to plot - I have a nominal set of x and y
> positions say:
>
> x = linspace(0,100)
> y = linspace(0,100)
>
> Now the actual positions of the points in z are given by the following:
>
> u,v = meshgrid(x,y)
>
> phi = arctan2(v,u)
> theta = arcsin(u/cos(phi))
>
> so I have three 2d arrays (100x100) which describe the postion
> (phi,theta) of the points in z
>
> How do I go about plotting these say using imshow?
>
> Cheers
>
> Ross
>
> --
> Ross Williamson
> University of Chicago
> Department of Astronomy & Astrophysics
> 773-834-9785 (office)
> 312-504-3051 (Cell)
>
>
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] remove matplotlib

2010-07-07 Thread Scott Sinclair
>On 7 July 2010 19:02, Eric Firing  wrote:
> On 07/07/2010 05:01 AM, Benjamin Root wrote:
>> Samuel,
>>
>> Fortunately, matplotlib keeps all of the files that it compiles with the
>> python files that it installs.  On Ubuntu, I believe that the
>> installation directory was /usr/lib/python2.?/dist-packages/matplotlib*
>
> ubuntu 8.04 was still using site-packages; the switch to dist-packages
> was in 9.10, if I remember correctly.  8.04 uses python 2.5.
>
> Also check the /usr/local path along with the /usr path. I'm not sure
> whether the installation from source put things by default in /usr or
> /usr/local.

You can check where your matplotlib is installed with

$ python -c "import matplotlib; print matplotlib"

Cheers,
Scott

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users