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
(19)
2
(3)
3
(12)
4
(2)
5
6
(9)
7
(27)
8
(39)
9
(17)
10
(22)
11
(5)
12
(1)
13
(11)
14
(12)
15
(14)
16
(29)
17
(32)
18
(8)
19
(3)
20
(10)
21
(27)
22
(11)
23
(8)
24
(4)
25
(4)
26
(3)
27
(18)
28
(7)
29
(29)
30
(13)
31
(4)

Showing results of 398

<< < 1 .. 13 14 15 16 > >> (Page 15 of 16)
From: Ryan K. <rya...@gm...> - 2006年03月07日 01:13:23
I have rebulit from SVN. It turns out that my problem only happens
with really large fonts. I am using Darren's new font size
specification with font.size =3D 18 or 24 and
everything else set to medium or large:
axes.titlesize : large # fontsize of the axes title
axes.labelsize : medium # fontsize of the x any y labels
xtick.labelsize : medium # fontsize of the tick labels
ytick.labelsize : medium # fontsize of the tick labels
legend.fontsize : medium
(I really like that new size scheme Darren.)
with font.size =3D 18, things are o.k. with 24, they are clipped on the
screen, in the pdf, and even a little in the png.
This may be closely related to what Steve just posted.
Ryan
On 3/6/06, Ryan Krauss <rya...@gm...> wrote:
> The problem is in both. I will build from svn and see what happens.
>
> Ryan
>
> On 3/6/06, Darren Dale <dd...@co...> wrote:
> > Hi Ryan,
> >
> > On Monday 06 March 2006 5:50 pm, Ryan Krauss wrote:
> > > I have a small problem when saving figures with
> > > savefig.facecolor : gray #white # figure facecolor when saving
> > > savefig.edgecolor : gray #white # figure edgecolor when saving
> > > set in my rc file.
> > >
> > > If I run
> > >
> > > t=3Darange(0,1,0.1)
> > > y=3Dsin(2*pi*t)
> > > plot(t,y)
> > > xlabel('Time (sec)')
> > > ylabel('amplitude')
> > > savefig('gray.eps')
> > >
> > > and then epstopdf gray.eps, I get the attached file with the gray
> > > border not going quite low enough. This doesn't occur when saving
> > > .png. It also seems to be o.k. if I just use xlabel('time') without
> > > the parenthesis and uppercase T.
> > >
> > > I am including the figures in a Latex beamer presenation with a dark
> > > background and I need the gray border for visability.
> > >
> > > I tried switching to gs-8.50, but the problem didn't do away. I am
> > > using version 0.86.2 which is probably cvs from a month ago.
> >
> > I cant reproduce your problem using the most recent checkout from svn. =
How
> > does your eps file look, does the problem only exist in the pdf?
> >
> > Darren
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang=
uage
> > that extends applications into web and mobile media. Attend the live we=
bcast
> > and join the prime developer group breaking into this new coding territ=
ory!
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat=
=3D121642
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
From: Steve S. <el...@gm...> - 2006年03月07日 00:57:00
Hi
1)
Using the recent svn version I get axes labels which are partially cut 
off when using mathtext (*no* usetex) and increasing the font size (see 
attached "image_cut.png"):
rcParams['xtick.labelsize'] = 18
rcParams['ytick.labelsize'] = 18
rcParams['axes.labelsize'] = 18
plot([1,2,3])
xlabel(r'$\rm{value}\ \sum\prod\Omega x_i$')
ylabel('y-Titel')
savefig("image_cut.png")
I observed this with .png, jpg and .eps
2)
Is it possible for the "\Omega" in "image_omega.png" to be upright (like 
it would be for usetex=True) and not inclined?
rcParams['xtick.labelsize'] = 18
rcParams['ytick.labelsize'] = 18
rcParams['axes.labelsize'] = 18
plot([1,2,3])
xlabel(r'$\Omega$')
ylabel('y-Titel')
savefig("image_omega.png")
cheers,
steve
-- 
Random number generation is the art of producing pure gibberish as 
quickly as possible.
From: Darren D. <dd...@co...> - 2006年03月07日 00:29:38
Hi Ryan,
On Monday 06 March 2006 5:50 pm, Ryan Krauss wrote:
> I have a small problem when saving figures with
> savefig.facecolor : gray #white # figure facecolor when saving
> savefig.edgecolor : gray #white # figure edgecolor when saving
> set in my rc file.
>
> If I run
>
> t=arange(0,1,0.1)
> y=sin(2*pi*t)
> plot(t,y)
> xlabel('Time (sec)')
> ylabel('amplitude')
> savefig('gray.eps')
>
> and then epstopdf gray.eps, I get the attached file with the gray
> border not going quite low enough. This doesn't occur when saving
> .png. It also seems to be o.k. if I just use xlabel('time') without
> the parenthesis and uppercase T.
>
> I am including the figures in a Latex beamer presenation with a dark
> background and I need the gray border for visability.
>
> I tried switching to gs-8.50, but the problem didn't do away. I am
> using version 0.86.2 which is probably cvs from a month ago.
I cant reproduce your problem using the most recent checkout from svn. How 
does your eps file look, does the problem only exist in the pdf?
Darren
From: Ryan K. <rya...@gm...> - 2006年03月06日 22:50:40
Attachments: gray.pdf
I have a small problem when saving figures with
savefig.facecolor : gray #white # figure facecolor when saving
savefig.edgecolor : gray #white # figure edgecolor when saving
set in my rc file.
If I run
t=3Darange(0,1,0.1)
y=3Dsin(2*pi*t)
plot(t,y)
xlabel('Time (sec)')
ylabel('amplitude')
savefig('gray.eps')
and then epstopdf gray.eps, I get the attached file with the gray
border not going quite low enough. This doesn't occur when saving
.png. It also seems to be o.k. if I just use xlabel('time') without
the parenthesis and uppercase T.
I am including the figures in a Latex beamer presenation with a dark
background and I need the gray border for visability.
I tried switching to gs-8.50, but the problem didn't do away. I am
using version 0.86.2 which is probably cvs from a month ago.
Ryan
From: Gerald J. M. M. <Ger...@jp...> - 2006年03月06日 20:01:52
Hello,
Is there a way to specify that a legend show its items
horizontally instead of vertically, i.e.:
x-x-x-x label1 y-y-y-y label2 z-z-z-z label3
vs.
x-x-x-x label1
y-y-y-y label2
z-z-z-z label3
?
Thanks,
Gerald
From: John H. <jdh...@ac...> - 2006年03月06日 18:04:48
>>>>> "Christopher" == Christopher Barker <Chr...@no...> writes:
 Christopher> Nikolai Hlubek wrote:
 >> Wouldn't another 'axis' option make the whole thing more
 >> consistent?
 Christopher> <soapbox>
 Christopher> Using the OO interface everywhere would make the
 Christopher> whole thing more consistent:
 Christopher> fig = pylab.figure(1) ax = fig.add_subplot(111)
 Christopher> ax.set_xlim(-0.25,2.0) ax.set_ylim(0.0,1.3)
 Christopher> ax.set_aspect('scaled', True)
 Christopher> ax.set_autoscale_on(False) ax.plot((0,.2,.3,.4,1.5),
 Christopher> (0,.5,.3,.92,.48))
 Christopher> <\soapbox>
or if you want to save some typing
 fig = pylab.figure(1)
 ax = fig.add_subplot(111, 
 xlim=(-0.25,2.0), ylim=(0.0,1.3), 
 aspect=('scaled', True), autoscale_on=False)
 ax.plot((0,.2,.3,.4,1.5), (0,.5,.3,.92,.48))
