Re: [Matplotlib-users] MacOSX backend bug

2011-02-22 Thread Michiel de Hoon
It sounds like your Python is not a framework build.

--Michiel.

--- On Tue, 2/22/11, Dominique Orban  wrote:

> From: Dominique Orban 
> Subject: [Matplotlib-users] MacOSX backend bug
> To: matplotlib-users@lists.sourceforge.net
> Date: Tuesday, February 22, 2011, 1:48 PM
> Hi there,
> 
> $ uname -a
> Darwin nazgul.local 10.6.0 Darwin Kernel Version 10.6.0:
> Wed Nov 10
> 18:13:17 PST 2010; root:xnu-1504.9.26~3/RELEASE_I386 i386
> $ python -c 'import matplotlib ; print
> matplotlib.__version__'
> 1.0.1
> 
> I installed Matplotlib from Pypi.
> 
> I'm having two problems with the MacOSX backend:
> 
> 1) Plot windows systematically appear *behind* any other
> window. This
> makes it difficult to find them.
> 
> 2) I can't type anything in the save dialog box. The cursor
> blinks in
> the text box, but any typing goes to the terminal. This is
> the same I
> believe as http://old.nabble.com/save-dialogue-in-macosx-bug-p27966555.html
> 
> I attach a screenshot to explain more clearly what's
> happening. Typing
> 'filename' in the save dialog box results in 'filename'
> being
> displayed in the terminal window, where the red arrow
> points to.
> 
> This seems to be related to the MacOSX backend as switching
> to TkAgg
> resolves #2 (#1 still happens).
> 
> Any ideas?
> 
> -- 
> Dominique
> 
> -Inline Attachment Follows-
> 
> --
> Free Software Download: Index, Search & Analyze Logs
> and other IT data in 
> Real-Time with Splunk. Collect, index and harness all the
> fast moving IT data 
> generated by your applications, servers and devices whether
> physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain
> new business 
> insights. http://p.sf.net/sfu/splunk-dev2dev
> 
> -Inline Attachment Follows-
> 
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 


  

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Michiel de Hoon
I have compiled matplotlib with a 64 bit Python on Mac OS X (using setup.py) 
for the MacOSX backend. It's not as hard as it may seem.
You will need 64-bit (or multiple-architecture) libraries for zlib, libpng, 
etc. You may have those already; you can check that by running "file" on the 
library. For example:

$ file /usr/local/lib/libpng.dylib 
/usr/local/lib/libpng.dylib: Mach-O universal binary with 2 architectures
/usr/local/lib/libpng.dylib (for architecture i386):Mach-O dynamically 
linked shared library i386
/usr/local/lib/libpng.dylib (for architecture x86_64):  Mach-O 64-bit 
dynamically linked shared library x86_64

If the library is 32-bit only, then you will have to compile your own zlib, 
libpng etc. If the library includes 64-bit, then you just need to compile 
matplotlib.

--Michiel.

--- On Tue, 2/22/11, Gideon Simpson  wrote:

> From: Gideon Simpson 
> Subject: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7
> To: matplotlib-users@lists.sourceforge.net
> Date: Tuesday, February 22, 2011, 1:35 PM
> Hi, I have OS X 10.6.6, Python 2.7.1
> installed from the binary at python.org, and I am trying to
> get mpl 1.0.1 running.  I have no problem with
> numpy/scipy, but I seem to be having 32 vs. 64 bit issues
> with mpl.  I believe that the binaries online are only
> 32 bit, yet my installation is 64 bit.  I have tried
> using the make.osx file, but this has not proved successful
> so far.  In part, I am trying to avoid installing
> duplicate png/zlib/freetype/... libraries, which seem to be
> working fine at present.  Has anyone successfully
> gotten this running from source?  Alternatively, does
> anyone have 64 bit binaries?
>  
> -gideon
> 
> 
> --
> Free Software Download: Index, Search & Analyze Logs
> and other IT data in 
> Real-Time with Splunk. Collect, index and harness all the
> fast moving IT data 
> generated by your applications, servers and devices whether
> physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain
> new business 
> insights. http://p.sf.net/sfu/splunk-dev2dev 
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 


  

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Gideon Simpson
Per a suggestion, I downgraded myself to the 32 bit python 2.7.1.  I tried 
installing the 32 bit binaries from the website, but get the following:


Python 2.7.1 (r271:86882M, Nov 30 2010, 09:39:13) 
[GCC 4.0.1 (Apple Inc. build 5494)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab
Bus error

-gideon


--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Gideon Simpson
That's right.  python setup.py build seems to execute without a problem (though 
there were some warnings).  But then I get an architecture issue.

-gideon

On Feb 22, 2011, at 4:54 PM, Darren Dale wrote:

> On Tue, Feb 22, 2011 at 4:21 PM, Gideon Simpson
>  wrote:
>> Here's the ouput I got:
>> 
>> Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
>> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
>> Type "help", "copyright", "credits" or "license" for more information.
> import pylab
>> Traceback (most recent call last):
>>  File "", line 1, in 
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylab.py",
>>  line 1, in 
>>from matplotlib.pylab import *
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pylab.py",
>>  line 220, in 
>>from matplotlib import mpl  # pulls in most modules
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl.py",
>>  line 1, in 
>>from matplotlib import artist
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py",
>>  line 6, in 
>>from transforms import Bbox, IdentityTransform, TransformedBbox, 
>> TransformedPath
>>  File 
>> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py",
>>  line 34, in 
>>from matplotlib._path import affine_transform
>> ImportError: 
>> dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so,
>>  2): no suitable image found.  Did find:
>>
>> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so:
>>  mach-o, but wrong architecture
> 
> So the build went ok then? Or is this the 32-bit matplotlib installer
> with a 64-bit python?


--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Paul Ivanov
Gideon Simpson, on 2011-02-22 16:21,  wrote:
> Here's the ouput I got:
> 
> Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) 
> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pylab
> Traceback (most recent call last):
>   File "", line 1, in 
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylab.py",
>  line 1, in 
> from matplotlib.pylab import *
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pylab.py",
>  line 220, in 
> from matplotlib import mpl  # pulls in most modules
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl.py",
>  line 1, in 
> from matplotlib import artist
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py",
>  line 6, in 
> from transforms import Bbox, IdentityTransform, TransformedBbox, 
> TransformedPath
>   File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py",
>  line 34, in 
> from matplotlib._path import affine_transform
> ImportError: 
> dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so,
>  2): no suitable image found.  Did find:
>   
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so:
>  mach-o, but wrong architecture
 
Hi Gideon,

this looks identical to
http://old.nabble.com/-matplotlib-problem-td3049.html

The poster there solved the problem by using a 32 bit version of
python. If that's not an option for you, please provide a more
detailed description of the problems you run into building
matplotlib for your 64-bit python.

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 


signature.asc
Description: Digital signature
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Darren Dale
On Tue, Feb 22, 2011 at 4:21 PM, Gideon Simpson
 wrote:
> Here's the ouput I got:
>
> Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34)
> [GCC 4.2.1 (Apple Inc. build 5664)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
 import pylab
> Traceback (most recent call last):
>  File "", line 1, in 
>  File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylab.py",
>  line 1, in 
>    from matplotlib.pylab import *
>  File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pylab.py",
>  line 220, in 
>    from matplotlib import mpl  # pulls in most modules
>  File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl.py",
>  line 1, in 
>    from matplotlib import artist
>  File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py",
>  line 6, in 
>    from transforms import Bbox, IdentityTransform, TransformedBbox, 
> TransformedPath
>  File 
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py",
>  line 34, in 
>    from matplotlib._path import affine_transform
> ImportError: 
> dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so,
>  2): no suitable image found.  Did find:
>        
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so:
>  mach-o, but wrong architecture

So the build went ok then? Or is this the 32-bit matplotlib installer
with a 64-bit python?

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] "ipython -pylab" fails but "from pylab import plot" works on mac?

