[Matplotlib-users] Student sponsorship for the SciPy08 conference

2008-06-26 Thread Gael Varoquaux
We are delighted to announce that the Python Software Foundation has
answered our call and is providing sponsoring to the SciPy08 conference.

We will use this money to sponsor the registration fees and travel for up
to 10 college or graduate students to attend the conference. The PSF did
not provide all the founds required for all 10 students and once again
Enthought Inc. (http://www.enthought.com) is stepping up to fill in.

To apply, please send a short description of what you are studying and
why you’d like to attend to [EMAIL PROTECTED] Please include telephone
contact information.

Thanks a lot to Travis Vaught from Enthought for bringing this project to
a success.

Please don't hesitate to forward this announcement to anybody who might
be interested.

Gaël, on behalf of the Scipy08 organisation committee

SciPy coneference site:   http://conference.scipy.org

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Linking non framework Tcl/Tk on Mac OS X

2008-06-26 Thread Adam Mercer
Hi

I'm trying to track down a problem present in MacPorts Matplotlib
build and the TkAgg backend. It appears that Matplotlib is linking
against the system Tcl/Tk in /System/Library/Frameworks and not the
non-framework Tcl/Tk installed by MacPorts, as to be expected this is
causing segfaults when trying to use the TkAgg backend as the system
version of Tcl/Tk differs from the MacPorts version.

I've tried removing the list of directories to search for the
framework in setupext.py in the add_tk_flags() method, ie I've set
framework_dirs = [], and then set the paths to the Tcl/Tk header and
libraries in the hardcoded_tcl_config() method to point to the
MacPorts versions but this just leads to the build not being able to
find Tcl/Tk and therefore not building the TkAgg backend, the
following is displayed on build:

   Tkinter: no
* Tkinter present, but header files are not found.
* You may need to install development packages.

The header files are installed. Can Matplotlib be linked against a
non-framework build of Tcl/Tk on Mac OS X, and if so how?

Cheers

Adam

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib have "point in a polygon" test?

2008-06-26 Thread David Goldsmith
Excellent, thanks!  Just reinforces my belief that in Python, if you need to do 
something, chances are the Python tool for it already exists in the Public 
Domain!  I love Python!

DG

--- On Thu, 6/26/08, David Warde-Farley <[EMAIL PROTECTED]> wrote:

> From: David Warde-Farley <[EMAIL PROTECTED]>
> Subject: Re: [Matplotlib-users] matplotlib have "point in a polygon" test?
> To: [EMAIL PROTECTED]
> Cc: matplotlib-users@lists.sourceforge.net
> Date: Thursday, June 26, 2008, 8:46 PM
> On 26-Jun-08, at 11:37 PM, David Goldsmith wrote:
> 
> > Hi!  Does matplotlib have already implemented a method
> to return  
> > true/false according as a provided point is inside a
> provided  
> > polygon?  Thanks!
> 
> In [15]: help matplotlib.nxutils
> ---> help(matplotlib.nxutils)
> Help on module matplotlib.nxutils in matplotlib:
> 
> NAME
>  matplotlib.nxutils - general purpose utilities
> (numpy).
> 
> FILE
> 
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
> 
> site-package
> s/matplotlib/nxutils.so
> 
> FUNCTIONS
>  pnpoly(...)
>  inside = pnpoly(x, y, xyverts)
>  return 1 if x,y is inside the polygon defined by
> the sequence  
> of x,y ver
> tices in xyverts
> 
>  points_inside_poly(...)
>  mask = points_inside_poly(xypoints, xyverts)
>  return a mask of length xypoints indicating
> whether each x,y  
> point is in
> side the polygon defined by the sequence of x,y vertices in
> xyverts
> 
> If you're interested in the algorithm:
>   
> http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html
> 
> 
> Regards,
> 
> David


  

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] matplotlib have "point in a polygon" test?

