SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S
1
(1)
2
(43)
3
(17)
4
(12)
5
(9)
6
(14)
7
(8)
8
9
(15)
10
(16)
11
(11)
12
(10)
13
(20)
14
(7)
15
(4)
16
(16)
17
(25)
18
(10)
19
(27)
20
(26)
21
(6)
22
(20)
23
(12)
24
(15)
25
(22)
26
(15)
27
(43)
28
(8)
29
(6)
30
(12)





Showing results of 446

<< < 1 2 3 4 5 .. 18 > >> (Page 3 of 18)
From: Michael H. <mh...@us...> - 2008年06月27日 16:08:25
Attachments: wiki_example.py
I noticed a problem with colors in rendered encapsulated postscript 
files, and fortunately I was able to replicate with a modified version 
of one of Jeff Whitaker's example scripts, which I have attached. The 
EPS version of the plot has black contour lines where they are colored 
in the PNG file, at least on a Mac OSX machine.
Is there a work-around for this? I haven't tested to see if it is 
limited to contour plots, or to Mac installations...
Thanks,
Mike
-- 
------------------------------------------------------
Michael Hearne
mh...@us...
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
------------------------------------------------------
From: Nicolas R. <Nic...@lo...> - 2008年06月27日 13:40:24
Thanks. I've stumbled across "reinteract" and found that the inline plot
has been done using the previous version of the pylab console
(http://blog.fishsoup.net/2007/11/10/reinteract-better-interactive-python/)
Concerning ipython, I've once designed the code to integrate it but
since then I got a bit lost with the future new version of ipython
(ipython1). I will try to look again.
Nicolas
On Fri, 2008年06月27日 at 09:29 -0400, Michael Droettboom wrote:
> Very nice. I like the idea of inline plots -- less of an interrupted flow.
> 
> Have you looked at the similar project "reinteract"? 
> (www.reinteract.org) It's a little more aggressively different, for 
> what it's worth. The author seems to have lost steam in the last few 
> months, but it has some interesting ideas.
> 
> It would be neat to integrate ipython, rather than just the standard 
> python shell, into your console to get autocompletion, fancier help 
> etc. I think the combination could be great.
> 
> Thanks for sharing this, and keep us updated!
> 
> Cheers,
> Mike
> 
> Nicolas Rougier wrote:
> > Hi all, 
> >
> > I've developed a GTK/Python/Pylab console that is able to display
> > most matplotlib figures directly within the console and handle
> > matplotlib mouse events properly.
> >
> >
> > Screenshots and sources are available at:
> > http://www.loria.fr/~rougier/pylab.html
> >
> >
> > I've tested several examples from matplotlib examples and they
> > seem to be displayed properly. Any comments/requests are welcome.
> >
> >
> > Nicolas Rougier.
> >
> >
> > -------------------------------------------------------------------------
> > 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
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> > 
> 
From: Michael D. <md...@st...> - 2008年06月27日 13:29:22
Very nice. I like the idea of inline plots -- less of an interrupted flow.
Have you looked at the similar project "reinteract"? 
(www.reinteract.org) It's a little more aggressively different, for 
what it's worth. The author seems to have lost steam in the last few 
months, but it has some interesting ideas.
It would be neat to integrate ipython, rather than just the standard 
python shell, into your console to get autocompletion, fancier help 
etc. I think the combination could be great.
Thanks for sharing this, and keep us updated!
Cheers,
Mike
Nicolas Rougier wrote:
> Hi all, 
>
> I've developed a GTK/Python/Pylab console that is able to display
> most matplotlib figures directly within the console and handle
> matplotlib mouse events properly.
>
>
> Screenshots and sources are available at:
> http://www.loria.fr/~rougier/pylab.html
>
>
> I've tested several examples from matplotlib examples and they
> seem to be displayed properly. Any comments/requests are welcome.
>
>
> Nicolas Rougier.
>
>
> -------------------------------------------------------------------------
> 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
> Mat...@li...
> 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
From: George N. <gn...@go...> - 2008年06月27日 13:05:07
Works OK with WXAgg, but with latest svn, r5683, OS X 10.5.3, Qt4Agg
backend, dvipnghack: True, text.usetex : True
running from ipython -pylab:
plot([1,2,3])
savefig('123_2.pdf')
gives..
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (439, 0))
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (239, 0))
[skip]
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/dviread.pyc
in find_tex_file(filename, format)
 745 pipe = os.popen(cmd, 'r')
 746 print 'cmd=',cmd
--> 747 result = pipe.readline().rstrip()
 748 pipe.close()
 749
IOError: [Errno 4] Interrupted system call
Similarly, running trunk/matplotlib/examples/tex_demo.py fails if I
modify line 32 to savefig('tex_demo.pdf')
error is:
 File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/dviread.py",
line 746, in find_tex_file
 result = pipe.readline().rstrip()