JDH
From: Christopher B. <Chr...@no...> - 2006年03月06日 17:53:53
Nikolai Hlubek wrote:
> Wouldn't another 'axis' option make the
> whole thing more consistent?
<soapbox>
Using the OO interface everywhere would make the whole thing more 
consistent:
fig = pylab.figure(1)
ax = fig.add_subplot(111)
ax.set_xlim(-0.25,2.0)
ax.set_ylim(0.0,1.3)
ax.set_aspect('scaled', True)
ax.set_autoscale_on(False)
ax.plot((0,.2,.3,.4,1.5), (0,.5,.3,.92,.48))
<\soapbox>
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Christopher B. <Chr...@no...> - 2006年03月06日 17:28:27
Steve Chaplin wrote:
> Using the latest cairo (git), pycairo (cvs) and matplotlib (svn) and
> running examples/simple_plot.py I get a 22K PDF file. But when I try to
> view it with evince and xpdf I get "unable to open document" type
> errors.
This is just a shot in the dark, but I've been playing with pycairo a 
bit, and found that you need to make sure to call:
cairo.Context.show_page()
When you're done with the rendering. I had similar symptoms before I did 
that.
John,
What are your plans regarding Cairo and the future of rendering for MPL? 
I'm in the need of alpha blended rendering for wxPython stuff, so I've 
been looking at Cairo and Agg. Agg is a great solution for really nice 
rendering, but Cairo has the promise of supporting everything else I 
need, like PDF for instance.
Now that Mozilla seems to be adopting Cairo, it might even live up to 
the promise of a fully cross-platform solution. If so, it would be great 
to develop a really general purpose, robust, numpy-aware, pythonic 
interface for it.
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: Sarah M. <mou...@gm...> - 2006年03月06日 15:52:52
Hi all,
I've only started using matplotlib very recently, and it's hugely
impressive. My current plotting is (occasionally) failing with the
error copied below (Fedora Core 4 standard install, Python 2.4...).
Does anyone know what causes this and whether I can tell from the data
being plotted whether it might happen? Sorry if that's a dumb
question, but ....
Many thanks!
Sarah
matplotlib error report:
 File "./random_error3d.py", line 142, in plot_results
 pylab.plot(x, y0, 'ro', x, y1, 'g^', x, y2, 'b+')
 File "/usr/lib/python2.4/site-packages/matplotlib/pylab.py", line
2129, in plot
 ret =3D gca().plot(*args, **kwargs)
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line 2792, in=
 plot
 self.autoscale_view()
 File "/usr/lib/python2.4/site-packages/matplotlib/axes.py", line
817, in autoscale_view
 self.set_ylim(locator.autoscale())
 File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
797, in autoscale
 return take(self.bin_boundaries(dmin, dmax), [0,-1])
 File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
767, in bin_boundaries
 scale, offset =3D scale_range(vmin, vmax, nbins)
 File "/usr/lib/python2.4/site-packages/matplotlib/ticker.py", line
738, in scale_range
 ex =3D divmod(math.log10(meanv), 1)[0]
OverflowError: math range error
--
http://www.mis.coventry.ac.uk/research/imd/
http://varspool.blogspot.com
From: Nikolai H. <nik...@ma...> - 2006年03月06日 15:26:43
Hi everyone
When looking at the little code example below
it can be seen see that you have to mix programming
paradigms to disable autoscaling:
 figure(1)
 ax = subplot(111)
 axis((-0.25,2.0,0.0,1.3))
 axis('scaled')
 ax.set_autoscale_on(False)
Wouldn't another 'axis' option make the
whole thing more consistent?
 figure(1)
 axis((-0.25,2.0,0.0,1.3))
 axis('scaled')
 axis(autoscale=False)
Best regards,
Nikolai
-- 
"1984" is not a howto!
From: John H. <jdh...@ac...> - 2006年03月06日 14:14:20
>>>>> "Toon" == Toon Verstraelen <Too...@UG...> writes:
 Toon> Currently I have written a wrapper script that allows me to
 Toon> set all types of margins in inches instead of relative
 Toon> coordinates:
 Toon> I wonder if their is a cleaner way of doing this, without a
 Toon> wrapper function? Is it possible to organize multiple axes
 Toon> in a plot in another way than using the pylab.subplot
 Toon> function?
Yes, you want to use the pylab axes function
 http://matplotlib.sourceforge.net/matplotlib.pylab.html#-axes
which allows you to place an axes anywhere. Still uses relative
coords, but your arithmetic will be *much easier* than it was for
subplots. Eg where leftrel is the relative left border and leftin is
the left border in inches, you can compute letfrel (which is what axes
wants) with 
 leftrel = leftin / figwidth
 Toon> I'm currently preparing a publication for which the plots
 Toon> are created with matplotlib, and I would like to share some
 Toon> of my experiences. The (future) ambition of matplotlib is to
 Toon> create plots that are publication-ready. For basic plots
 
I would argue that this is the current ambition, as I do believe
people are submitting matplotlib plots for publication :-) 
I know I have. But you are right, there is certainly work to do,
because there is no end to the tinkering people have to do to comply
with journal guidelines. And to satisfy their own need to tinker and
avoid real work :-)
 Toon> this is certainly no problem at all, but for complex plots
 Toon> containing multiple axes etc, the pylab.subplot function is
 Toon> too restrictive.
Right, it's just a special case helper function. Here is a screenshot
using axes
 http://matplotlib.sourceforge.net/screenshots.html#axes_demo
 Toon> As an example, I have attached one of the types of plots I'm
 Toon> working on. I have to use wrapper functions like the one
 Toon> given above, to make sure that the subplots are squares and
 Toon> the horizontal and vertical distances between them are
 Toon> equal. This is luckily not a blocker, but the choice of
 Toon> working with relative coordinates, is not always ideal. A
 
I agree. It would be nice to be able to pass in units of your choice,
inches, points, cm, relative, pixel, data for all locations. You can
do this relatively easy for some datatypes (eg lines, text, etc) by
using custom transforms, but not everywhere (eg axes positions are
always relative).
 Toon> problem I could not solve up to know, is aligning the labels
 Toon> at the left and the bottom of the plot. Don't get me wrong,
 Toon> I know that it is very difficult to implement a plotting
 Toon> interface that is able to deal with all these details.
 Toon> Are their any development plans to go further that the
 Toon> subplot- interface? I have some experience with writing
 Toon> GTK-applications. The GTK library contains a series of
 Toon> widgets (tables, hboxes, vboxes, ...) that are purely used
 Toon> for organizing the positions and sizes of the actual widgets
We've talked about this. layout engines like this are pretty hard to
do well. As you've noticed, matplotlib doesn't try to be smart, but
does try and give you handles to tweak things so that you can
ultimately get them where you want them. 
 Toon> of interest (entries, buttons, labels, ...). A similar
 Toon> approach in matplotlib would be a great improvement. The
 Toon> organizational widgets should have properties like margins,
 Toon> spacings, ..., that can be given in different units
 Toon> (relative or absolute). The actual widgets of interest in
 Toon> this analogy are axes, labels (for the title and
 Toon> axislabels), ticks with labels and legends.
 Toon> What do you matplotlib-people think of such an idea? Is it
 Toon> completely over-engineered? Maybe some parts are already
 Toon> partially implemented? I would be happy to work out this
 Toon> idea and start implementing it. It's a rather huge job, as I
 Toon> am not yet familiar with the complete matplotlib code. Some
 Toon> discussion in advance, also with non-developers, is
 Toon> therefore more than welcome. Shoot!
You are welcome to work on this. I think it would be a nice
addition. You might want to start by looking at the Axis code for
example to see how the xlabel and ylabel position are chosen to not
overlap the tick labels, as an example of how to work with the
matplotlib bounding boxes. This kind of stuff will be essential for
your layout algorithms.
Cheers, 
JDH
From: Toon V. <Too...@UG...> - 2006年03月06日 11:17:29
Hi,
I'm not sure whether my previous mail has really reached the mailing 
list or not. Excuse me if it is posted twice.
Currently I have written a wrapper script that allows me to set all 
types of margins in inches instead of relative coordinates:
width -- the width of the figure in inches
height -- the height of the figure in inches
margins -- a list of margins [left, right, bottom, top] in inches
spacing -- a list containing the horizontal and the vertical spacing
 between the subplots.
pylab.gcf().set_figsize_inches(width, height)
all_axes_width = (width - margins[0] - margins[1])
axes_width = (all_axes_width - (pylab.gca().numCols - 
1)*spacings[0])/pylab.gca().numCols
all_axes_height = (self.height - margins[2] - margins[3])
axes_height = (all_axes_height - (pylab.gca().numRows - 
1)*spacings[1])/pylab.gca().numRows
pylab.subplots_adjust(
 left=margins[0]/width,
 right=1-margins[1]/width,
 bottom=margins[2]/height,
 top=1-margins[3]/height,
 wspace=spacings[0]/axes_width,
 hspace=spacings[1]/axes_height
)
I wonder if their is a cleaner way of doing this, without a wrapper 
function? Is it possible to organize multiple axes in a plot in another 
way than using the pylab.subplot function?
I'm currently preparing a publication for which the plots are created 
with matplotlib, and I would like to share some of my experiences. The 
(future) ambition of matplotlib is to create plots that are 
publication-ready. For basic plots this is certainly no problem at all, 
but for complex plots containing multiple axes etc, the pylab.subplot 
function is too restrictive.
As an example, I have attached one of the types of plots I'm working on. 
I have to use wrapper functions like the one given above, to make sure 
that the subplots are squares and the horizontal and vertical distances 
between them are equal. This is luckily not a blocker, but the choice of 
working with relative coordinates, is not always ideal. A problem I 
could not solve up to know, is aligning the labels at the left and the 
bottom of the plot. Don't get me wrong, I know that it is very difficult 
to implement a plotting interface that is able to deal with all these 
details.
Are their any development plans to go further that the subplot- 
interface? I have some experience with writing GTK-applications. The GTK 
library contains a series of widgets (tables, hboxes, vboxes, ...) that 
are purely used for organizing the positions and sizes of the actual 
widgets of interest (entries, buttons, labels, ...). A similar approach 
in matplotlib would be a great improvement. The organizational widgets 
should have properties like margins, spacings, ..., that can be given in 
different units (relative or absolute). The actual widgets of interest 
in this analogy are axes, labels (for the title and axislabels), ticks 
with labels and legends.
What do you matplotlib-people think of such an idea? Is it completely 
over-engineered? Maybe some parts are already partially implemented? I 
would be happy to work out this idea and start implementing it. It's a 
rather huge job, as I am not yet familiar with the complete matplotlib 
code. Some discussion in advance, also with non-developers, is therefore 
more than welcome. Shoot!
regards,
Toon
From: Ryan K. <rya...@gm...> - 2006年03月04日 21:57:55
Is there an easy way with the Pylab interface to add an arc to a plot?
 I need to label an angle on a plot.
Thanks,
Ryan
From: Steve C. <ste...@ya...> - 2006年03月04日 03:22:23
On Fri, 2006年03月03日 at 09:30 -0800,
mat...@li... wrote:
> What is the status of the cairo pdf backend? I installed it,
> but got a python error at line 257 of backend_cairo.py.
> _.get_rgb() doesn't make sense to me, so I changed it to
> gc.get_rgb(). Now everything runs without error, but the
> generated pdf file is 42Mb even for a simple plot. And there
> is a font problem.
> 
> Keith
_.get_rgb() is a mistake, I've changed it to gc.get_rgb().
Using the latest cairo (git), pycairo (cvs) and matplotlib (svn) and
running examples/simple_plot.py I get a 22K PDF file. But when I try to
view it with evince and xpdf I get "unable to open document" type
errors.
The matplotlib cairo PDF backend relies on the cairo PDF backend.
The cairo PDF backend is relatively new, and is still being developed,
and I believe it currently only supports a limited set of fonts.
Steve
Send instant messages to your online friends http://au.messenger.yahoo.com 
From: Eric F. <ef...@ha...> - 2006年03月03日 22:45:09
Greg,
Gregory Novak wrote:
> pcolor doesn't seem to be using the vmin and vmax values that I supply
> to it. 
It is fixed in svn now. The relevant part is:
--- lib/matplotlib/axes.py (revision 2126)
+++ lib/matplotlib/axes.py (working copy)
@@ -2312,10 +2312,8 @@
 if cmap is not None: assert(isinstance(cmap, Colormap))
 collection.set_cmap(cmap)
 collection.set_norm(norm)
+ collection.set_clim(vmin, vmax)
- if norm is not None:
- collection.set_clim(vmin, vmax)
-
 self.grid(False)
 x = X.compressed()
We don't want to check for norm being None, because after calling 
collection.set_norm, the collection's norm is *not* None, so it is 
always OK (and necessary, if we have provided values for vmin and vmax) 
to call set_clim.
Eric
From: Eric F. <ef...@ha...> - 2006年03月03日 22:27:50
Greg,
Gregory Novak wrote:
> pcolor doesn't seem to be using the vmin and vmax values that I supply
> to it. If I do:
> 
> X,Y = meshgrid(arange(-2,2,.1), arange(-2,2,.1))
> pcolor(X**2 + Y**2, vmin = 1., vmax=2.)
> 
> I see a smooth paraboloid (ie, without the min/max clipping in the
> center on the edge that I would expect).
> 
> However, if I instead do:
> 
> imshow(X**2 + Y**2, vmin = 1., vmax=2.)
> 
> I see what I expect, a circular dark region, surrounded by a smoothly
> varying ring, surrounded by a white area to the edge of the plot. 
> 
> I'm using OS X 10.4.5, Python 2.3.5, and matplotlib 0.87. Am I doing
> something wrong?
No, you found a bug. I have fixed it, but it may take me a little while 
to get it committed to svn--this will be my first commit since the 
switch from cvs to svn.
I will send another message shortly.
Eric
From: Gregory N. <no...@uc...> - 2006年03月03日 21:39:03
pcolor doesn't seem to be using the vmin and vmax values that I supply
to it. If I do:
X,Y = meshgrid(arange(-2,2,.1), arange(-2,2,.1))
pcolor(X**2 + Y**2, vmin = 1., vmax=2.)
I see a smooth paraboloid (ie, without the min/max clipping in the
center on the edge that I would expect).
However, if I instead do:
imshow(X**2 + Y**2, vmin = 1., vmax=2.)
I see what I expect, a circular dark region, surrounded by a smoothly
varying ring, surrounded by a white area to the edge of the plot. 
I'm using OS X 10.4.5, Python 2.3.5, and matplotlib 0.87. Am I doing
something wrong?
Thanks,
Greg
From: Michael P. M. <mo...@jp...> - 2006年03月03日 20:06:50
Hello, I figured out the answer about aspect ratio. I see the method on 
the axes object.
Mike
I get this error:
ValueError: Domain error on eval_scalars in RendererAgg::draw_regpoly_collection
when I try to plot the scatter below. Can anyone tell me what this error means? It is completely
greek to me. Again, sorry for the huge data sample but you know...gotta be accurate.
Thanks,
Derek Basch
import matplotlib
from pylab import *
def roundUpLogDecade(x):
 """ Round up to the nearest logarithmic decade""" 
 return 10**math.ceil(math.log10(x))
def log10Product(x, pos):
 """The two args are the value and tick position.
 Label ticks with the product of the exponentiation"""
 return '%1i' % (x)
prediction_experiment = [(15305.6, 18811.900000000001), (16211.4, 32857.099999999999),
(95.900000000000006, 20.534500000000001), (22925.599999999999, 1096.29), (20800.299999999999,
50000.0), (8256.3999999999996, 19166.700000000001), (61.600000000000001, 14.3163),
(2067.6999999999998, 19.166699999999999), (18.800000000000001, 166.52000000000001),
(14272.799999999999, 966.96500000000003), (3024.8000000000002, 28204.400000000001), (100.7,
1437.5), (16.300000000000001, 7.1875), (10.300000000000001, 1.38544), (1557.7, 13915.6), (14693.0,
8846.1499999999996), (0.90000000000000002, 3.0666699999999998), (167.30000000000001,
2468.8699999999999), (49.200000000000003, 44.230800000000002), (632.0, 88.8673),
(156.80000000000001, 37.096800000000002), (55.0, 359.0), (6.5999999999999996, 1.0), (666.0,
38.677799999999998), (965.20000000000005, 307.69799999999998), (999.0, 333.27600000000001),
(1391.2, 24215.900000000001), (1034.5, 1230.1300000000001), (3876.9000000000001,
1065.8599999999999), (1012.7, 14122.0), (1142.7, 338.78699999999998), (2498.3000000000002,
7048.6499999999996), (610.39999999999998, 16166.799999999999), (5880.3000000000002,
2148.8499999999999), (1208.4000000000001, 124.51000000000001), (3771.4000000000001,
6958.2200000000003), (704.10000000000002, 1308.9100000000001), (1541.2, 975.33500000000004),
(1262.4000000000001, 1434.22), (756.60000000000002, 445.27999999999997), (660.39999999999998,
6917.1700000000001), (858.20000000000005, 604.55700000000002), (906.89999999999998,
4903.1700000000001), (885.60000000000002, 1712.1500000000001), (848.5, 3.5920999999999998),
(730.89999999999998, 1325.8199999999999), (529.10000000000002, 603.10699999999997),
(883.29999999999995, 494.04599999999999), (368.10000000000002, 882.39499999999998),
(635.10000000000002, 274.40100000000001), (786.29999999999995, 195.446), (605.5,
31.575600000000001), (947.39999999999998, 232.23099999999999), (143.69999999999999, 60.1965),
(184.69999999999999, 106.23099999999999), (130.59999999999999, 1731.3199999999999),
(216.69999999999999, 2357.0100000000002), (101.2, 1.6222399999999999), (184.69999999999999,
4893.1899999999996), (184.69999999999999, 4791.71), (2.0, 56.9193), (130.59999999999999,
1535.3399999999999), (24.600000000000001, 220.05600000000001), (40.5, 184.017),
(216.69999999999999, 4331.5299999999997), (130.59999999999999, 6743.8500000000004),
(130.59999999999999, 4601.6700000000001), (279.39999999999998, 1592.9300000000001),
(85.900000000000006, 709.89099999999996), (118.0, 38.137799999999999), (18.300000000000001,
1.9705900000000001), (75.900000000000006, 87.005099999999999), (707.70000000000005,
492.86399999999998), (706.89999999999998, 1018.73), (52.200000000000003, 79.310299999999998),
(918.10000000000002, 149.92699999999999), (849.20000000000005, 259.23000000000002), (366.0,
7802.0900000000001), (590.89999999999998, 913.01499999999999), (850.10000000000002,
2007.8699999999999), (4047.5, 74193.5), (643.10000000000002, 103.756), (8435.7000000000007,
2286.3200000000002), (276.69999999999999, 50000.0), (37.0, 5.2272699999999999),
(294.60000000000002, 14.93), (4.0, 1.0), (32.899999999999999, 28.395099999999999),
(78.700000000000003, 460.0), (1823.8, 50000.0), (636.70000000000005, 94.134600000000006), (14.1,
3.6507900000000002), (372.19999999999999, 1036.97), (38.399999999999999, 1.0),
(1.3999999999999999, 4.5999999999999996), (15540.0, 32857.099999999999), (15641.9,
32857.099999999999), (15540.0, 26650.700000000001), (15305.6, 32857.099999999999), (16211.4,
11600.200000000001), (16831.400000000001, 32857.099999999999), (8643.1000000000004,
86746.100000000006), (57382.599999999999, 4004.6500000000001), (274.0, 438.07900000000001),
(18462.5, 16857.200000000001), (15540.0, 15064.9), (15540.0, 13152.5), (15305.6,
30666.700000000001), (18462.5, 19247.0), (18462.5, 19449.700000000001), (18462.5,
23263.400000000001), (18462.5, 30666.700000000001), (15540.0, 30666.700000000001), (331.5,
10.0541), (1388.4000000000001, 704.97299999999996), (69.0, 247.31200000000001),
(808.20000000000005, 50000.0), (323.60000000000002, 36.847999999999999), (42.700000000000003,
153.333), (3.8999999999999999, 8.7948199999999996), (750879.0, 42069.300000000003),
(53758.900000000001, 50000.0), (317958.0, 32394.400000000001), (238.19999999999999,
82.269099999999995), (11867.200000000001, 26136.400000000001), (1428.4000000000001,
6121.3800000000001), (3364.6999999999998, 10454.5), (2498.6999999999998, 8518.5200000000004),
(49.200000000000003, 4339.6199999999999), (113185.0, 19607.299999999999), (26920.900000000001,
50000.0), (34519.099999999999, 28082.200000000001), (1513.3, 39655.199999999997), (12586.6,
69697.0), (2835.9000000000001, 6862.1999999999998), (46922.400000000001, 92000.0),
(1812.4000000000001, 6571.4300000000003), (40.299999999999997, 11.0953), (20960.900000000001,
1009.1900000000001), (374.60000000000002, 1272.22), (118348.0, 50000.0), (1429.0,
3709.6799999999998), (17617.299999999999, 109.708), (95979.800000000003, 50000.0), (1418.8,
12777.799999999999), (17760.700000000001, 11634.299999999999), (79792.100000000006,
6213.1700000000001), (142226.0, 19392.400000000001), (252.5, 8214.2900000000009),
(13683.299999999999, 51111.099999999999), (3855.8000000000002, 7269.04), (2225.1999999999998,
1000.0), (2771.0999999999999, 766.66700000000003), (1970.2, 541.28800000000001),
(8354.7000000000007, 95123.0), (676.20000000000005, 4893.6199999999999), (1256.0999999999999,
23000.0), (16.0, 1.0), (132.19999999999999, 115.0), (5450.1999999999998, 821.42899999999997),
(1751.3, 50000.0), (939.60000000000002, 153.333), (2664.0999999999999, 50000.0),
(781.89999999999998, 2987.0100000000002), (651.70000000000005, 43396.199999999997),
(2825.5999999999999, 8518.5200000000004), (2503.0999999999999, 15713.700000000001),
(212.19999999999999, 1.5756699999999999), (4.2999999999999998, 460.0), (7777.8999999999996,
143750.0), (4362140.0, 17767.099999999999), (29821.5, 11853.0), (1132840.0, 460000.0),
(7106.6999999999998, 26293.700000000001), (9652.8999999999996, 50000.0), (516.79999999999995,
4423.0799999999999), (61663.800000000003, 10952.4), (721.60000000000002, 1273.6099999999999),
(1196.4000000000001, 11.914199999999999), (46.0, 460.0), (90.5, 2.6690100000000001),
(1161.9000000000001, 3898.9699999999998), (225.90000000000001, 15.386799999999999), (36.0,
48.936199999999999), (908.5, 1073.02), (576.89999999999998, 1209.6500000000001),
(790.29999999999995, 79211.899999999994), (495.10000000000002, 220.14599999999999),
(531.79999999999995, 104.545), (27090.700000000001, 8518.5200000000004), (44.0,
179.31200000000001), (567.29999999999995, 1045.45), (627.39999999999998, 11235.700000000001),
(319.60000000000002, 1415.75), (9.3000000000000007, 1.0), (51.899999999999999,
206.59100000000001), (405.0, 7419.3500000000004), (1038.5, 4302.5200000000004),
(1450.4000000000001, 49.071800000000003), (2651.4000000000001, 2300.0), (170.30000000000001,
271.03800000000001), (88.200000000000003, 1277.78), (102.2, 101.0), (122.59999999999999,
8.8461499999999997), (791.0, 665.01800000000003), (208.40000000000001, 38983.099999999999),
(1045.2, 4.8056799999999997), (393.10000000000002, 100.0), (3.6000000000000001, 1.0),
(8.8000000000000007, 2.5555599999999998), (102.40000000000001, 5.0898199999999996),
(1145.4000000000001, 425.92599999999999), (16002.200000000001, 3610.7199999999998),
(62966.599999999999, 766667.0), (3255.1999999999998, 51048.099999999999), (8068.3000000000002,
12.2407), (123.09999999999999, 127.441), (112.40000000000001, 8233.8600000000006),
(1.1000000000000001, 1.33012), (3980.6999999999998, 46000.0), (4029.9000000000001,
18471.700000000001), (2442.0999999999999, 35.3872), (27480.200000000001, 383333.0),
(210.59999999999999, 7.8554399999999998), (214951.0, 14375.0), (22775.099999999999,
17003.400000000001), (84.700000000000003, 46000.0), (427.0, 209.09100000000001),
(1047.4000000000001, 12177.700000000001), (19.699999999999999, 21.231400000000001),
(291.39999999999998, 38.9831), (2850.8000000000002, 39352.199999999997), (1706.0, 7187.5), (22.0,
9.8006200000000003), (1572.3, 31.756900000000002), (598.60000000000002, 6017.3999999999996),
(45.399999999999999, 1.7382500000000001), (7.5, 3.1923599999999999), (55.399999999999999,
14.9993), (20365.299999999999, 40954.099999999999), (2579.9000000000001, 16213.299999999999),
(2464.0999999999999, 433.96199999999999), (24398.900000000001, 176923.0), (8599.7999999999993,
7178.3900000000003), (2442.1999999999998, 8518.5200000000004), (33161.900000000001, 71875.0),
(17153.799999999999, 26515.700000000001), (2569.0, 1866.5799999999999), (5.7999999999999998,
7.6666699999999999), (3234.8000000000002, 8729.7999999999993), (73.299999999999997,
338.23500000000001), (9.6999999999999993, 19.254000000000001), (2517.6999999999998,
2216.4400000000001), (890.5, 1410.6199999999999), (136.5, 328.57100000000003),
(103.90000000000001, 11.7334), (6.4000000000000004, 4.8936200000000003), (32.399999999999999,
252.74700000000001), (61.5, 109.524), (3413.0, 676.471), (142.30000000000001, 3.9655200000000002),
(22.699999999999999, 1.0), (895.5, 1343.4200000000001), (324.69999999999999, 479.16699999999997),
(97.299999999999997, 482.0), (2712.0999999999999, 43396.199999999997), (165.0,
2.4984600000000001), (7.2999999999999998, 1.00952), (11.199999999999999, 1.0), (1748.2, 1698.52),
(82.200000000000003, 34.445399999999999), (21891.700000000001, 383333.0), (1838.4000000000001,
409.54399999999998), (727.0, 958.33299999999997), (72453.600000000006, 50000.0),
(905.10000000000002, 6656.6099999999997), (25946.0, 50000.0), (1267.0, 51111.099999999999),
(1128.3, 38.956400000000002), (1930.5, 888.99699999999996), (932.0, 3593.75), (246.59999999999999,
79.310299999999998), (1658.9000000000001, 492.55099999999999), (2.5, 50000.0),
(491.60000000000002, 433.96199999999999), (389.10000000000002, 32.055999999999997),
(284.30000000000001, 209.09100000000001), (0.0, 1.0), (1340.4000000000001, 61.305),
(2080.3000000000002, 14.007099999999999), (38978.0, 36475.800000000003), (922.10000000000002,
460.0), (430.0, 718.75), (15.9, 1.0), (449.0, 115.0), (152.5, 5000.0), (1378.5999999999999,
638.88900000000001), (38795.400000000001, 383333.0), (36800.199999999997, 2534.9899999999998),
(26164.400000000001, 2562.3499999999999), (14170.299999999999, 50000.0), (442.60000000000002,
21576.400000000001), (2515.8000000000002, 179.709), (4841.1999999999998, 605.26300000000003),
(32.899999999999999, 1.0), (889.39999999999998, 1206.7), (4249.3999999999996, 29742.5),
(777.79999999999995, 1000.0), (34.799999999999997, 20.7027), (64.299999999999997,
64.324600000000004), (39977.0, 13295.0), (9984.6000000000004, 695.58900000000006),
(3540.4000000000001, 1806.78), (3767.8000000000002, 46831.599999999999), (56914.099999999999,
5708.1899999999996), (4645.6999999999998, 851.85199999999998), (216.40000000000001, 50000.0),
(602.0, 27.278600000000001), (4304.6000000000004, 62162.199999999997), (6885.6000000000004,
35937.5), (14.1, 20.273900000000001), (15455.0, 15240.1), (2835.0999999999999, 31135.5),
(27447.299999999999, 11928.799999999999), (81.400000000000006, 20.2743), (1040.3,
2622.5300000000002), (619.39999999999998, 793.10299999999995), (2281.4000000000001,
801.94500000000005), (1546.4000000000001, 15333.299999999999), (225051.0, 6987.0),
(36433.400000000001, 50000.0), (198431.0, 38333.300000000003), (1167750.0, 79310.300000000003),
(25351.299999999999, 7490.6499999999996), (29013.5, 17831.599999999999), (100582.0,
82142.899999999994), (1704.0999999999999, 8846.1499999999996), (710.70000000000005, 1.0),
(4711.6000000000004, 57500.0), (21238.299999999999, 19166.700000000001), (17927.900000000001,
60526.300000000003), (540.70000000000005, 5269.2200000000003), (22351.700000000001,
25748.799999999999), (47715.599999999999, 365.07900000000001), (429.80000000000001,
12777.799999999999), (30052.5, 13283.4), (1074.8, 10795.0), (6114.1999999999998, 383333.0),
(79.599999999999994, 3098.2600000000002), (178.40000000000001, 135.62299999999999), (954.5,
17.468399999999999), (21802.700000000001, 1870.8299999999999), (148.0, 3538.46),
(931.10000000000002, 17.999400000000001), (2401.0999999999999, 958.33299999999997),
(5443.3000000000002, 527.14499999999998), (900.20000000000005, 50000.0), (1237.5,
643.03499999999997), (276.30000000000001, 153.84399999999999), (294.0, 1.0), (287.19999999999999,
5476.1899999999996), (2090.0, 47022.199999999997), (613.79999999999995, 6969.6999999999998),
(143.0, 88.652199999999993), (1493.3, 489.36200000000002), (42878.5, 64950.0),
(14928.299999999999, 460000.0), (13958.9, 5287.1000000000004), (3624.6999999999998,
51111.099999999999), (5290.3999999999996, 58420.099999999999), (888.60000000000002,
2028.9400000000001), (113587.0, 121053.0), (3165.3000000000002, 6660.29), (162.69999999999999,
3194.4400000000001), (412.10000000000002, 8.4493600000000004), (208.5, 88.461500000000001), (88.0,
3.9503699999999999), (89.5, 1.81321), (550.39999999999998, 1477.74), (109.8, 35.077800000000003),
(76.5, 766.66700000000003), (150.59999999999999, 56.0976), (173.69999999999999,
16428.599999999999), (167.59999999999999, 50.0), (624.10000000000002, 83.306200000000004),
(38.600000000000001, 16.428599999999999), (7.5, 2.09091), (145.30000000000001, 13.7507),
(2064.1999999999998, 170.78800000000001), (6483.1000000000004, 231.233), (399.10000000000002,
6589.2399999999998), (5789.6000000000004, 10130.299999999999), (9468.2999999999993,
4259.2600000000002), (1445.0, 34.543700000000001), (544.89999999999998, 2.7040999999999999),
(9.8000000000000007, 7.9310299999999998), (875.89999999999998, 53488.400000000001),
(295.30000000000001, 54.761899999999997), (24.800000000000001, 450.98000000000002),
(9.8000000000000007, 13.529400000000001), (1372.5, 16428.599999999999), (348.5,
33.823500000000003), (0.90000000000000002, 1.9438599999999999), (375.19999999999999, 1045.45),
(86.700000000000003, 74.789299999999997), (196.80000000000001, 920.0), (91.0, 34.517299999999999),
(396.10000000000002, 821.42899999999997), (81.700000000000003, 6.0526299999999997),
(5.4000000000000004, 3.4328400000000001), (494.69999999999999, 4061.96), (133.0,
26.364699999999999), (2.7999999999999998, 1.5333300000000001), (29258.400000000001, 460000.0),
(39836.400000000001, 100000.0), (8263.6000000000004, 10774.299999999999), (3795.1999999999998,
22952.700000000001), (1897.8, 884.61500000000001), (3398.8000000000002, 4035.0900000000001),
(121.5, 1779.04), (3144.1999999999998, 50000.0), (69321.800000000003, 115000.0),
(6019.3999999999996, 582.62900000000002), (1.3, 76.666700000000006), (8979.7000000000007,
13303.700000000001), (11626.5, 442.81299999999999), (15622.5, 9417.3799999999992), (1158750.0,
766667.0), (277013.0, 766667.0), (15045.299999999999, 18330.299999999999), (32308.0,
18274.700000000001), (2285.9000000000001, 43590.599999999999), (40165.199999999997,
21776.799999999999), (9160.5, 6764.71), (772734.0, 74193.5), (25931.0, 50000.0), (163399.0,
5897.4399999999996), (307.19999999999999, 2.86212), (8647.5, 50863.400000000001),
(4.2999999999999998, 5.2272699999999999), (287.80000000000001, 190.85599999999999),
(886.60000000000002, 638.88900000000001), (1002.2, 1.0), (331.69999999999999, 135.416),
(2952.5999999999999, 14112.799999999999), (416.10000000000002, 5522.8400000000001), (249.0,
120.767), (384.5, 15921.6), (61.200000000000003, 56.0976), (644.0, 6969.6999999999998), (508.5,
40.350900000000003), (145.09999999999999, 18.5822), (1176.9000000000001, 10952.4),
(5.7999999999999998, 1.5333300000000001), (2.7999999999999998, 1.0), (7.0999999999999996, 1.0),
(120.7, 18.596), (3492.0999999999999, 57411.599999999999), (164.80000000000001,
9.4171499999999995), (16443.0, 50000.0), (13.300000000000001, 7805.2700000000004),
(4.0999999999999996, 1.0), (340.89999999999998, 176.923), (196.59999999999999,
10.211600000000001), (5.0, 3.5561799999999999), (1386.2, 175.114), (4529.8000000000002,
1315.4100000000001), (4056.8000000000002, 3924.46)]
auc_cutoff = 50
ax = subplot(111)
# Axis scale must be set prior to declaring the Formatter
# If it is not the Formatter will use the default log labels for ticks.
ax.set_xscale('log')
ax.set_yscale('log')
formatter = FuncFormatter(log10Product)
ax.xaxis.set_major_formatter(formatter)
ax.yaxis.set_major_formatter(formatter)
tp_prediction_experiment = [[x[0], x[1]] for x in prediction_experiment if x[1] < auc_cutoff]
tn_prediction_experiment = [[x[0], x[1]] for x in prediction_experiment if x[1] > auc_cutoff]
ax.scatter( [x[1] for x in tn_prediction_experiment], [x[0] for x in tn_prediction_experiment],
s=8, c='r', marker='s', faceted=False)
ax.scatter( [x[1] for x in tp_prediction_experiment], [x[0] for x in tp_prediction_experiment],
s=8, c='b', marker='s', faceted=False)
# set the x and y limits of the plot to the upward nearest exact log decade of the max vertice
max_xlim = roundUpLogDecade(max([x[1] for x in prediction_experiment]))
max_ylim = roundUpLogDecade(max([x[0] for x in prediction_experiment]))
# Must add 1 to allow the last decades label to be shown
print max_xlim
print max_ylim
ax.set_xlim(1e-1, max_xlim+1)
ax.set_ylim(1e-1, max_ylim+1)
grid(True)
xlabel(r"Experimental IC50 [nM]", fontsize = 12)
ylabel(r"Prediction", fontsize = 12)
show()
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
From: David C. <dav...@gm...> - 2006年03月03日 14:39:50
SSBjYW1lIGFjcm9zcyB0aGUgc2FtZSBwcm9ibGVtLCBidXQgd2FzIGFibGUgdG8Kb3ZlcmNvbWUg
aXQgYnkgc2V0dGluZyB0aGUgTEFORyBlbnZpcm9ubWVudAp2YXJpYWJsZSB0byAiQyIgcmF0aGVy
IHRoYW4gImVuX1VTLlVURi04IgoKQ2hlZXJzLAogIERhdmUK
From: Toon V. <Too...@UG...> - 2006年03月03日 13:30:16
Attachments: Toon.Verstraelen.vcf
Hi,
Is there a clean way to give absolute coordinates (i.e. 2cm or O.3in) to 
methods and functions like these:
Axes.set_position
pylab.subplots_adjus
regards,
Toon
From: Darren D. <dd...@co...> - 2006年03月03日 10:39:23
On Friday 03 March 2006 3:10 am, Emmanuel Pecontal wrote:
> Hi Antoine,
>
> I had exactly the same problem. I tracked it and found that in the
> setupext.py, when I tried to print the module.library_dirs variable after
> the command:
> module.library_dirs.extend([o.tcl_lib, o.tk_lib])
> I got:
> ['/usr/share/tcl/tcl8.4/../', u'/usr/share/tcl/tk8.4/../']
> The string containing the tk library path is a unicode one for some reason
> I do not understand. I changed then the line which fills this string. It =
is
> in the function find_tcltk(): of setupext.py:
> o.tk_lib =3D os.path.join(tk.getvar('tk_library'), '../')
> I replaced it by:
> o.tk_lib =3D os.path.join(str(tk.getvar('tk_library')), '../')
>
> And that did the trick.
> I really don't understand why the tcl library string is not affected by t=
he
> same problem anyway...
But this fix was committed back on Feb 2, and is included in mpl-0.87.
> Le Vendredi 3 Mars 2006 02:48, Antoine Latter a =C3=A9crit=C2=A0:
> > I tried to build matplot lib (both 0.87 and 0.86.2) on Ubuntu Linux 5.1=
0.
> > The first set of error messages convinced me to install the Tcl and Tk
> > dev packages.
> >
> > The second run of errors is just really weird, and I'm not sure how to
> > fix it.
> >
> > Thanks,
> > Antoine
> >
> >
> >
> > First run or errors
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > src/_tkagg.cpp:28:18: error: tk.h: No such file or directory
> > src/_tkagg.cpp:36: error: ISO C++ forbids declaration of =E2=80=98Tcl_I=
nterp=E2=80=99
> > with no type
> > src/_tkagg.cpp:36: error: expected =E2=80=98;=E2=80=99 before =E2=80=98=
*=E2=80=99 token
> > src/_tkagg.cpp:40: error: =E2=80=98ClientData=E2=80=99 was not declared=
 in this scope