2011-02-22 Thread Paul Ivanov
Matthias Wong, on 2011-02-17 20:56,  wrote:
> Hi all,
> 
> It's exactly as said. I am using OS 10.6
> 
> If I use ipython -pylab and later try to plot anything, the GUI for plotting 
> launches and I just get a beachball.
> 
> However, if I do ipython and then import plot, I can do a plot with no 
> problem. 
> 
> I did a search but came up with nothing. I have this problem whether I use 
> apple python or the python2.7 downloaded from python.org. 
> 
> I am new to the whole terminal/programming thing. As you can imagine, 
> everything is very difficult. Any help is appreciated

Hi Matthias,


can you post the results of running the following:

import matplotlib
import IPython
print matplotlib.get_backend()
print matplotlib.__version__
print IPython.__version__


If you are trying IPython 0.11, this is a known issue as of 3
months ago [1].

There were also similar issues reported with using GTK [2], which
I believe were addressed in [3], and are waiting to be merged.

1. https://github.com/ipython/ipython/issues/#issue/202
2. https://github.com/ipython/ipython/issues/#issue/185
3. https://github.com/ipython/ipython/pull/237

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 


signature.asc
Description: Digital signature
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mixed_subplots_demo.py

2011-02-22 Thread Benjamin Root
On Tue, Feb 22, 2011 at 3:31 PM, Patton Bradford wrote:

> Trying to get the referenced example from the mplot3d example web page
> working with Python 2.6.1 on Windows XP.  Naturally, the line:
>
> ax = fig.add_subplot(2, 1, 2, projection='3d')
>
> fails since '3d' is not a recognized projection.  Now, if I want to just
> plot the 3d, the solution that works seems to be:
> fig = plt.figure()
> ax = Axes3D(fig)
> 
> surf = ax.plot_surface()
>
> However, I can't seem to find a way to create the one figure, add the 2D
> subplot and then the 3D subplot.
>
> Any suggestions?
>
> Thanks in advance.
>
>
That was a feature added in matplotlib 1.0.0.  You will need to upgrade your
version of matplotlib to perform that example.

Ben Root
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] mixed_subplots_demo.py

2011-02-22 Thread Patton Bradford
Trying to get the referenced example from the mplot3d example web page working 
with Python 2.6.1 on Windows XP.  Naturally, the line:
 
ax = fig.add_subplot(2, 1, 2, projection='3d')
 
fails since '3d' is not a recognized projection.  Now, if I want to just plot 
the 3d, the solution that works seems to be:
fig = plt.figure()
ax = Axes3D(fig)

surf = ax.plot_surface()
 
However, I can't seem to find a way to create the one figure, add the 2D 
subplot and then the 3D subplot.
 
Any suggestions?
 
Thanks in advance.

 --
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Gideon Simpson
Here's the ouput I got:

Python 2.7.1 (r271:86882M, Nov 30 2010, 10:35:34) 
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylab
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pylab.py",
 line 1, in 
from matplotlib.pylab import *
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pylab.py",
 line 220, in 
from matplotlib import mpl  # pulls in most modules
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/mpl.py",
 line 1, in 
from matplotlib import artist
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py",
 line 6, in 
from transforms import Bbox, IdentityTransform, TransformedBbox, 
TransformedPath
  File 
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py",
 line 34, in 
from matplotlib._path import affine_transform
ImportError: 
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so,
 2): no suitable image found.  Did find:

/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so:
 mach-o, but wrong architecture

-gideon

On Feb 22, 2011, at 2:17 PM, Darren Dale wrote:

> On Tue, Feb 22, 2011 at 1:35 PM, Gideon Simpson
>  wrote:
>> Hi, I have OS X 10.6.6, Python 2.7.1 installed from the binary at 
>> python.org, and I am trying to get mpl 1.0.1 running.  I have no problem 
>> with numpy/scipy, but I seem to be having 32 vs. 64 bit issues with mpl.  I 
>> believe that the binaries online are only 32 bit, yet my installation is 64 
>> bit.  I have tried using the make.osx file, but this has not proved 
>> successful so far.  In part, I am trying to avoid installing duplicate 
>> png/zlib/freetype/... libraries, which seem to be working fine at present.  
>> Has anyone successfully gotten this running from source?  Alternatively, 
>> does anyone have 64 bit binaries?
> 
> Maybe you could post some error messages or build output.
> 
> I am using python-2.7, png/zlib/freetype installed from macports on OS
> X 10.6, and I don't need to use make.osx. I just run python setup.py
> build and it appears to work fine.


--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] error: Setup script exited with error: command 'gcc' failed with exit status 1

2011-02-22 Thread Benjamin Root
On Tue, Feb 22, 2011 at 2:17 PM, M.Rule  wrote:

> Hello, I'm having trouble installing Matplotlib. Both easy_install and the
> latest svn checkout give similar errors : http://pastebin.com/5g0RsdRx
>
> any ideas ?
>
>
> --
> Free Software Download: Index, Search & Analyze Logs and other IT data in
> Real-Time with Splunk. Collect, index and harness all the fast moving IT
> data
> generated by your applications, servers and devices whether physical,
> virtual
> or in the cloud. Deliver compliance at lower cost and gain new business
> insights. http://p.sf.net/sfu/splunk-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
If you are on Ubuntu, you can do this easily with the following command:

sudo apt-get build-dep python-matplotlib

Then you can try building matplotlib.

Ben Root
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] error: Setup script exited with error: command 'gcc' failed with exit status 1

2011-02-22 Thread M.Rule
installed:

libfreetype6-dev
libpng12-dev
python-tk
libgtk2.0-dev

everything seems good, just need to configure GUI backend now, thanks.


On Tue, Feb 22, 2011 at 3:22 PM, Darren Dale  wrote:

> On Tue, Feb 22, 2011 at 3:17 PM, M.Rule  wrote:
> > Hello, I'm having trouble installing Matplotlib. Both easy_install and
> the
> > latest svn checkout give similar errors : http://pastebin.com/5g0RsdRx
> > any ideas ?
>
> You are missing headers from a number of critical libraries. Try using
> your package manager to install the development packages of the
> libraries mentioned in the build report:
>
> freetype2: found, but unknown version (no pkg-config)
>* WARNING: Could not find 'freetype2' headers in any
>* of '/usr/local/include', '/usr/include', '.',
>* '/usr/local/include/freetype2',
>* '/usr/include/freetype2', './freetype2'.
>
> OPTIONAL BACKEND DEPENDENCIES
>libpng: found, but unknown version (no pkg-config)
>* Could not find 'libpng' headers in any of
>* '/usr/local/include', '/usr/include', '.'
>   Tkinter: no
>* TKAgg requires Tkinter
>  wxPython: 2.8.10.1
>* WxAgg extension not required for wxPython >= 2.8
>  Gtk+: gtk+: 2.20.1, glib: 2.24.1, pygtk: 2.17.0,
>pygobject: 2.21.1
>* Could not find Gtk+ headers in any of
>* '/usr/local/include', '/usr/include', '.'
>
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] error: Setup script exited with error: command 'gcc' failed with exit status 1

2011-02-22 Thread Darren Dale
On Tue, Feb 22, 2011 at 3:17 PM, M.Rule  wrote:
> Hello, I'm having trouble installing Matplotlib. Both easy_install and the
> latest svn checkout give similar errors : http://pastebin.com/5g0RsdRx
> any ideas ?

You are missing headers from a number of critical libraries. Try using
your package manager to install the development packages of the
libraries mentioned in the build report:

 freetype2: found, but unknown version (no pkg-config)
* WARNING: Could not find 'freetype2' headers in any
* of '/usr/local/include', '/usr/include', '.',
* '/usr/local/include/freetype2',
* '/usr/include/freetype2', './freetype2'.

OPTIONAL BACKEND DEPENDENCIES
libpng: found, but unknown version (no pkg-config)
* Could not find 'libpng' headers in any of
* '/usr/local/include', '/usr/include', '.'
   Tkinter: no
* TKAgg requires Tkinter
  wxPython: 2.8.10.1
* WxAgg extension not required for wxPython >= 2.8
  Gtk+: gtk+: 2.20.1, glib: 2.24.1, pygtk: 2.17.0,
pygobject: 2.21.1
* Could not find Gtk+ headers in any of
* '/usr/local/include', '/usr/include', '.'

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] error: Setup script exited with error: command 'gcc' failed with exit status 1

2011-02-22 Thread M.Rule
Hello, I'm having trouble installing Matplotlib. Both easy_install and the
latest svn checkout give similar errors : http://pastebin.com/5g0RsdRx

any ideas ?
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Errorbar plot

2011-02-22 Thread Paul Ivanov
Waléria Antunes David, on 2011-02-22 16:17,  wrote:
> Hi Daniel,
> 
> Yes, i tried import errorbari did this: import matplotlib.errobar , but
> occurred an error: Exception Type: ImportError  Exception Value:
> 
> No module named errobar

Hi Waléria,

there was a typo in Daniel's reply. The function is called
errorbar, not errobar. For the object-oriented interface, you can
find it attached to an Axes instance, or call the corresponding
convenience function from the pyplot interface.

  import matplotlib.pyplot as plt
  
  # object-oriented interface
  ax = plt.subplot(1,1,1)
  ax.errorbar?
  
  # pyplot (matlab-like) interface
  plt.errorbar?

As Daniel pointed out, the question mark will pull up the
docstring if you're using IPython, but if you aren't, you
can always call python's help.

  help(plt.errorbar)

which will print the docstring for you.

hope that helps,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 


signature.asc
Description: Digital signature
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] tick format support for ``format``

2011-02-22 Thread Benjamin Root
On Tue, Feb 22, 2011 at 1:42 PM, Alan G Isaac  wrote:

> Am I overlooking tick format support for ``format``?
> http://docs.python.org/library/functions.html#format
>
> If not, might it be added?
>
> Ordinarily I'd use FormatStrFormatter, but this time
> I wanted percentages, so I had to (?) use FuncFormatter.
> This was both surprising (because ``format`` is core
> Python functionality) and confusing (because the docs
> did not point out that the user-provided function must
> take two arguments).
>
> Thanks,
> Alan Isaac
>
>
I second this.  Given that the '%' approach to formatting will be deprecated
in later releases of the 3.x series, it probably would be a good idea to
start transitioning to the new approach.

To start, I would like to see a note added to the FormatStrFormatter docs
pointing to an example on how to use FuncFormatter to implement the new
style formatter.

Ben Root
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Dual Y-Axes on Imshow

2011-02-22 Thread Paul Ivanov
Jason Stone, on 2011-02-18 14:39,  wrote:
> Good afternoon all,
> One last matplotlib question for the group for today.  On one of my GUI
> plots, I'm calling imshow on an array of data (to display it in the same way
> MATLAB's imagesc command does).  I'd like to add a second y-axis to the
> right side of the plot that is completely dependent on the values on the
> primary y-axis.  Essentially, for each y-axis tick point, I'll put the
> y-axis 'value' into a formula and then put the result on the second y-axis.
>  I did this in MATLAB by essentially overlaying a second set of axes over
> the plot, but I haven't found the exact way to do it with matplotlib yet.
>  I've seen a few examples online, but they all use the second overlaid plot
> to actually plot new data - I wouldn't be doing this.
> Would I need to use the twinx (or twiny) function?
> Are there examples of this on the web that I haven't found that somebody
> could point me towards?

Hi Jason,

here's an example that does what you want, using e^x as the
formula, change the paramter to fmtr to suit your needs:

ax = plt.subplot(1,1,1)
ax.plot(np.sin(np.linspace(0,np.pi)))
ax2 = ax.twinx()
ax2._sharey = ax # share both x and y
fmtr = mpl.ticker.FuncFormatter(lambda x,pos: "%.2f"%np.exp(x))
ax2.yaxis.set_major_formatter(fmtr)
plt.draw()

best,
-- 
Paul Ivanov
314 address only used for lists,  off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 


signature.asc
Description: Digital signature
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] tick format support for ``format``

2011-02-22 Thread Alan G Isaac
Am I overlooking tick format support for ``format``?
http://docs.python.org/library/functions.html#format

If not, might it be added?

Ordinarily I'd use FormatStrFormatter, but this time
I wanted percentages, so I had to (?) use FuncFormatter.
This was both surprising (because ``format`` is core
Python functionality) and confusing (because the docs
did not point out that the user-provided function must
take two arguments).

Thanks,
Alan Isaac

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Errorbar plot

2011-02-22 Thread Waléria Antunes David
Hi Daniel,

Yes, i tried import errorbari did this: import matplotlib.errobar , but
occurred an error: Exception Type: ImportError  Exception Value:

No module named errobar


Thanks,


On Tue, Feb 22, 2011 at 3:59 PM, <
matplotlib-users-requ...@lists.sourceforge.net> wrote:

> Send Matplotlib-users mailing list submissions to
>matplotlib-users@lists.sourceforge.net
>
> To subscribe or unsubscribe via the World Wide Web, visit
>https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> or, via email, send a message with subject or body 'help' to
>matplotlib-users-requ...@lists.sourceforge.net
>
> You can reach the person managing the list at
>matplotlib-users-ow...@lists.sourceforge.net
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Matplotlib-users digest..."
>
>
> Today's Topics:
>
>   1. Re: Histogram with single series - colour coding different
>  ranges? (Benjamin Root)
>   2. Errorbar plot (Wal?ria Antunes David)
>   3. Re: Errorbar plot (Daniel Mader)
>   4. Re: Plotting large data sets with Pylab (Benjamin Root)
>   5. errorbar plot (Wal?ria Antunes David)
>   6. MacOSX backend bug (Dominique Orban)
>
>
> --
>
> Message: 1
> Date: Tue, 22 Feb 2011 10:12:54 -0600
> From: Benjamin Root 
> Subject: Re: [Matplotlib-users] Histogram with single series - colour
>coding different ranges?
> To: Victor Hooi 
> Cc: matplotlib-users@lists.sourceforge.net
> Message-ID:
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Tue, Feb 15, 2011 at 11:07 PM, Victor Hooi 
> wrote:
>
> > heya,
> >
> > Is there an easy way to colour-code a Matplotlib histogram with a single
> > set of data?
> >
> > So for example, you'd have a bell-shaped histogram, and the middle 50%
> > might be green, the regions 20% to the left and right of that might be
> > yellow, and the 5% either side beyond that could be red.
> >
> > I couldn't seem to find anything in the Matplotlib options for this - any
> > suggestions?
> >
> > Cheers,
> > Victor
> >
> >
> Sure, check out the following:
>
> import matplotlib.pyplot as plt
> import numpy as np
>
> xs = np.arange(20)
> ys = np.random.rand(20)
> cs = (['y'] * round(0.25 * len(xs))) + (['g'] * round(0.5 * len(xs))) +
> (['y'] * round(0.25 * len(xs)))
>
> plt.bar(xs, ys, color=cs)
> plt.show()
>
>
> Admittedly, this isn't using matplotlib's hist() function because it only
> allows for one color per dataset.  However, you can use numpy's histogram
> function to get the bins and counts yourself, and then use bar() to make
> the
> bars.  bar() will allow you to color the bars individually.
>
> I hope this helps!
> Ben Root
> -- next part --
> An HTML attachment was scrubbed...
>
> --
>
> Message: 2
> Date: Tue, 22 Feb 2011 13:13:53 -0300
> From: Wal?ria Antunes David 
> Subject: [Matplotlib-users] Errorbar plot
> To: Matplotlib Users 
> Message-ID:
>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
>
> I have this line about errorbar plot, but i need a errorbar this:
> http://img14.imageshack.us/i/exampled.jpg/ (in blue)
>
> My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2,
> marker='_', linestyle='', markeredgecolor='r',color='r', label='Pontos')
>
> Can you help me?
>
> Thanks,
> -- next part --
> An HTML attachment was scrubbed...
>
> --
>
> Message: 3
> Date: Tue, 22 Feb 2011 17:28:04 +0100
> From: Daniel Mader 
> Subject: Re: [Matplotlib-users] Errorbar plot
> To: matplotlib-users@lists.sourceforge.net
> Message-ID:
>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Wal?ria,
>
> you should try to figure out the docstring help :)
>
> In a terminal (IDLE or IPython), just do
> import matplotlib
> matplotlib.errobar?
>
> This will show you extensive help on the command.
>
> You will also need to compare with the regular plot command:
> matplotlib.plot?
>
> Best regards,
> Daniel
>
> P.S. I cannot see what is wrong with your line. Change 'r' to 'b' and
> the plot should be in blue.
>
> 2011/2/22 Wal?ria Antunes David :
> > Hi all,
> >
> > I have this line about errorbar plot, but i need a errorbar this:
> > http://img14.imageshack.us/i/exampled.jpg/ (in blue)
> >
> > My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6,
> elinewidth=2,
> > marker='_', linestyle='', markeredgecolor='r',color='r', label='Pontos')
> >
> > Can you help me?
> >
> > Thanks,
> >
> >
> --
> > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
> > Collect, index and harness all the fast moving IT data generated by your
> > applications, servers and devices whether physical, virtual or in the
> cloud.
> > Deliver compliance at lower cost and gain new business insights.
> > Free Soft

[Matplotlib-users] mpl 1.0.1 + snow leopard + python 2.7

2011-02-22 Thread Gideon Simpson
Hi, I have OS X 10.6.6, Python 2.7.1 installed from the binary at python.org, 
and I am trying to get mpl 1.0.1 running.  I have no problem with numpy/scipy, 
but I seem to be having 32 vs. 64 bit issues with mpl.  I believe that the 
binaries online are only 32 bit, yet my installation is 64 bit.  I have tried 
using the make.osx file, but this has not proved successful so far.  In part, I 
am trying to avoid installing duplicate png/zlib/freetype/... libraries, which 
seem to be working fine at present.  Has anyone successfully gotten this 
running from source?  Alternatively, does anyone have 64 bit binaries?
 
-gideon


--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] errorbar plot

2011-02-22 Thread Waléria Antunes David
Hi all,

I have this line about errorbar plot, but i need a errorbar this:
http://img14.imageshack.us/i/exampled.jpg/ (in blue)

My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2,
marker='_', linestyle='', markeredgecolor='r',color='r', label='Pontos')

Can you help me?

Thanks,
--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting large data sets with Pylab

2011-02-22 Thread Benjamin Root
On Tue, Feb 22, 2011 at 10:30 AM, Bruno George wrote:

> Dear Benjamin,
>
> Thanks for the observations.   The speed wasn't as large of a concern as
> the Python's ability to plot the volume of data in Windows..  The Mac was a
> MacBook Air laptop, 1.8GHz Intel dual core 64 bit processor while the
> Windows desk side machine using an AMD64 3200+ 2.1 GHz  processor running 32
> bit Windows.  Both machines have 2GB ram the Windows machine is using a
> Nvidia GeForce 6200 graphics card and the Mac is using Intel on board
> graphics.  The hardware is fairly well matched by and large.
>
> Here's the error message from the PC:
>
>
> *
>
> Exception in Tkinter callback
> Traceback (most recent call last):
>   File "C:\Python27\lib\lib-tk\Tkinter.py", line 1410, in __call__
> return self.func(*args)
>   File
> "C:\Python27\lib\site-packages\matplotlib\backends\backend_tkagg.py", line
> 245, in resize
> self.show()
>   File
> "C:\Python27\lib\site-packages\matplotlib\backends\backend_tkagg.py", line
> 248, in draw
> FigureCanvasAgg.draw(self)
>   File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
> line 394, in draw
> self.figure.draw(self.renderer)
>   File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
>   File "C:\Python27\lib\site-packages\matplotlib\figure.py", line 798, in
> draw
> func(*args)
>   File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
>   File "C:\Python27\lib\site-packages\matplotlib\axes.py", line 1946, in
> draw
> a.draw(renderer)
>   File "C:\Python27\lib\site-packages\matplotlib\artist.py", line 55, in
> draw_wrapper
> draw(artist, renderer, *args, **kwargs)
>   File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 540, in
> draw
> drawFunc(renderer, gc, tpath, affine.frozen())
>   File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 905, in
> _draw_lines
> self._lineFunc(renderer, gc, path, trans)
>   File "C:\Python27\lib\site-packages\matplotlib\lines.py", line 986, in
> _draw_solid
> renderer.draw_path(gc, path, trans)
>   File "C:\Python27\lib\site-packages\matplotlib\backends\backend_agg.py",
> line 117, in draw_path
> self._renderer.draw_path(gc, path, transform, rgbFace)
> OverflowError: Agg rendering complexity exceeded. Consider downsampling or
> decimating your data
>
> ***
> Thanks for looking into my problem,
>
> Bruno George
>
>
Bruno,

First, as a side note, even though your Windows machine is a 64-bit machine,
the fact is that you are running a 32-bit Windows, which will limit the
amount of memory any one process can use.

As for your error message, I believe that is actually something slightly
different than what I originally thought.  Have you tried dealing with
path.simplfy?  Which version of matplotlib are you running?

Ben Root
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Errorbar plot

2011-02-22 Thread Daniel Mader
Hi Waléria,

you should try to figure out the docstring help :)

In a terminal (IDLE or IPython), just do
import matplotlib
matplotlib.errobar?

This will show you extensive help on the command.

You will also need to compare with the regular plot command:
matplotlib.plot?

Best regards,
Daniel

P.S. I cannot see what is wrong with your line. Change 'r' to 'b' and
the plot should be in blue.

2011/2/22 Waléria Antunes David :
> Hi all,
>
> I have this line about errorbar plot, but i need a errorbar this:
> http://img14.imageshack.us/i/exampled.jpg/ (in blue)
>
> My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2,
> marker='_', linestyle='', markeredgecolor='r',color='r', label='Pontos')
>
> Can you help me?
>
> Thanks,
>
> --
> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
> Collect, index and harness all the fast moving IT data generated by your
> applications, servers and devices whether physical, virtual or in the cloud.
> Deliver compliance at lower cost and gain new business insights.
> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Errorbar plot

2011-02-22 Thread Waléria Antunes David
Hi all,

I have this line about errorbar plot, but i need a errorbar this:
http://img14.imageshack.us/i/exampled.jpg/ (in blue)

My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2,
marker='_', linestyle='', markeredgecolor='r',color='r', label='Pontos')

Can you help me?

Thanks,
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-02-22 Thread Benjamin Root
On Tue, Feb 15, 2011 at 11:07 PM, Victor Hooi  wrote:

> heya,
>
> Is there an easy way to colour-code a Matplotlib histogram with a single
> set of data?
>
> So for example, you'd have a bell-shaped histogram, and the middle 50%
> might be green, the regions 20% to the left and right of that might be
> yellow, and the 5% either side beyond that could be red.
>
> I couldn't seem to find anything in the Matplotlib options for this - any
> suggestions?
>
> Cheers,
> Victor
>
>
Sure, check out the following:

import matplotlib.pyplot as plt
import numpy as np

xs = np.arange(20)
ys = np.random.rand(20)
cs = (['y'] * round(0.25 * len(xs))) + (['g'] * round(0.5 * len(xs))) +
(['y'] * round(0.25 * len(xs)))

plt.bar(xs, ys, color=cs)
plt.show()


Admittedly, this isn't using matplotlib's hist() function because it only
allows for one color per dataset.  However, you can use numpy's histogram
function to get the bins and counts yourself, and then use bar() to make the
bars.  bar() will allow you to color the bars individually.

I hope this helps!
Ben Root
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting large data sets with Pylab

2011-02-22 Thread Benjamin Root
On Sun, Feb 20, 2011 at 9:22 PM, Bruno George wrote:

> Both Python 2.6 and Python 2.7  Windows and Mac
>
> I've been running a very simple plotting script with  Mac OSX 10.5.8 and
> Windows XP Professional Version 2002, Service Pack 3 using a large,
> 10,000,000 element .csv file.  I ran both scripts locally with the data in
> the same local directory as the script.
>
> The Python version on the Mac is:
> Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
> [GCC 4.0.1 (Apple Inc. build 5493)] on darwin
> 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 2.6.6
> >>>  RESTART
> 
> >>>
> Now its:  Sun Feb 20 17:18:10 2011
> 1298251090.64
> slorping
> It took 414.0 seconds to slorp in an array containing 1000 elements.
>
> on Windows:
>
> Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 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 2.6.6
> >>>  RESTART
> 
> >>>
> Now its:  Sun Feb 20 18:25:41 2011
> 1298255141.56
> slorping
> It took 169.0 seconds to slorp in an array containing 1000 elements.
>
> Now its:  Sun Feb 20 18:28:30 2011
>
> 
>
> The script and the data are identical:
>
>
> import time as ti
>
> from math import radians
>
> from pylab import plot, show
>
>
> from numpy import loadtxt, ravel , shape
>
> #
> ###Timekeeping Stuff#
> #
>
> print 'Now its: ',ti.asctime()
>
> clockA = ti.time()
> print clockA
>
>
> #
> ###One Big Huge Flat Array###
> #
> column = 0
>
> x = ()
> raw = ()
> normal = ()
> checker = ()
> trigger = ()
>
> print 'slorping'
>
> raw = loadtxt('DataLogger.csv', float, delimiter = 'n,')
> x = ravel(raw)
> ##normal = (x+.5807)*(2/3.)
>
> ###
> ###Just fun timing stuff
> ###
>
> clockS = ti.time()
> s = shape(x)
> print 'It took',round(clockS-clockA), 'seconds to slorp in an array
> containing',s[0], 'elements.'
> print ""
> print 'Now its: ',ti.asctime()
>
>
> plot(x, 'k')
> show()
>
>
> *
>
> This script will plot consistently on the Mac and crashes every time on the
> PC.  I'm data logging at 100MZ and the card is on the PC desk side machine.
> My Macbook Air doesn't have a PCI slot.  I developed all of the scripts on
> the Mac using data logged on the PC.  I was hoping to integrate everything
> onto the PC for efficiency.  Is there a workaround I can use on the PC?
>
> Thanks,
>
> Bruno George
>
>
The performance issue for reading those data files will be largely dependent
on how fast the harddrives are on the machines.

The crashing issue is likely due to Windows XP's memory allocation mechanism
or running into the memory barrier for 32-bit machines.  Is your Mac a
64-bit machine?  If it is, then it is likely that getting a 64-bit Windows
machine would address the crashing issue.  To be sure, I would watch the
memory usage of those scripts to see how high it gets.

Ben Root
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] "ipython -pylab" fails but "from pylab import plot" works on mac?

2011-02-22 Thread Benjamin Root
On Thu, Feb 17, 2011 at 3:56 AM, Matthias Wong  wrote:

> Hi all,
>
> It's exactly as said. I am using OS 10.6
>
> If I use ipython -pylab and later try to plot anything, the GUI for
> plotting launches and I just get a beachball.
>
> However, if I do ipython and then import plot, I can do a plot with no
> problem.
>
> I did a search but came up with nothing. I have this problem whether I use
> apple python or the python2.7 downloaded from python.org.
>
> I am new to the whole terminal/programming thing. As you can imagine,
> everything is very difficult. Any help is appreciated
>
> God bless,
> Matthias
>

Most likely, ipython is trying to import a different (broken?) version of
matplotlib than what python finds automatically.  I would try re-installing
ipython.

Ben Root
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plotting histogram with dictionary values

2011-02-22 Thread Benjamin Root
On Fri, Feb 18, 2011 at 9:13 AM, JamesTan12  wrote:

>
> Hi I have a list (Key values) with values I would like to plot to a
> matplotlib histogram
>
> [('a', 155), ('c', 73), ('b', 19), ('e', 260), ('d', 73), ('g', 42), ('f',
> 47), ('i', 175), ('h', 77), ('k', 7), ('j', 2), ('m', 76), ('l', 63), ('o',
> 174), ('n', 145), ('q', 3), ('p', 61), ('s', 153), ('r', 143), ('u', 50),
> ('t', 193), ('w', 19), ('v', 21), ('y', 55), ('x', 4), ('z', 4)]
>
> Can anyone suggest how do I go about to plot it into a histogram with
> x-asix
> being the key and y axis being the value.?
>

I would do something like the following:

data = [('a', 155), ('c', 73), ('b', 19), ('e', 260), ('d', 73), ('g', 42),
('f',
47), ('i', 175), ('h', 77), ('k', 7), ('j', 2), ('m', 76), ('l', 63), ('o',
174), ('n', 145), ('q', 3), ('p', 61), ('s', 153), ('r', 143), ('u', 50),
('t', 193), ('w', 19), ('v', 21), ('y', 55), ('x', 4), ('z', 4)]

x, y = zip(*data)
xlocs = np.arange(len(x))

fig = plt.figure()
ax = fig.gca()
ax.bar(xlocs + 0.6, y)
ax.set_xticks(xlocs + 1)
ax.set_xticklabels(x)
ax.set_xlim(0.0, xlocs.max() + 2)

plt.show()


The xlocs + 0.6 is to list the left edge of the bars so that they are
centered on integer tick locations (the bars are 0.8 wide by default).  The
xlocs + 1 is to set the xaxis ticks at the center of each bar, and the
xlocs.max() + 2 is to have enough room on the right hand side of your graph
for everything.

I hope that helps!

Ben Root
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Matplotlib Widget in QT Question

2011-02-22 Thread Philipp A.
2011/2/18 Jason Stone 

> Good afternoon all,
> I'm developing a GUI using QT Designer 4 and Python 2.7.  The GUI will need
> to have several plots on it in order to show the data in the ways that I
> need.  To accomplish this I'm using the matplotlib widget from within QT
> Designer.  It all seems to work great, but I can't seem to find a way to
> change the background color of the widget.  Essentially, I've got a nicely
> laid out GUI with the default QT Designer light gray as the "background
> color".  Then I've got these matplotlib widgets which by default have a
> darker shade of gray/charcoal as their "background color".  How do I change
> the matplotlib widget bgcolor to the default light gray so as to match the
> rest of the GUI?  Turning the background of the main GUI to the dark gray to
> match the matplotlib color is not an option.  I kind of assumed the issue
> has to do with the matplotlib widget and not with QT Designer, hence the
> reason for posting in this mailing list.
>
> Does anyone have any thoughts regarding this?  Or can you point me to a
> documentation set that shows how to do this?
>

thiscould
help you.

and it is named *Qt*.
QT means quicktime.
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Histogram with single series - colour coding different ranges?

2011-02-22 Thread Victor Hooi
heya,

Is there an easy way to colour-code a Matplotlib histogram with a single set
of data?

So for example, you'd have a bell-shaped histogram, and the middle 50% might
be green, the regions 20% to the left and right of that might be yellow, and
the 5% either side beyond that could be red.

I couldn't seem to find anything in the Matplotlib options for this - any
suggestions?

Cheers,
Victor
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Plotting large data sets with Pylab

2011-02-22 Thread Bruno George
Both Python 2.6 and Python 2.7  Windows and Mac

I've been running a very simple plotting script with  Mac OSX 10.5.8 and
Windows XP Professional Version 2002, Service Pack 3 using a large,
10,000,000 element .csv file.  I ran both scripts locally with the data in
the same local directory as the script.

The Python version on the Mac is:
Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
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 2.6.6
>>>  RESTART

>>>
Now its:  Sun Feb 20 17:18:10 2011
1298251090.64
slorping
It took 414.0 seconds to slorp in an array containing 1000 elements.

on Windows:

Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 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 2.6.6
>>>  RESTART

>>>
Now its:  Sun Feb 20 18:25:41 2011
1298255141.56
slorping
It took 169.0 seconds to slorp in an array containing 1000 elements.

Now its:  Sun Feb 20 18:28:30 2011



The script and the data are identical:


import time as ti

from math import radians

from pylab import plot, show


from numpy import loadtxt, ravel , shape

#
###Timekeeping Stuff#
#

print 'Now its: ',ti.asctime()

clockA = ti.time()
print clockA


#
###One Big Huge Flat Array###
#
column = 0

x = ()
raw = ()
normal = ()
checker = ()
trigger = ()

print 'slorping'

raw = loadtxt('DataLogger.csv', float, delimiter = 'n,')
x = ravel(raw)
##normal = (x+.5807)*(2/3.)

###
###Just fun timing stuff
###

clockS = ti.time()
s = shape(x)
print 'It took',round(clockS-clockA), 'seconds to slorp in an array
containing',s[0], 'elements.'
print ""
print 'Now its: ',ti.asctime()


plot(x, 'k')
show()

*

This script will plot consistently on the Mac and crashes every time on the
PC.  I'm data logging at 100MZ and the card is on the PC desk side machine.
My Macbook Air doesn't have a PCI slot.  I developed all of the scripts on
the Mac using data logged on the PC.  I was hoping to integrate everything
onto the PC for efficiency.  Is there a workaround I can use on the PC?

Thanks,

Bruno George
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib Widget in QT Question

2011-02-22 Thread Jason Stone
Good afternoon all,
I'm developing a GUI using QT Designer 4 and Python 2.7.  The GUI will need
to have several plots on it in order to show the data in the ways that I
need.  To accomplish this I'm using the matplotlib widget from within QT
Designer.  It all seems to work great, but I can't seem to find a way to
change the background color of the widget.  Essentially, I've got a nicely
laid out GUI with the default QT Designer light gray as the "background
color".  Then I've got these matplotlib widgets which by default have a
darker shade of gray/charcoal as their "background color".  How do I change
the matplotlib widget bgcolor to the default light gray so as to match the
rest of the GUI?  Turning the background of the main GUI to the dark gray to
match the matplotlib color is not an option.  I kind of assumed the issue
has to do with the matplotlib widget and not with QT Designer, hence the
reason for posting in this mailing list.

Does anyone have any thoughts regarding this?  Or can you point me to a
documentation set that shows how to do this?
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] axis order in matplotlib?

2011-02-22 Thread Chris Paola
Can anyone help me understand this: the code below produces a plot in 
which the x and y axis labels are reversed relative to the direction in 
which z varies on the plot, although the gradient arrows are correctly 
oriented. Is there something I've missed in understanding the sense of 
the x and y directions in mgrid, imshow, and gradient?

"""
x,y axes seem to be reversed
"""
import numpy as np

from matplotlib.pylab import *

dx = .25; dy = .25

xlen = 2.0; ylen = 2.0

x,y = np.mgrid[-xlen:xlen:dx, -ylen:ylen:dy] #also works with ogrid

z = x

hold(True)

imshow(z, origin='lower', extent=[-xlen,xlen,-ylen,ylen])

colorbar()

[u,v] = np.gradient(z)

u /= dx; v /= dy

QP = quiver(x,y,u,v,pivot='middle',color=[0.5,0.5,0.5])

quiverkey(QP, 0.85, 1.05, 1.0, '1 unit', labelpos='N')

xlabel('x')

ylabel('y')

title('slope')

show()





--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Plotting histogram with dictionary values

2011-02-22 Thread JamesTan12

Hi I have a list (Key values) with values I would like to plot to a
matplotlib histogram

[('a', 155), ('c', 73), ('b', 19), ('e', 260), ('d', 73), ('g', 42), ('f',
47), ('i', 175), ('h', 77), ('k', 7), ('j', 2), ('m', 76), ('l', 63), ('o',
174), ('n', 145), ('q', 3), ('p', 61), ('s', 153), ('r', 143), ('u', 50),
('t', 193), ('w', 19), ('v', 21), ('y', 55), ('x', 4), ('z', 4)]

Can anyone suggest how do I go about to plot it into a histogram with x-asix
being the key and y axis being the value.?
-- 
View this message in context: 
http://old.nabble.com/Plotting-histogram-with-dictionary-values-tp30959480p30959480.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] "ipython -pylab" fails but "from pylab import plot" works on mac?

2011-02-22 Thread Matthias Wong
Hi all,

It's exactly as said. I am using OS 10.6

If I use ipython -pylab and later try to plot anything, the GUI for plotting 
launches and I just get a beachball.

However, if I do ipython and then import plot, I can do a plot with no problem. 

I did a search but came up with nothing. I have this problem whether I use 
apple python or the python2.7 downloaded from python.org. 

I am new to the whole terminal/programming thing. As you can imagine, 
everything is very difficult. Any help is appreciated

God bless,
Matthias
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xscale and yscale

2011-02-22 Thread Alan G Isaac
On 2/22/2011 7:47 AM, Waléria Antunes David wrote:
> I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing.

Put it last, *after* all plotting.

And since you won't be able to see your green line,
don't plot it.

--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Building matplotlib py3k branch error

2011-02-22 Thread Michael Droettboom
First, the python3k branch is completely experimental and only about 10% 
complete.  If your expectation is to have something that just works, 
you'll want to wait a while.  We're hoping to hold a sprint next month 
to make some more progress on it.  If you're hoping to help us out with 
it, great!

You'll want to check out from the new git repository here:

https://github.com/matplotlib/matplotlib-py3



On 02/22/2011 03:52 AM, Markus1234 wrote:
> Hello everyone,
>
> I tried to build
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ with
> Python 3.1.3 and get the following error message (whole output in the
> attachement)
>
> In file included from CXX\IndirectPythonInterface.cxx:42:0:
> CXX\/Python3/IndirectPythonInterface.cxx: In function 'PyObject*
> Py::_Exc_MemoryErrorInst()':
> CXX\/Python3/IndirectPythonInterface.cxx:452:50: error:
> '::PyExc_MemoryErrorInst' has not been declared
> CXX\/Python3/IndirectPythonInterface.cxx:452:75: warning: control reaches
> end of non-void function
> error: command 'gcc' failed with exit status 1
What platform/compiler are you on?  I haven't seen this, but we've only 
worked the py3k branch on Linux so far.
> Also can anyone help me how to 'correctly' configure freetypes2. I
> downloaded and installed it and copied part of it from /Program
> Files/GnuWin32/src/freetype/2.3.5/freetype-2.3.5\/include to
> py3k/freetypes2/
> Is there a more elegant way to configure the setup correctly?
Normally, in Unixy land "make install" would install the headers to 
/usr/local/include and the matplotlib build would pick them up there.  
Not sure how things are supposed to work in the GnuWin32 environment, 
though.

Mike
> Best regards,
>
> Markus http://old.nabble.com/file/p30947414/output.txt output.txt


--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xscale and yscale

2011-02-22 Thread Waléria Antunes David
Daniel,

Thank you very muchthe yscale is correct now.this topic is
resolved...

Thanks

On Tue, Feb 22, 2011 at 10:26 AM, Daniel Mader <
danielstefanma...@googlemail.com> wrote:

> Hi Waléria,
>
> in order to test it and help you without spending too much time on it,
> could you please provide a stripped example which runs standalone?
>
> As a general rule you should set limits at the very end of the
> plotting code in order to prevent them from being superseded by
> another command!
>
> Thanks,
> Daniel
>
> 2011/2/22 Waléria Antunes David :
> > I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing.
> See
> > my code: http://pastebin.com/Jt3BTp0C (line 14)
> >
> > See my image generated - attached.
> >
> > thanks,
> >
> > On Tue, Feb 22, 2011 at 9:37 AM, Mike Kaufman  wrote:
> >>
> >> send me your data.
> >>
> >> M
> >>
> >> On 2/22/11 6:29 AM, Waléria Antunes David wrote:
> >>>
> >>> See this pdf attachedthe yscale has these values: 1, 10, 100, 1000
> >>> I need this. My code: http://pastebin.com/HKCGQWez
> >>> Can you help me, please??
> >>>
> >>> Thanks,
> >>>
> >>> On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root  >>> > wrote:
> >>>
> >>>
> >>>
> >>>On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David
> >>>mailto:waleriantu...@gmail.com>> wrote:
> >>>
> >>>Can you help me...please.
> >>>
> >>>On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David
> >>>mailto:waleriantu...@gmail.com>>
> wrote:
> >>>
> >>>I don't understand...i need that the yscale has these
> >>>values: 1,10,100,1000 But i don't know how...
> >>>
> >>>Thanks,
> >>>
> >>>
> >>>
> >>>Let me make it clearer.  Your green line has values on the order of
> >>>10^-17.  There is nothing that can be done to meet your request if
> >>>you are plotting data this small.  Either this data is wrong, or you
> >>>don't want to plot it at all.
> >>>
> >>>To exclude anything less than 1, use the following:
> >>>
> >>>ax.set_ylim(bottom=1)
> >>>
> >>>Note that this will exclude the green line in your plot!
> >>>
> >>>Ben Root
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> --
> >>> Index, Search&  Analyze Logs and other IT data in Real-Time with Splunk
> >>> Collect, index and harness all the fast moving IT data generated by
> your
> >>> applications, servers and devices whether physical, virtual or in the
> >>> cloud.
> >>> Deliver compliance at lower cost and gain new business insights.
> >>> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
> >>>
> >>>
> >>>
> >>> ___
> >>> Matplotlib-users mailing list
> >>> Matplotlib-users@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >>
> >
> >
> >
> --
> > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
> > Collect, index and harness all the fast moving IT data generated by your
> > applications, servers and devices whether physical, virtual or in the
> cloud.
> > Deliver compliance at lower cost and gain new business insights.
> > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xscale and yscale

2011-02-22 Thread Daniel Mader
Hi Waléria,

in order to test it and help you without spending too much time on it,
could you please provide a stripped example which runs standalone?

As a general rule you should set limits at the very end of the
plotting code in order to prevent them from being superseded by
another command!

Thanks,
Daniel

2011/2/22 Waléria Antunes David :
> I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing. See
> my code: http://pastebin.com/Jt3BTp0C (line 14)
>
> See my image generated - attached.
>
> thanks,
>
> On Tue, Feb 22, 2011 at 9:37 AM, Mike Kaufman  wrote:
>>
>> send me your data.
>>
>> M
>>
>> On 2/22/11 6:29 AM, Waléria Antunes David wrote:
>>>
>>> See this pdf attachedthe yscale has these values: 1, 10, 100, 1000
>>> I need this. My code: http://pastebin.com/HKCGQWez
>>> Can you help me, please??
>>>
>>> Thanks,
>>>
>>> On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root >> > wrote:
>>>
>>>
>>>
>>>    On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David
>>>    mailto:waleriantu...@gmail.com>> wrote:
>>>
>>>        Can you help me...please.
>>>
>>>        On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David
>>>        mailto:waleriantu...@gmail.com>> wrote:
>>>
>>>            I don't understand...i need that the yscale has these
>>>            values: 1,10,100,1000 But i don't know how...
>>>
>>>            Thanks,
>>>
>>>
>>>
>>>    Let me make it clearer.  Your green line has values on the order of
>>>    10^-17.  There is nothing that can be done to meet your request if
>>>    you are plotting data this small.  Either this data is wrong, or you
>>>    don't want to plot it at all.
>>>
>>>    To exclude anything less than 1, use the following:
>>>
>>>    ax.set_ylim(bottom=1)
>>>
>>>    Note that this will exclude the green line in your plot!
>>>
>>>    Ben Root
>>>
>>>
>>>
>>>
>>>
>>> --
>>> Index, Search&  Analyze Logs and other IT data in Real-Time with Splunk
>>> Collect, index and harness all the fast moving IT data generated by your
>>> applications, servers and devices whether physical, virtual or in the
>>> cloud.
>>> Deliver compliance at lower cost and gain new business insights.
>>> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
>>>
>>>
>>>
>>> ___
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
> --
> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
> Collect, index and harness all the fast moving IT data generated by your
> applications, servers and devices whether physical, virtual or in the cloud.
> Deliver compliance at lower cost and gain new business insights.
> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xscale and yscale

2011-02-22 Thread Waléria Antunes David
Do you want my complete code?

Thanks,

On Tue, Feb 22, 2011 at 10:17 AM, Mike Kaufman  wrote:

> Look, something about your dataset is most likely causing this problem.
> Send me the 5 data series you are using for this code, and I will attempt to
> reproduce the plot (and then show you how I did it).
>
> M
>
>
> On 2/22/11 7:47 AM, Waléria Antunes David wrote:
>
>> I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing.
>> See my code: http://pastebin.com/Jt3BTp0C (line 14)
>>
>> See my image generated - attached.
>>
>> thanks,
>>
>> On Tue, Feb 22, 2011 at 9:37 AM, Mike Kaufman > > wrote:
>>
>>send me your data.
>>
>>M
>>
>>
>>On 2/22/11 6:29 AM, Waléria Antunes David wrote:
>>
>>See this pdf attachedthe yscale has these values: 1, 10,
>>100, 1000
>>I need this. My code: http://pastebin.com/HKCGQWez
>>Can you help me, please??
>>
>>Thanks,
>>
>>On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root >
>>>> wrote:
>>
>>
>>
>>On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David
>>mailto:waleriantu...@gmail.com>
>>>
>>>> wrote:
>>
>>Can you help me...please.
>>
>>On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David
>>mailto:waleriantu...@gmail.com>
>>>
>>>> wrote:
>>
>>I don't understand...i need that the yscale has these
>>values: 1,10,100,1000 But i don't know how...
>>
>>Thanks,
>>
>>
>>
>>Let me make it clearer.  Your green line has values on the
>>order of
>>10^-17.  There is nothing that can be done to meet your
>>request if
>>you are plotting data this small.  Either this data is
>>wrong, or you
>>don't want to plot it at all.
>>
>>To exclude anything less than 1, use the following:
>>
>>ax.set_ylim(bottom=1)
>>
>>Note that this will exclude the green line in your plot!
>>
>>Ben Root
>>
>>
>>
>>
>>
>>  
>> --
>>Index, Search&  Analyze Logs and other IT data in Real-Time with
>>Splunk
>>Collect, index and harness all the fast moving IT data generated
>>by your
>>applications, servers and devices whether physical, virtual or
>>in the cloud.
>>Deliver compliance at lower cost and gain new business insights.
>>Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
>>
>>
>>
>>___
>>Matplotlib-users mailing list
>>Matplotlib-users@lists.sourceforge.net
>>
>>
>>https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>>
>>
>
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xscale and yscale

2011-02-22 Thread Waléria Antunes David
I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing. See
my code: http://pastebin.com/Jt3BTp0C (line 14)

See my image generated - attached.

thanks,

On Tue, Feb 22, 2011 at 9:37 AM, Mike Kaufman  wrote:

> send me your data.
>
> M
>
>
> On 2/22/11 6:29 AM, Waléria Antunes David wrote:
>
>> See this pdf attachedthe yscale has these values: 1, 10, 100, 1000
>> I need this. My code: http://pastebin.com/HKCGQWez
>> Can you help me, please??
>>
>> Thanks,
>>
>> On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root > > wrote:
>>
>>
>>
>>On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David
>>mailto:waleriantu...@gmail.com>> wrote:
>>
>>Can you help me...please.
>>
>>On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David
>>mailto:waleriantu...@gmail.com>> wrote:
>>
>>I don't understand...i need that the yscale has these
>>values: 1,10,100,1000 But i don't know how...
>>
>>Thanks,
>>
>>
>>
>>Let me make it clearer.  Your green line has values on the order of
>>10^-17.  There is nothing that can be done to meet your request if
>>you are plotting data this small.  Either this data is wrong, or you
>>don't want to plot it at all.
>>
>>To exclude anything less than 1, use the following:
>>
>>ax.set_ylim(bottom=1)
>>
>>Note that this will exclude the green line in your plot!
>>
>>Ben Root
>>
>>
>>
>>
>>
>> --
>> Index, Search&  Analyze Logs and other IT data in Real-Time with Splunk
>> Collect, index and harness all the fast moving IT data generated by your
>> applications, servers and devices whether physical, virtual or in the
>> cloud.
>> Deliver compliance at lower cost and gain new business insights.
>> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
>>
>>
>>
>> ___
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
<>--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Can't produce plots using Matplotlib

2011-02-22 Thread Thomas Lecocq

Can you provide us with your script ?
 
Thomas

**
Thomas Lecocq 
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**


 
> From: c...@ozemail.com.au
> Date: Tue, 22 Feb 2011 21:05:48 +1100
> To: matplotlib-users@lists.sourceforge.net
> Subject: [Matplotlib-users] Can't produce plots using Matplotlib
> 
> Recently I downloaded and installed Python(x,y) Version 2.6.5.6 running under 
> Windows7 and now can't produce the plots that my programs produced under an 
> earlier version of Python(x,y). The programs seem to run correctly and 
> produce the same numerical results but I can't find the graphical output (if 
> it exists).
> I presume that the problem isn caused by either an incorrect use of 
> Matplotlib, an installation issue or my simply misunderstanding the use of 
> Spyder.
> I would greatly appreciate some guidance on how to solve this problem.
> --
> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
> Collect, index and harness all the fast moving IT data generated by your 
> applications, servers and devices whether physical, virtual or in the cloud.
> Deliver compliance at lower cost and gain new business insights. 
> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  --
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] xscale and yscale

2011-02-22 Thread Waléria Antunes David
See this pdf attachedthe yscale has these values: 1, 10, 100, 1000 I
need this. My code: http://pastebin.com/HKCGQWez
Can you help me, please??

Thanks,

On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root  wrote:

>
>
> On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David <
> waleriantu...@gmail.com> wrote:
>
>> Can you help me...please.
>>
>> On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David <
>> waleriantu...@gmail.com> wrote:
>>
>>> I don't understand...i need that the yscale has these values:
>>> 1,10,100,1000 But i don't know how...
>>>
>>> Thanks,
>>>
>>>
>>>
> Let me make it clearer.  Your green line has values on the order of
> 10^-17.  There is nothing that can be done to meet your request if you are
> plotting data this small.  Either this data is wrong, or you don't want to
> plot it at all.
>
> To exclude anything less than 1, use the following:
>
> ax.set_ylim(bottom=1)
>
> Note that this will exclude the green line in your plot!
>
> Ben Root
>
>


v_graph.pdf
Description: Adobe PDF document
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Can't produce plots using Matplotlib

2011-02-22 Thread Chris Edwards
Recently I downloaded and installed Python(x,y) Version 2.6.5.6 running under 
Windows7 and now can't produce the plots that my programs produced under an 
earlier version of Python(x,y). The programs seem to run correctly and produce 
the same numerical results but I can't find the graphical output (if it exists).
I presume that the problem isn caused by either an incorrect use of Matplotlib, 
an installation issue or my simply misunderstanding the use of Spyder.
I would greatly appreciate some guidance on how to solve this problem.
--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] faq: reducing figure.figsize cuts off labels and tick marks

2011-02-22 Thread Daniel Mader
Hi,

there has been a similar question recently but I couldn't figure out
if or how this is solved:

I'd like to reduce the figure size so that I can add it to a LaTeX
document without scaling (PDF output with LaTeX font rendering). For
that, I need to adapt the font sizes, too.

Unfortunately, the canvas is not properly scaled so that the axis
labels and the possibly the tick marks are cut off.

Is this a bug, feature, design flaw? How can I properly work around
it, i.e. reduce the graph automatically for a given figsize/font size
combination so that everything fits on the figure?

An example follows to demonstrate, thanks in advance,
Daniel

import numpy,pylab,matplotlib.ticker as mtick

x = numpy.linspace(0,10,1000)
y = numpy.exp(x)

pylab.rcdefaults()

fig = pylab.figure()
ax = fig.add_subplot(111)
ax.set_yscale('log')
ax.yaxis.set_major_formatter(mtick.FormatStrFormatter('%d'))
ax.set_xlabel('asdf')
ax.set_ylabel('qwer')
ax.plot(x,y)
fig.savefig('example_mpl-ticker_1')

pylab.rcParams['figure.figsize'] = 5,3
pylab.rcParams['font.size'] = 12

fig = pylab.figure()
ax = fig.add_subplot(111)
ax.set_yscale('log')
ax.yaxis.set_major_formatter(mtick.FormatStrFormatter('%d'))
ax.set_xlabel('asdf')
ax.set_ylabel('qwer')
ax.plot(x,y)
fig.savefig('example_mpl-ticker_2')

--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Building matplotlib py3k branch error

2011-02-22 Thread Markus1234

Hello everyone,

I tried to build
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ with
Python 3.1.3 and get the following error message (whole output in the
attachement)

In file included from CXX\IndirectPythonInterface.cxx:42:0:
CXX\/Python3/IndirectPythonInterface.cxx: In function 'PyObject*
Py::_Exc_MemoryErrorInst()':
CXX\/Python3/IndirectPythonInterface.cxx:452:50: error:
'::PyExc_MemoryErrorInst' has not been declared
CXX\/Python3/IndirectPythonInterface.cxx:452:75: warning: control reaches
end of non-void function
error: command 'gcc' failed with exit status 1

Also can anyone help me how to 'correctly' configure freetypes2. I
downloaded and installed it and copied part of it from /Program
Files/GnuWin32/src/freetype/2.3.5/freetype-2.3.5\/include to
py3k/freetypes2/
Is there a more elegant way to configure the setup correctly?

Best regards,

Markus http://old.nabble.com/file/p30947414/output.txt output.txt 
-- 
View this message in context: 
http://old.nabble.com/Building-matplotlib-py3k-branch-error-tp30947414p30947414.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using contourf to plot masked array

2011-02-22 Thread Eric Firing
On 02/21/2011 07:27 PM, Zhaoru Zhang wrote:
> Hi,
>
>I tried to use contourf to plot an array in which the land values have 
> been masked. However, I found that contourf did not deal with the masking 
> properly. I would expect the masked region to be bounded by the separation 
> line of land and sea, but it actually exceeds that line. I also tried with 
> pcolor and this time the masking is handled correctly. Could anybody tell me 
> what is the right way to use contourf for plotting masked arrays? Thanks!
>

What mpl version are you using?  For a long time there was a deep-seated 
bug in handling masked regions, but about a year ago Ian Thomas fixed it.

Eric


> Zhaoru
> --
> Index, Search&  Analyze Logs and other IT data in Real-Time with Splunk
> Collect, index and harness all the fast moving IT data generated by your
> applications, servers and devices whether physical, virtual or in the cloud.
> Deliver compliance at lower cost and gain new business insights.
> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk 
Collect, index and harness all the fast moving IT data generated by your 
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights. 
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users