IOError: [Errno 4] Interrupted system call
here line 745 is
 pipe = os.popen(cmd, 'r')
with cmd "kpsewhich 'ptmr8r.vf'"
The file ptmr8r.vf does not exist on the TeX distribution (TeXLive 2007), so
pipe.readline().rstrip() gives '' when run from the ipdb command
prompt in ipython.
However, trunk/matplotlib/examples/tex_demo.py is OK with the wxAgg
backend, although "kpsewhich 'ptmr8r.vf'" is still one of the cmd
used as args for
 pipe = os.popen(cmd, 'r')
 result = pipe.readline().rstrip()
From: Nicolas R. <Nic...@lo...> - 2008年06月27日 13:04:10
Hi all, 
I've developed a GTK/Python/Pylab console that is able to display
most matplotlib figures directly within the console and handle
matplotlib mouse events properly.
Screenshots and sources are available at:
http://www.loria.fr/~rougier/pylab.html
I've tested several examples from matplotlib examples and they
seem to be displayed properly. Any comments/requests are welcome.
Nicolas Rougier.
From: Andrea G. <and...@gm...> - 2008年06月27日 12:53:33
---------- Forwarded message ----------
From: Andrea Gavana <and...@gm...>
Date: Jun 27, 2008 1:53 PM
Subject: Re: [Matplotlib-users] offset_copy in transforms.py... Gone?
To: Michael Droettboom <md...@st...>
Hi Michael,
On 6/27/08, Michael Droettboom wrote:
> Yes, this is one of the casualties of the transforms refactoring in 0.98.
> The new transformation framework is documented here:
>
> http://matplotlib.sourceforge.net/doc/html/devel/transformations.html
>
> Most of the changes from 0.91 to 0.98 are documented here:
>
> http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/API_CHANGES?view=markup
>
> ...but it seems offset_copy was overlooked (probably because no code
> internal to matplotlib was using it.)
>
> You can do something like this to simulate offset_copy:
>
> return ax.transData + transforms.Affine2D().translate(x,
> y)
>
> Let me know if that works in your context. If not, I'm glad to help.
Thank you for the quick answer. I did some quick testing and
everything seems to work perfectly. Thank you again.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
-- 
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
From: Michael D. <md...@st...> - 2008年06月27日 12:27:03
Andrea Gavana wrote:
> Hi All,
>
> I have switched from matplotlib 0.91.2 to 0.98.1, and I have
> noticed a couple of "strange" behaviours (I am not using PyLab, but
> matplotlib embedded in wxPython):
>
> 1) If I use:
>
> ylims = self.myAxis.get_ylim()
>
> And then I add other lines to the plot, the value of ylims is
> modified. It gets modified even if I use something like this:
>
> ylims = self.myAxis.get_ylim()[:]
>
> The only way of keeping the ylims list untouched by other plotting
> commands I have to do this:
>
> ylims = copy.deepcopy(self.leftaxis.get_ylim())
>
> Which is a bit of an overkill. See the attached Python script for an
> example. This did not happen before in 0.91.2.
> 
That is the intended behavior and is preferred in many cases. Most of 
the transformations and dimensions are now stored in numpy arrays that 
are mutable and updated in place. Since these are numpy arrays, you 
could also do:
 ylims = self.leftaxis.get_ylim().copy()
which is a bit less typing.
Sorry about the change. I will note it in the API_CHANGES document.
> 2) The dashed text positioning is wrong, you can see it by running
> dashpointlabel.py in the
> matplotlib_examples_0.98.1\examples\pylab_examples: the position of
> the values should be at the other end of the dash, not over the
> plotted point.
> 
Yes, you're right. That is a bug. I will look into this.
Cheers,
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Michael D. <md...@st...> - 2008年06月27日 12:20:47
Yes, this is one of the casualties of the transforms refactoring in 
0.98. The new transformation framework is documented here:
http://matplotlib.sourceforge.net/doc/html/devel/transformations.html
Most of the changes from 0.91 to 0.98 are documented here:
http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/API_CHANGES?view=markup
...but it seems offset_copy was overlooked (probably because no code 
internal to matplotlib was using it.)
You can do something like this to simulate offset_copy:
 return ax.transData + transforms.Affine2D().translate(x, y)
Let me know if that works in your context. If not, I'm glad to help.
Cheers,
Mike
Andrea Gavana wrote:
> Hi All,
>
> I have upgraded matplotlib from an old version I was using
> (0.91.2) to the very latest one (0.98.1). In one of my applications, I
> am using this code:
>
> from matplotlib.transforms import offset_copy
>
> def offset(ax, x, y):
> return offset_copy(ax.transData, x=x, y=y, units='dots')
>
> Right now I get:
>
> Traceback (most recent call last):
> File "E:\MyProjects\SimKill\SimKill.py", line 9, in <module>
> from PlotPage import PlotPage
> File "E:\MyProjects\SimKill\PlotPage.py", line 11, in <module>
> from matplotlib.transforms import offset_copy
> ImportError: cannot import name offset_copy
>
> Is offset_copy gone? How can I modify my code to get back the original
> behaviour?
>
> Thank you for your suggestions.
>
> Andrea.
>
> "Imagination Is The Only Weapon In The War Against Reality."
> http://xoomer.alice.it/infinity77/
>
> -------------------------------------------------------------------------
> 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
> Mat...@li...
> 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
From: Andrea G. <and...@gm...> - 2008年06月27日 11:37:04
Hi All,
 I have switched from matplotlib 0.91.2 to 0.98.1, and I have