> > src/_tkagg.cpp:40: error: =E2=80=98Tcl_Interp=E2=80=99 was not declared=
 in this scope
> > src/_tkagg.cpp:40: error: =E2=80=98interp=E2=80=99 was not declared in =
this scope
> > src/_tkagg.cpp:41: error: expected primary-expression before =E2=80=98i=
nt=E2=80=99
> > src/_tkagg.cpp:41: error: expected primary-expression before =E2=80=98c=
har=E2=80=99
> > src/_tkagg.cpp:41: error: initializer expression list treated as compou=
nd
> > expression
> > src/_tkagg.cpp:42: error: expected =E2=80=98,=E2=80=99 or =E2=80=98;=E2=
=80=99 before =E2=80=98{=E2=80=99 token
> > src/_tkagg.cpp: In function =E2=80=98PyObject* _tkinit(PyObject*, PyObj=
ect*)=E2=80=99:
> > src/_tkagg.cpp:176: error: =E2=80=98Tcl_Interp=E2=80=99 was not declare=
d in this scope
> > src/_tkagg.cpp:176: error: =E2=80=98interp=E2=80=99 was not declared in=
 this scope
> > src/_tkagg.cpp:185: error: expected primary-expression before =E2=80=98=
)=E2=80=99 token
> > src/_tkagg.cpp:185: error: expected `;' before =E2=80=98arg=E2=80=99
> > src/_tkagg.cpp:190: error: =E2=80=98struct TkappObject=E2=80=99 has no =
member named
> > =E2=80=98interp=E2=80=99 src/_tkagg.cpp:196: error: =E2=80=98Tcl_CmdPro=
c=E2=80=99 was not declared in
> > this scope src/_tkagg.cpp:196: error: expected primary-expression before
> > =E2=80=98)=E2=80=99 token src/_tkagg.cpp:197: error: =E2=80=98ClientDat=
a=E2=80=99 was not declared in
> > this scope src/_tkagg.cpp:197: error: =E2=80=98Tcl_CmdDeleteProc=E2=80=
=99 was not
> > declared in this scope src/_tkagg.cpp:197: error: expected
> > primary-expression before =E2=80=98)=E2=80=99 token src/_tkagg.cpp:197:=
 error:
> > =E2=80=98Tcl_CreateCommand=E2=80=99 was not declared in this scope ./CX=
X/Extensions.hxx:
> > In constructor
> > =E2=80=98Py::PythonExtension<T>::PythonExtension() [with T =3D BufferRe=
gion]=E2=80=99:
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >
> >
> >
> > Second run of errors
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> > g++ -pthread -shared build/temp.linux-i686-2.4/src/_tkagg.o
> > build/temp.linux-i686-2.4/CXX/cxx_extensions.o
> > build/temp.linux-i686-2.4/CXX/cxxsupport.o
> > build/temp.linux-i686-2.4/CXX/IndirectPythonInterface.o
> > build/temp.linux-i686-2.4/CXX/cxxextensions.o -L/usr/lib/tcl8.4/../ - L=
 /
> > u s r / l i b / t k 8 . 4 / . . / -L/usr/local/lib -L/usr/local/lib
> > -ltk8.4 -ltcl8.4 -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o
> > build/lib.linux-i686-2.4/matplotlib/backends/_tkagg.so
> > g++: L: No such file or directory
> > g++: u: No such file or directory
> > g++: s: No such file or directory
> > g++: r: No such file or directory
> > g++: l: No such file or directory
> > g++: i: No such file or directory
> > g++: b: No such file or directory
> > g++: t: No such file or directory
> > g++: k: No such file or directory
> > g++: 8: No such file or directory
> > g++: 4: No such file or directory
> > g++: -E or -x required when input is from standard input
> > g++: L: No such file or directory
> > g++: u: No such file or directory
> > g++: s: No such file or directory
> > g++: r: No such file or directory
> > g++: l: No such file or directory
> > g++: i: No such file or directory
> > g++: b: No such file or directory
> > g++: t: No such file or directory
> > g++: k: No such file or directory
> > g++: 8: No such file or directory
> > g++: 4: No such file or directory
> > g++: -E or -x required when input is from standard input
> > error: Command "g++ -pthread -shared
> > build/temp.linux-i686-2.4/src/_tkagg.o
> > build/temp.linux-i686-2.4/CXX/cxx_extensions.o
> > build/temp.linux-i686-2.4/CXX/cxxsupport.o
> > build/temp.linux-i686-2.4/CXX/IndirectPythonInterface.o
> > build/temp.linux-i686-2.4/CXX/cxxextensions.o -L/usr/lib/tcl8.4/../ - L=
 /
> > u s r / l i b / t k 8 . 4 / . . / -L/usr/local/lib -L/usr/local/lib
> > -ltk8.4 -ltcl8.4 -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o
> > build/lib.linux-i686-2.4/matplotlib/backends/_tkagg.so" failed with exit
> > status 1
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > language that extends applications into web and mobile media. Attend the
> > live webcast and join the prime developer group breaking into this new
> > coding territory!
> > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid1720ドル&dat=121642
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
=2D-=20
Darren S. Dale, Ph.D.
dd...@co...
From: <kei...@bt...> - 2006年03月03日 09:55:51
What is the status of the cairo pdf backend? I installed it, but got a =
python error at line 257 of backend_cairo.py.
_.get_rgb() doesn't make sense to me, so I changed it to gc.get_rgb(). =
 Now everything runs without error, but the generated pdf file is 42Mb =
even for a simple plot. And there is a font problem.
Keith
From: Emmanuel P. <pec...@ob...> - 2006年03月03日 08:10:26
Hi Antoine,
I had exactly the same problem. I tracked it and found that in the=20
setupext.py, when I tried to print the module.library_dirs variable after t=
he=20
command:
module.library_dirs.extend([o.tcl_lib, o.tk_lib])
I got:
['/usr/share/tcl/tcl8.4/../', u'/usr/share/tcl/tk8.4/../']
The string containing the tk library path is a unicode one for some reason =
I=20
do not understand. I changed then the line which fills this string. It is i=
n=20
the function find_tcltk(): of setupext.py:
o.tk_lib =3D os.path.join(tk.getvar('tk_library'), '../')
I replaced it by:
o.tk_lib =3D os.path.join(str(tk.getvar('tk_library')), '../')
And that did the trick.
I really don't understand why the tcl library string is not affected by the=
=20
same problem anyway...
Emmanuel
Le Vendredi 3 Mars 2006 02:48, Antoine Latter a =C3=A9crit=C2=A0:
> I tried to build matplot lib (both 0.87 and 0.86.2) on Ubuntu Linux 5.10.=
=20
> The first set of error messages convinced me to install the Tcl and Tk dev
> packages.
>
> The second run of errors is just really weird, and I'm not sure how to fix
> it.
>
> Thanks,
> Antoine
>
>
>
> First run or errors
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> src/_tkagg.cpp:28:18: error: tk.h: No such file or directory
> src/_tkagg.cpp:36: error: ISO C++ forbids declaration of =E2=80=98Tcl_Int=
erp=E2=80=99 with
> no type
> src/_tkagg.cpp:36: error: expected =E2=80=98;=E2=80=99 before =E2=80=98*=
=E2=80=99 token
> src/_tkagg.cpp:40: error: =E2=80=98ClientData=E2=80=99 was not declared i=
n this scope
> src/_tkagg.cpp:40: error: =E2=80=98Tcl_Interp=E2=80=99 was not declared i=
n this scope
> src/_tkagg.cpp:40: error: =E2=80=98interp=E2=80=99 was not declared in th=
is scope
> src/_tkagg.cpp:41: error: expected primary-expression before =E2=80=98int=
=E2=80=99
> src/_tkagg.cpp:41: error: expected primary-expression before =E2=80=98cha=
r=E2=80=99
> src/_tkagg.cpp:41: error: initializer expression list treated as compound
> expression
> src/_tkagg.cpp:42: error: expected =E2=80=98,=E2=80=99 or =E2=80=98;=E2=
=80=99 before =E2=80=98{=E2=80=99 token
> src/_tkagg.cpp: In function =E2=80=98PyObject* _tkinit(PyObject*, PyObjec=
t*)=E2=80=99:
> src/_tkagg.cpp:176: error: =E2=80=98Tcl_Interp=E2=80=99 was not declared =
in this scope
> src/_tkagg.cpp:176: error: =E2=80=98interp=E2=80=99 was not declared in t=
his scope
> src/_tkagg.cpp:185: error: expected primary-expression before =E2=80=98)=
=E2=80=99 token
> src/_tkagg.cpp:185: error: expected `;' before =E2=80=98arg=E2=80=99
> src/_tkagg.cpp:190: error: =E2=80=98struct TkappObject=E2=80=99 has no me=
mber named
> =E2=80=98interp=E2=80=99 src/_tkagg.cpp:196: error: =E2=80=98Tcl_CmdProc=
=E2=80=99 was not declared in this
> scope src/_tkagg.cpp:196: error: expected primary-expression before =E2=
=80=98)=E2=80=99
> token src/_tkagg.cpp:197: error: =E2=80=98ClientData=E2=80=99 was not dec=
lared in this
> scope src/_tkagg.cpp:197: error: =E2=80=98Tcl_CmdDeleteProc=E2=80=99 was =
not declared in
> this scope src/_tkagg.cpp:197: error: expected primary-expression before
> =E2=80=98)=E2=80=99 token src/_tkagg.cpp:197: error: =E2=80=98Tcl_CreateC=
ommand=E2=80=99 was not declared
> in this scope ./CXX/Extensions.hxx: In constructor
> =E2=80=98Py::PythonExtension<T>::PythonExtension() [with T =3D BufferRegi=
on]=E2=80=99:
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
>
>
> Second run of errors
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> g++ -pthread -shared build/temp.linux-i686-2.4/src/_tkagg.o
> build/temp.linux-i686-2.4/CXX/cxx_extensions.o
> build/temp.linux-i686-2.4/CXX/cxxsupport.o
> build/temp.linux-i686-2.4/CXX/IndirectPythonInterface.o
> build/temp.linux-i686-2.4/CXX/cxxextensions.o -L/usr/lib/tcl8.4/../ - L /=
 u
> s r / l i b / t k 8 . 4 / . . / -L/usr/local/lib -L/usr/local/lib -ltk8.4
> -ltcl8.4 -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o
> build/lib.linux-i686-2.4/matplotlib/backends/_tkagg.so
> g++: L: No such file or directory
> g++: u: No such file or directory
> g++: s: No such file or directory
> g++: r: No such file or directory
> g++: l: No such file or directory
> g++: i: No such file or directory
> g++: b: No such file or directory
> g++: t: No such file or directory
> g++: k: No such file or directory
> g++: 8: No such file or directory
> g++: 4: No such file or directory
> g++: -E or -x required when input is from standard input
> g++: L: No such file or directory
> g++: u: No such file or directory
> g++: s: No such file or directory
> g++: r: No such file or directory
> g++: l: No such file or directory
> g++: i: No such file or directory
> g++: b: No such file or directory
> g++: t: No such file or directory
> g++: k: No such file or directory
> g++: 8: No such file or directory
> g++: 4: No such file or directory
> g++: -E or -x required when input is from standard input
> error: Command "g++ -pthread -shared build/temp.linux-i686-2.4/src/_tkagg=
=2Eo
> build/temp.linux-i686-2.4/CXX/cxx_extensions.o
> build/temp.linux-i686-2.4/CXX/cxxsupport.o
> build/temp.linux-i686-2.4/CXX/IndirectPythonInterface.o
> build/temp.linux-i686-2.4/CXX/cxxextensions.o -L/usr/lib/tcl8.4/../ - L /=
 u
> s r / l i b / t k 8 . 4 / . . / -L/usr/local/lib -L/usr/local/lib -ltk8.4
> -ltcl8.4 -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o
> build/lib.linux-i686-2.4/matplotlib/backends/_tkagg.so" failed with exit
> status 1
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting langua=
ge
> that extends applications into web and mobile media. Attend the live
> webcast and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=110944&bid1720ドル&dat=121642
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
=2D-=20
Emmanuel P=C3=A9contal
CRAL - Observatoire de Lyon
9, Av. Charles Andre
=46-69561 Saint Genis Laval Cedex
tel (33) (0)4.78.86.83.76 - fax (33) (0)4.78.86.83.86
email : pec...@ob...
~
From: Robert K. <rob...@gm...> - 2006年03月03日 01:57:49
Antoine Latter wrote:
> I tried to build matplot lib (both 0.87 and 0.86.2) on Ubuntu Linux 5.10. The 
> first set of error messages convinced me to install the Tcl and Tk dev 
> packages.
> 
> The second run of errors is just really weird, and I'm not sure how to fix it.
> Second run of errors
> ===============
> g++ -pthread -shared build/temp.linux-i686-2.4/src/_tkagg.o 
> build/temp.linux-i686-2.4/CXX/cxx_extensions.o 
> build/temp.linux-i686-2.4/CXX/cxxsupport.o 
> build/temp.linux-i686-2.4/CXX/IndirectPythonInterface.o 
> build/temp.linux-i686-2.4/CXX/cxxextensions.o -L/usr/lib/tcl8.4/../ - L / u s 
> r / l i b / t k 8 . 4 / . . / -L/usr/local/lib -L/usr/local/lib -ltk8.4 
> -ltcl8.4 -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o 
> build/lib.linux-i686-2.4/matplotlib/backends/_tkagg.so
> g++: L: No such file or directory
> g++: u: No such file or directory
> g++: s: No such file or directory
> g++: r: No such file or directory
> g++: l: No such file or directory
> g++: i: No such file or directory
> g++: b: No such file or directory
> g++: t: No such file or directory
> g++: k: No such file or directory
> g++: 8: No such file or directory
> g++: 4: No such file or directory
> g++: -E or -x required when input is from standard input
> g++: L: No such file or directory
> g++: u: No such file or directory
> g++: s: No such file or directory
> g++: r: No such file or directory
> g++: l: No such file or directory
> g++: i: No such file or directory
> g++: b: No such file or directory
> g++: t: No such file or directory
> g++: k: No such file or directory
> g++: 8: No such file or directory
> g++: 4: No such file or directory
> g++: -E or -x required when input is from standard input
> error: Command "g++ -pthread -shared build/temp.linux-i686-2.4/src/_tkagg.o 
> build/temp.linux-i686-2.4/CXX/cxx_extensions.o 
> build/temp.linux-i686-2.4/CXX/cxxsupport.o 
> build/temp.linux-i686-2.4/CXX/IndirectPythonInterface.o 
> build/temp.linux-i686-2.4/CXX/cxxextensions.o -L/usr/lib/tcl8.4/../ - L / u s 
> r / l i b / t k 8 . 4 / . . / -L/usr/local/lib -L/usr/local/lib -ltk8.4 
> -ltcl8.4 -lpng -lz -lstdc++ -lm -lfreetype -lz -lstdc++ -lm -o 
> build/lib.linux-i686-2.4/matplotlib/backends/_tkagg.so" failed with exit 
> status 1
> ===============
Whatever you set to '/usr/lib/tk8.4/../' needs to be a list
['/usr/lib/tk8.4/../'] and not a string.
-- 
Robert Kern
rob...@gm...
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
 -- Richard Harter
5 messages has been excluded from this view by a project administrator.

Showing results of 398

<< < 1 .. 13 14 15 16 > >> (Page 15 of 16)
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 によって変換されたページ (->オリジナル) /