2008-06-26 Thread David Warde-Farley

On 26-Jun-08, at 11:37 PM, David Goldsmith wrote:

> Hi!  Does matplotlib have already implemented a method to return  
> true/false according as a provided point is inside a provided  
> polygon?  Thanks!

In [15]: help matplotlib.nxutils
---> help(matplotlib.nxutils)
Help on module matplotlib.nxutils in matplotlib:

NAME
 matplotlib.nxutils - general purpose utilities (numpy).

FILE
 /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/ 
site-package
s/matplotlib/nxutils.so

FUNCTIONS
 pnpoly(...)
 inside = pnpoly(x, y, xyverts)
 return 1 if x,y is inside the polygon defined by the sequence  
of x,y ver
tices in xyverts

 points_inside_poly(...)
 mask = points_inside_poly(xypoints, xyverts)
 return a mask of length xypoints indicating whether each x,y  
point is in
side the polygon defined by the sequence of x,y vertices in xyverts

If you're interested in the algorithm:

http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html


Regards,

David

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] matplotlib have "point in a polygon" test?

2008-06-26 Thread David Goldsmith
Hi!  Does matplotlib have already implemented a method to return true/false 
according as a provided point is inside a provided polygon?  Thanks!

DG


  

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] alpha blending with vector graphics

2008-06-26 Thread John Hunter
On Thu, Jun 26, 2008 at 8:26 PM, Sasha Gutfraind <[EMAIL PROTECTED]> wrote:

> pylab.scatter([1],[1],s=1000,c='g',alpha=1.0)
> pylab.scatter([1],[1],s=10,c='b',alpha=0.2)
> pylab.scatter([1],[1],s=100,c='r',alpha=0.5)
> pylab.savefig('foo.svg')
>
>
> I suspect a bug (my MPL version is '0.98pre'):
> Using a text editor to manually change the svg file, replacing
> "opacity: 1.0" with "opacity: 0.5" fixes the problem.

I recently fixed an alpha bug in pdf and svg that affected scatter in
svn r5630, so if you upgrade to either the latest svn HEAD or the
source release of 0.98.2 (binary builds not yet available), you'll
likely find this bug fixed.

JDH

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] alpha blending with vector graphics

2008-06-26 Thread Sasha Gutfraind
I'm trying to produce a vector graphics image with alpha blending, however,
the two backends I tried do not work.
Specifically, the image has the right blending when doing pylab.show(), but
savefig() produces an opaque output.

Here is sample code (for the SVG backend.  PDF backend has the same
problem):

import matplotlib
matplotlib.use('SVG')
import matplotlib.pylab as pylab

pylab.scatter([1],[1],s=1000,c='g',alpha=1.0)
pylab.scatter([1],[1],s=10,c='b',alpha=0.2)
pylab.scatter([1],[1],s=100,c='r',alpha=0.5)
pylab.savefig('foo.svg')


I suspect a bug (my MPL version is '0.98pre'):
Using a text editor to manually change the svg file, replacing
"opacity: 1.0" with "opacity: 0.5" fixes the problem.

Thanks,
-sasha.
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plot3d

2008-06-26 Thread John Hunter
On Thu, Jun 26, 2008 at 11:31 AM, Ben Axelrod <[EMAIL PROTECTED]> wrote:
> I am new to MatPlotLib and I saw in the archives that 3d plotting is no
> longer supported in version 0.98.  This seems like a major feature drop to
> me.

> I would really like to use this feature.  Does anyone know what must be done
> to get this working again?

Michael did a significant rewrite of our transformation infrastructure
in 0.98.  This was long overdue and helps us support 2D plotting
better -- eg user extensible projections -- and results in cleaner
code.  None of the developers thus far have taken 3d plotting under
their wing to support it.  The implementation, while extremely clever,
is slow and has some zorder problems, so we haven't fully embraced it,
though we have said for a long time we would like some minimum level
of 3D support that works out of the box.

Michael did a lot of work to make the transformation code mostly
compatible at the API level, and included some untested place holders
for higher dimensional data structures, but their are differences
which are detailed in the migration document in the source directory.
Since the 3d coding naturally uses a lot of transformations, someone
would have to do the work to port these calls to the new API, *and*
agree to support it going forward for us to reinclude it.

JDH

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plot3d

2008-06-26 Thread Ben Axelrod
I am new to MatPlotLib and I saw in the archives that 3d plotting is no longer 
supported in version 0.98.  This seems like a major feature drop to me.

I would really like to use this feature.  Does anyone know what must be done to 
get this working again?

Thanks,
-Ben
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] R: Bug: mad interference between matplotlib and openbabel

2008-06-26 Thread Florian Koelling
Yip! I updated my code to "pylab.plot()" and so on.

Currently I use the following versions:

* the actual  matplotlib  0.98 - the old 0.87.7 (installed via synaptics
had a memory leak)
* the  stable openbabel release 2.1.1 (beta available...)
*numpy 1.1.0 (actual version; compiled from source)
*python 2.5.1

I am working on ubuntu linux 7.04 (feisty fawn)  - and I do not use IDLE
or anything like that



Greets,

Flo



Massimo Sandal wrote:
>> Da: [EMAIL PROTECTED] per conto di Florian Koelling
>> Inviato: gio 26/06/2008 14.04
>> A: Darren Dale; matplotlib-users@lists.sourceforge.net
>> Oggetto: Re: [Matplotlib-users] Bug: mad interference between matplotlib and 
>> openbabel
>> 
>  
>   
>> Thanks for your fast replies! As suggested I removed all "from import*"
>> statements. I used "import pylab" and "import pylab as p" statements but
>> it do s not work either. :-@
>> 
>
> What errors are you getting?
>
> Have you updated accordingly your calls to pylab functions? (e.g. did you 
> update "plot()" with "pylab.plot()" when you used "import pylab")?
>
> m.
>   


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug: mad interference between matplotlib and openbabel

2008-06-26 Thread John Hunter
On Thu, Jun 26, 2008 at 7:04 AM, Florian Koelling
<[EMAIL PROTECTED]> wrote:
> Thanks for your fast replies! As suggested I removed all "from import*"
> statements. I used "import pylab" and "import pylab as p" statements but
> it do s not work either. :-@

It was a good guess.  You have a software version conflict apparently,
and yet you haven't provided us any version numbers of the packages
you are using -- that makes it pretty hard to progress.  One thing I
notice is that you import Numeric, which is the predecessor to numpy.
All recent versions of matplotlib/pylab import numpy by default,
though some older versions can be configured to use Numeric, numarray
or numpy using a numerix setting.  It is possible that you are seeing
a Numeric/numpy conflict somewhere.  I am not sure what openbabel and
pybel are doing internally vis-a-vis numpy/numeric, though I do see
that there are some problems passing numpy scalars to openbabel at
http://openbabel.org/wiki/Python.

> Could you recommend other "easy to handle " python plotting libs?

chaco is quite nice - http://code.enthought.com/chaco.

But we would like to sort out this problem for future reference, so if
you'd be willing to stick with it and help us figure out where the
conflict is coming from, it will help the future users.  My first
suggestion is to see if you need Numeric, or if numpy will suffice,
and make sure you are using it consistently throughout.  My second
suggestion is to figure out of there are any gui toolkits in the
openbabel chain, and if so make sure your backend setting in
matplotlib is consistent with them (though the gui mainloop will not
be triggered by simply importing pylab, you must also call pylab.show,
so I don't know why that would cause a problem per se).

In any follow-up emails, please post the versions of all software you
are importing.  One could way to get the matplotlib version info is to
create a simple script::

  import pylab
  pylab.plot([1,2,3])
  pylab.show()

and run it with::

  > python myscript.py --verbose-helpful

and post the output here.

JDH

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] histogram hatching

2008-06-26 Thread Michael Droettboom
Thanks for pointing this out.  This is now fixed in SVN.

Cheers,
Mike

izak marais wrote:
> The vertical and horizontal  hatch styles are swapped. According to 
> the docs:
>  |  - vertical
>  -  - horizontal
> but '|' gives horizontal and '-' vertical patterns. The reaming styles 
> appear to work correctly.
>
>
> - Original Message 
> From: John Hunter <[EMAIL PROTECTED]>
> To: izak marais <[EMAIL PROTECTED]>
> Cc: matplotlib-users@lists.sourceforge.net
> Sent: Wednesday, June 25, 2008 3:49:56 PM
> Subject: Re: [Matplotlib-users] histogram hatching
>
> On Wed, Jun 25, 2008 at 6:05 AM, izak marais <[EMAIL PROTECTED] 
> > wrote:
> > Hi,
> >
> > I see there is a "hatch: unknown" kwarg mentioned in the hist()
> > documentation. Can anyone shed some light on how to use this please? I
> > assume it might be used to generate monochrome rectangles with
> > differentiating hatched fills?
>
> The rectangles generates by "hist" are matplotlib.patch.Rectangle
> instances, and the "hatch" property is controlled by the "set_hatch"
> method.  Here is the docstring which should tell you most everything
> you need to know.  Note the caveat at the end that it is only
> currently supported on postscript -- patches for other backends much
> obliged
>
> def set_hatch(self, h):
> """
> Set the hatching pattern
>
> hatch can be one of::
>
>   /  - diagonal hatching
>   \  - back diagonal
>   |  - vertical
>   -  - horizontal
>   #  - crossed
>   x  - crossed diagonal
>
> Letters can be combined, in which case all the specified
> hatchings are done.  If same letter repeats, it increases the
> density of hatching in that direction.
>
> CURRENT LIMITATIONS:
>
> 1. Hatching is supported in the PostScript backend only.
>
> 2. Hatching is done with solid black lines of width 0.
>
>
>
> 
>
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> 
>
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug: mad interference between matplotlib and openbabel

2008-06-26 Thread Florian Koelling
Thanks for your fast replies! As suggested I removed all "from import*"
statements. I used "import pylab" and "import pylab as p" statements but
it do s not work either. :-@

Could you recommend other "easy to handle " python plotting libs?

Thanx!



Darren Dale wrote:
>
>
> On Thu, Jun 26, 2008 at 5:51 AM, Florian Koelling
> <[EMAIL PROTECTED] > wrote:
>
> Hi folks!
>
> I' m working on a code to identify ligand's information from pdb
> crystal
> structures. For this purpose I use the openbabel package. I' m
> encoding
> the ligand's information  in smarts.
> For  checking  if the smarts are assigned correctly I 'm writing a sdf
> file (to control whether the features are placed correctly).
>
> This part works fine - but I get into deep trouble when I try to plot
> simple count statistics of my smarts, when I use the "from pylab
> import*" , or "from pylab import matplotlib" statements (trouble
> appears
> just after IMPORTING - I do not use a pylab function in this state of
> the program yet):
>
>
> Avoid all use of "from package import *". When you import *, strange
> things can happen, since one import can overwrite things from a
> previous import. Try "import pylab" or "import pylab as plt", that way
> all the pylab functionality remains in its own namespace and cant be
> overwritten, and can't overwrite anything else. Finally, "from pylab
> import matplotlib" won't work, matplotlib is a top-level package.


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug: mad interference between matplotlib and openbabel

2008-06-26 Thread Manuel Metz
Hi Florian,
   you should try "import pylab" or "import pylab as P". "from pylab 
import *" might overwrite some functions or methods ... if a pylab 
function/method has the same name as one in a module imported with * before.

See the following example:

#file a.py
def foo():
 print "I'm a"

# file b.py
def foo():
 print "I'm b"

# file import_ab.py
from a import *
foo()
from b import *
foo()

The output is:
I'm a
I'm b

as the function foo() is overwritten by the second import...

Manuel


Florian Koelling wrote:
> Hi folks!
> 
> I' m working on a code to identify ligand's information from pdb crystal
> structures. For this purpose I use the openbabel package. I' m encoding
> the ligand's information  in smarts.
> For  checking  if the smarts are assigned correctly I 'm writing a sdf
> file (to control whether the features are placed correctly).
> 
> This part works fine - but I get into deep trouble when I try to plot
> simple count statistics of my smarts, when I use the "from pylab
> import*" , or "from pylab import matplotlib" statements (trouble appears
> just after IMPORTING - I do not use a pylab function in this state of
> the program yet):
>  
> Smart features are not recognized anymore, the feature coordinates are 
> shifted and  so  on -  But  I don' t know why.
> 
> my code snip:
> 
> 
> 
> 
> import os
> from numpy import*
> from time import*
> 
>  SMARTING
> import numpy
> 
> import openbabel
> from openbabel import*
> import pybel
> from pybel import*   
> 
>  LIGAND DETECTION
> import Bio.PDB
> from Bio.PDB import*
> import Numeric
> from Bio.PDB.StructureBuilder import *
> 
> 
> #from pylab import* --> RAISES THE PROBLEMS 
>  
> 
> def projecting_smarts(isolated_ligand, method ,color, output):
>
>
>  Bio PDB-> 2 get ligand coords
> parser =PDBParser()
>
> structure = parser.get_structure('s', isolated_ligand)
> atom = structure.get_atoms()   
> ###
> 
> 
> print "smarting successfully started!"
>
> mol = readfile("pdb", isolated_ligand).next()
> 
>
> smart_list= []   
>
> result_acceptor = method.findall(mol)#finds acceptors
>
>
> for i in result_acceptor:#Result
> Donor= list from tuples
> list_element1 = (list(i)[0]) # -> 
> resolve hierarchy
> smart_list.append(list_element1)
>
> print smart_list,"ACCEPTOR_LIST" #list of smart features
> 
> 
> 
> 
> Maybe one of you might know what to do!
> 
> Thanx alot!
> 
> flo
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Bug: mad interference between matplotlib and openbabel

2008-06-26 Thread Florian Koelling
Hi folks!

I' m working on a code to identify ligand's information from pdb crystal
structures. For this purpose I use the openbabel package. I' m encoding
the ligand's information  in smarts.
For  checking  if the smarts are assigned correctly I 'm writing a sdf
file (to control whether the features are placed correctly).

This part works fine - but I get into deep trouble when I try to plot
simple count statistics of my smarts, when I use the "from pylab
import*" , or "from pylab import matplotlib" statements (trouble appears
just after IMPORTING - I do not use a pylab function in this state of
the program yet):
 
Smart features are not recognized anymore, the feature coordinates are 
shifted and  so  on -  But  I don' t know why.

my code snip:




import os
from numpy import*
from time import*

 SMARTING
import numpy

import openbabel
from openbabel import*
import pybel
from pybel import*   

 LIGAND DETECTION
import Bio.PDB
from Bio.PDB import*
import Numeric
from Bio.PDB.StructureBuilder import *


#from pylab import* --> RAISES THE PROBLEMS 
 

def projecting_smarts(isolated_ligand, method ,color, output):
   
   
 Bio PDB-> 2 get ligand coords
parser =PDBParser()
   
structure = parser.get_structure('s', isolated_ligand)
atom = structure.get_atoms()   
###


print "smarting successfully started!"
   
mol = readfile("pdb", isolated_ligand).next()

   
smart_list= []   
   
result_acceptor = method.findall(mol)#finds acceptors
   
   
for i in result_acceptor:#Result
Donor= list from tuples
list_element1 = (list(i)[0]) # -> 
resolve hierarchy
smart_list.append(list_element1)
   
print smart_list,"ACCEPTOR_LIST" #list of smart features




Maybe one of you might know what to do!

Thanx alot!

flo























-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] histogram hatching

2008-06-26 Thread izak marais
The vertical and horizontal  hatch styles are swapped. According to the docs:
 |   - vertical
 -   - horizontal
but '|' gives horizontal and '-' vertical patterns. The reaming styles appear 
to work correctly.




- Original Message 
From: John Hunter <[EMAIL PROTECTED]>
To: izak marais <[EMAIL PROTECTED]>
Cc: matplotlib-users@lists.sourceforge.net
Sent: Wednesday, June 25, 2008 3:49:56 PM
Subject: Re: [Matplotlib-users] histogram hatching

On Wed, Jun 25, 2008 at 6:05 AM, izak marais <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I see there is a "hatch: unknown" kwarg mentioned in the hist()
> documentation. Can anyone shed some light on how to use this please? I
> assume it might be used to generate monochrome rectangles with
> differentiating hatched fills?

The rectangles generates by "hist" are matplotlib.patch.Rectangle
instances, and the "hatch" property is controlled by the "set_hatch"
method.  Here is the docstring which should tell you most everything
you need to know.  Note the caveat at the end that it is only
currently supported on postscript -- patches for other backends much
obliged

def set_hatch(self, h):
"""
Set the hatching pattern

hatch can be one of::

  /   - diagonal hatching
  \   - back diagonal
  |   - vertical
  -   - horizontal
  #   - crossed
  x   - crossed diagonal

Letters can be combined, in which case all the specified
hatchings are done.  If same letter repeats, it increases the
density of hatching in that direction.

CURRENT LIMITATIONS:

1. Hatching is supported in the PostScript backend only.

2. Hatching is done with solid black lines of width 0.


  -
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] plot() linewidth parameter behaviour

2008-06-26 Thread David Warde-Farley
On 26-Jun-08, at 4:13 AM, David Warde-Farley wrote:

> Hi all,
>
> I'm making multiple calls to the plot() command, actually plotting
> parallel horizontal lines, and using a consistent 'linewidth'
> parameter, but for some reason I get different line widths each time
> (or the same for a couple). I assumed it was some sort of wonky
> behaviour caused by antialiasing, but aa=False doesn't help.  Can
> anyone tell me why this might be happening?

It was my own fault, I had set ylim to be the location of the first  
and last lines respectively and thus the thicker lines were getting  
clipped. Please disregard the last message. :)

David

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] plot() linewidth parameter behaviour

2008-06-26 Thread David Warde-Farley
Hi all,

I'm making multiple calls to the plot() command, actually plotting  
parallel horizontal lines, and using a consistent 'linewidth'  
parameter, but for some reason I get different line widths each time  
(or the same for a couple). I assumed it was some sort of wonky  
behaviour caused by antialiasing, but aa=False doesn't help.  Can  
anyone tell me why this might be happening?

David

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] getting scatter x-data?

2008-06-26 Thread Paul Hartley
When I draw a Line2D instance (using plot()), I have set up an interactive
way of clicking on one of the points to return the x-coordinate of the
point.  There might be a simpler way to do it, but the way I figured out is:

def on_pick(self, event):  # called when clicking on a Line2D point
return [event.artist.get_xdata()[pt].data[0] for pt in
event.artist.contains(event.mouseevent)[1].values()]

my basic interpretation is that I get the point index in the line and then
get the xcoord for that point.

It would be nice to get the xcoord for a scatter point as well, but I
haven't had luck figuring that one out.  I can do
event.artist.contains(event.mouseevent) to get the index for the
scatterpoint, but apparently there's no get_xdata() tied to the
regularpolygon instance.

paul
-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users