noticed a couple of "strange" behaviours (I am not using PyLab, but
matplotlib embedded in wxPython):
1) If I use:
ylims = self.myAxis.get_ylim()
And then I add other lines to the plot, the value of ylims is
modified. It gets modified even if I use something like this:
ylims = self.myAxis.get_ylim()[:]
The only way of keeping the ylims list untouched by other plotting
commands I have to do this:
ylims = copy.deepcopy(self.leftaxis.get_ylim())
Which is a bit of an overkill. See the attached Python script for an
example. This did not happen before in 0.91.2.
2) The dashed text positioning is wrong, you can see it by running
dashpointlabel.py in the
matplotlib_examples_0.98.1\examples\pylab_examples: the position of
the values should be at the other end of the dash, not over the
plotted point.
Am I missing something?
Thank you for your suggestions.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
From: Andrea G. <and...@gm...> - 2008年06月27日 10:57:07
Hi All,
 I have upgraded matplotlib from an old version I was using
(0.91.2) to the very latest one (0.98.1). In one of my applications, I
am using this code:
from matplotlib.transforms import offset_copy
def offset(ax, x, y):
 return offset_copy(ax.transData, x=x, y=y, units='dots')
Right now I get:
Traceback (most recent call last):
 File "E:\MyProjects\SimKill\SimKill.py", line 9, in <module>
 from PlotPage import PlotPage
 File "E:\MyProjects\SimKill\PlotPage.py", line 11, in <module>
 from matplotlib.transforms import offset_copy
ImportError: cannot import name offset_copy
Is offset_copy gone? How can I modify my code to get back the original
behaviour?
Thank you for your suggestions.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
From: Gael V. <gae...@no...> - 2008年06月27日 05:20:34
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 in...@en.... 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
From: Adam M. <ram...@gm...> - 2008年06月27日 04:42:23
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
From: David G. <d_l...@ya...> - 2008年06月27日 04:07:15
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 <dw...@cs...> wrote:
> From: David Warde-Farley <dw...@cs...>
> Subject: Re: [Matplotlib-users] matplotlib have "point in a polygon" test?
> To: d_l...@ya...
> Cc: mat...@li...
> 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
 
From: David Warde-F. <dw...@cs...> - 2008年06月27日 03:46:28
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
From: David G. <d_l...@ya...> - 2008年06月27日 03:37:49
Hi! Does matplotlib have already implemented a method to return true/false according as a provided point is inside a provided polygon? Thanks!
DG
 
From: John H. <jd...@gm...> - 2008年06月27日 02:14:52
On Thu, Jun 26, 2008 at 8:26 PM, Sasha Gutfraind <sgu...@gm...> 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
From: Sasha G. <sgu...@gm...> - 2008年06月27日 01:26:20
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.
From: John H. <jd...@gm...> - 2008年06月26日 16:41:03
On Thu, Jun 26, 2008 at 11:31 AM, Ben Axelrod <bax...@co...> 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
From: Ben A. <bax...@co...> - 2008年06月26日 16:31:28
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
From: Florian K. <flo...@tu...> - 2008年06月26日 14:00:26
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: mat...@li... per conto di Florian Koelling
>> Inviato: gio 26/06/2008 14.04
>> A: Darren Dale; mat...@li...
>> 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.
> 
From: John H. <jd...@gm...> - 2008年06月26日 13:15:20
On Thu, Jun 26, 2008 at 7:04 AM, Florian Koelling
<flo...@tu...> 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
From: Michael D. <md...@st...> - 2008年06月26日 12:33:23
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 <jd...@gm...>
> To: izak marais <iza...@ya...>
> Cc: mat...@li...
> 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 <iza...@ya... 
> <mailto:iza...@ya...>> 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
> Mat...@li...
> 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
From: Florian K. <flo...@tu...> - 2008年06月26日 12:04:32
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
> <flo...@tu... <mailto:flo...@tu...>> 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.
From: Manuel M. <mm...@as...> - 2008年06月26日 10:27:33
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
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Florian K. <flo...@tu...> - 2008年06月26日 09:51:32
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
4 messages has been excluded from this view by a project administrator.

Showing results of 446

<< < 1 2 3 4 5 .. 18 > >> (Page 3 of 18)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /