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




Showing results of 353

<< < 1 .. 11 12 13 14 15 > >> (Page 13 of 15)
From: Curtis C. <cu...@lp...> - 2006年02月03日 17:44:30
Darren,
Your suggestion to use afm fonts worked! It results in nice, small file
sizes and fixes the ps2pdf problem I was having.
Thanks,
Curtis
From: <and...@ti...> - 2006年02月03日 16:49:19
Hello NG,
 I have sligthly modified the two_scales.py demo, and I 
am seeing something strange. In the left y-axis I plot a sin(x) curve, 
while on the right axis I plot an exp(x) curve. In the figure, exp(x) 
reach very big values so the ticks are adjusted with a "x1e4" 
multiplier: but this multiplier should be put on the right axis (where 
exp(x) is plotted) and not on the left axis (where sin(x) is plotted). 
Does anyone know what I am doing wrong?
I attach the script at the end 
of the mail.
Thanks in advance for every suggestion.
Andrea.
from 
pylab import *
ax1 = subplot(111)
t = arange(0.01, 10.0, 0.01)
s2 = sin
(2*pi*t)
plot(t, s2, 'r.')
ylabel('sin')
# turn off the 2nd axes 
rectangle 
# with frameon kwarg
ax2 = twinx()
s1 = exp(t)
plot(t, s1, 
'b-')
xlabel('time (s)')
ylabel('exp')
show()
From: Randewijk P-J <pjr...@su...> - 2006年02月03日 13:25:51
> -----Original Message-----
> From: mat...@li...
> [mailto:mat...@li...] On=20
> Behalf Of Jouni K Seppanen
> Sent: 03 February 2006 14:23
> To: mat...@li...
> Subject: [Matplotlib-users] Re: UserWarning: Bad key=20
> "font.latex.package"
>=20
>=20
> TeX power users will want to have the option to tweak everything.
>=20
> --
> Jouni
I have been playing with a hack in texmanager.py & backend_ps.py to
include a preamble that can consist of multiple `\usepackage{}'
statements or LaTeX maros etc. just before the `\begin{document}' line,
using and additional rcParams `key':
rcParams['latex.preamble.filename']=3Dr'my_preamble.tex'
It would be a nice addition to LaTeX power users.... if there is any
interest, that is..
Peter-Jan
From: <and...@ti...> - 2006年02月03日 13:14:01
Attachments: box_on_off.jpg
Hello John & NG,
 thank you very much for your answer. It seems to 
me that using set_frame_on() just hides/shows the whole axes content. 
Probably I didn't make myself clear (sorry for my bad english). I 
attach a jpeg example of what I mean for bon on/off. The figure at the 
left if with box "off", while at the right the box is "on".
Thanks in 
advance.
Andrea.
>I didn't know matlab had such a function, but it 
looks from your
>description like it corresponds to the frame_on 
attribute of the
>axes. You can turn the axes box off with, eg
>
> ax 
= subplot(111, frame_on=False)
>
>or for an existing axes instance
>
> 
ax.set_frame_on(False)
>
>or with matlab-like handle graphics
>
> setp
(ax, frame_on=False)
>
>( you can get the current axes instance wih 
gca() )
>
>It just added a "box" wrapper function for pylab which
>does 
>
>def box(on=None):
> """
> Turn the axes box on or off 
according to 'on'
>
> If on is None, toggle state
> """
> ax = 
gca()
> if on is None:
> on = not ax.get_frame_on()
> ax.
set_frame_on(on)
> draw_if_interactive()
>
>
>which is now in CVS. 
Let me know if this has the desired behavior...
>
>JDH
>
From: Darren D. <dd...@co...> - 2006年02月03日 12:40:52
On Friday 03 February 2006 7:22 am, Jouni K Seppanen wrote:
> Darren Dale <dd...@co...> writes:
> > When you select Times as your serif font, that loads the mathptmx
> > package. Likewise, if you select palatino, the mathpazo package is
> > loaded.
>
> Wow, that's neat! If I were to buy the commercial TM Math fonts=B9 from
> Micropress, it would be useful to have some way of telling matplotlib
> to use them with Times instead of the free mathptmx. I agree that it
> is good to handle the usual case gracefully by letting the user
> specify simply "Times" instead of an obscure LaTeX package name like
> "mathptmx", but TeX power users will want to have the option to tweak
> everything.
>
> =B9 http://www.micropress-inc.com/fonts/tmmath/tmmain.htm
I don't know why anyone would want to use TM math fonts with adobe times, w=
hen=20
they could use the matching "TM text" fonts instead. For now I prefer to ke=
ep=20
it simple, and we can consider complexity if someone really needs it.
Darren
From: Jouni K S. <jk...@ik...> - 2006年02月03日 12:23:12
Darren Dale <dd...@co...> writes:
> When you select Times as your serif font, that loads the mathptmx package. 
> Likewise, if you select palatino, the mathpazo package is loaded. 
Wow, that's neat! If I were to buy the commercial TM Math fonts1 from
Micropress, it would be useful to have some way of telling matplotlib
to use them with Times instead of the free mathptmx. I agree that it
is good to handle the usual case gracefully by letting the user
specify simply "Times" instead of an obscure LaTeX package name like
"mathptmx", but TeX power users will want to have the option to tweak
everything.
1 http://www.micropress-inc.com/fonts/tmmath/tmmain.htm
-- 
Jouni
From: Darren D. <dd...@co...> - 2006年02月03日 12:11:51
On Friday 03 February 2006 7:05 am, Darren Dale wrote:
> On Friday 03 February 2006 6:47 am, Jouni K Seppanen wrote:
> > Nils Wagner <nw...@me...> writes:
> > > How can I get rid of this warnings ?
> > >
> > > UserWarning: Bad key "font.latex.package" on line 118 in
> > > /home/nwagner/.matplotlib/matplotlibrc
> > > UserWarning: Bad key "text.tex.engine" on line 127 in
> > > /home/nwagner/.matplotlib/matplotlibrc
> >
> > Remove these lines from your matplotlibrc. You're apparently using the
> > CVS version, since these rc keys have been removed since the last
> >
> > release. You should probably read the CHANGELOG file when you update:
> > | 2006年02月01日 Dropped TeX engine support in usetex to focus on LaTeX. -
> > | DSD
> > |
> > | 2006年01月29日 Improved usetex option to respect the serif, sans-serif,
> > | monospace, and cursive rc settings. Removed the font.latex.package rc
> > | setting, it is no longer required - DSD
> >
> > By the way, can the current implementation really do everything you
> > could do with font.latex.package? For example, if I want to use the
> > mathptm fonts=B9 for math, how do I specify the equivalent of
> > \usepackage{mathptmx} in matplotlibrc?
> >
> > =B9 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=3Dpsfchoice
>
> Thank you for the link. I was not familiar with it and will give it a clo=
se
> look, maybe this weekend.
>
> When you select Times as your serif font, that loads the mathptmx package.
> Likewise, if you select palatino, the mathpazo package is loaded. Here is=
 a
> link to a pdf discussing the adobe fon packages that are currently
> available, its a good reference for the usetex'ers out there. I'll add a
> link to the wiki when it is time to update it.
Sorry, here's the link
http://www.ctan.org/tex-archive/macros/latex/required/psnfss/psnfss2e.pdf=20
From: Darren D. <dd...@co...> - 2006年02月03日 12:06:15
On Friday 03 February 2006 6:47 am, Jouni K Seppanen wrote:
> Nils Wagner <nw...@me...> writes:
> > How can I get rid of this warnings ?
> >
> > UserWarning: Bad key "font.latex.package" on line 118 in
> > /home/nwagner/.matplotlib/matplotlibrc
> > UserWarning: Bad key "text.tex.engine" on line 127 in
> > /home/nwagner/.matplotlib/matplotlibrc
>
> Remove these lines from your matplotlibrc. You're apparently using the
> CVS version, since these rc keys have been removed since the last
>
> release. You should probably read the CHANGELOG file when you update:
> | 2006年02月01日 Dropped TeX engine support in usetex to focus on LaTeX. - DSD
> |
> | 2006年01月29日 Improved usetex option to respect the serif, sans-serif,
> | monospace, and cursive rc settings. Removed the font.latex.package rc
> | setting, it is no longer required - DSD
>
> By the way, can the current implementation really do everything you
> could do with font.latex.package? For example, if I want to use the
> mathptm fonts=B9 for math, how do I specify the equivalent of
> \usepackage{mathptmx} in matplotlibrc?
>
> =B9 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=3Dpsfchoice
Thank you for the link. I was not familiar with it and will give it a close=
=20
look, maybe this weekend.
When you select Times as your serif font, that loads the mathptmx package.=
=20
Likewise, if you select palatino, the mathpazo package is loaded. Here is a=
=20
link to a pdf discussing the adobe fon packages that are currently availabl=
e,=20
its a good reference for the usetex'ers out there. I'll add a link to the=20
wiki when it is time to update it.
=2D-=20
Darren S. Dale, Ph.D.
dd...@co...
From: Jouni K S. <jk...@ik...> - 2006年02月03日 11:48:34
Nils Wagner <nw...@me...> writes:
> How can I get rid of this warnings ?
>
> UserWarning: Bad key "font.latex.package" on line 118 in
> /home/nwagner/.matplotlib/matplotlibrc
> UserWarning: Bad key "text.tex.engine" on line 127 in
> /home/nwagner/.matplotlib/matplotlibrc
Remove these lines from your matplotlibrc. You're apparently using the
CVS version, since these rc keys have been removed since the last
release. You should probably read the CHANGELOG file when you update:
| 2006年02月01日 Dropped TeX engine support in usetex to focus on LaTeX. - DSD
| 
| 2006年01月29日 Improved usetex option to respect the serif, sans-serif, monospace, 
| and cursive rc settings. Removed the font.latex.package rc setting, 
| it is no longer required - DSD
By the way, can the current implementation really do everything you
could do with font.latex.package? For example, if I want to use the
mathptm fonts1 for math, how do I specify the equivalent of
\usepackage{mathptmx} in matplotlibrc?
1 http://www.tex.ac.uk/cgi-bin/texfaq2html?label=psfchoice
-- 
Jouni
From: Nils W. <nw...@me...> - 2006年02月03日 08:04:02
Hi all,
How can I get rid of this warnings ?
>>> import matplotlib
/usr/lib64/python2.4/site-packages/matplotlib/__init__.py:892:
UserWarning: Bad key "font.latex.package" on line 118 in
/home/nwagner/.matplotlib/matplotlibrc
 warnings.warn('Bad key "%s" on line %d in %s' % (key, cnt, fname))
/usr/lib64/python2.4/site-packages/matplotlib/__init__.py:892:
UserWarning: Bad key "text.tex.engine" on line 127 in
/home/nwagner/.matplotlib/matplotlibrc
 warnings.warn('Bad key "%s" on line %d in %s' % (key, cnt, fname))
>>> matplotlib.__version__
'0.86.2'
Nils
From: Curtis C. <cu...@lp...> - 2006年02月03日 05:30:41
Thanks for the feedback! It sounds like it's just a quirk of my
particular setup and will not inhibit usage of the figures in the paper.
So, I'll ignore it, since I can always print it perfectly from just the
postscript directly.
Cheers,
Curtis
 * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Curtis S. Cooper, Graduate Research Assistant *
 * Lunar and Planetary Laboratory, University of Arizona *
 * http://www.lpl.arizona.edu/~curtis/		 *
 * Kuiper Space Sciences, Rm. 318 *
 * 1629 E. University Blvd., *
 * Tucson, AZ 85721 * * * * * * * * * * * * * * *
 * Wk: (520) 621-1471 *
 * * * * * * * * * * * *
On Thu, 2 Feb 2006, Darren Dale wrote:
> Hi Curtis,
>
> I'm afraid I can't be of much help. I've printed your pdf files on two
> different computers now, one at work and one at home, without any problems.
> Maybe you have a problem with your printer driver?
>
> Darren
>
> On Tuesday 31 January 2006 2:55 pm, Curtis Cooper wrote:
> > Hi Darren,
> >
> > Thanks for your reply. I am sending you a postscript figure from my
> > upcoming Astrophysical Journal paper and the barebones Python/Pylab code
> > used to generate it.
> >
> > I do not normally use the psdistiller or usetex options. I have changed
> > my rc settings by letting numerix = numarray. Otherwise, they are the
> > same as the default in all fields.
> >
> > I am using matplotlib CVS (current as of yesterday). My operating system
> > is Debian "testing," which by default uses Python 2.3 (not 2.4). I always
> > just use Python 2.3 per the Debian default. The packages are current.
> >
> > For the paper itself, I use Latex2e (AASTEX just has Latex macros to
> > help typeset papers for ApJ). But the problem shows up when I do ps2pdf
> > on the fig.ps file as well as ps2pdf on the whole paper. So I don't think
> > that's the issue.
> >
> > I'm using GPL (not Aladdin) Ghostscript for the ps2pdf. Although fig.pdf
> > displays correctly in acroread and xpdf, it does not print correctly (when
> > I go print... in acroread 7). Using epstopdf produces the same thing: an
> > apparently fine pdf file of the figure that doesn't print properly.
> >
> > Thanks,
> > Curtis
>
> --
> Darren S. Dale, Ph.D.
> dd...@co...
>
From: Darren D. <dd...@co...> - 2006年02月03日 02:50:45
Hi Curtis,
I'm afraid I can't be of much help. I've printed your pdf files on two 
different computers now, one at work and one at home, without any problems. 
Maybe you have a problem with your printer driver?
Darren
On Tuesday 31 January 2006 2:55 pm, Curtis Cooper wrote:
> Hi Darren,
>
> Thanks for your reply. I am sending you a postscript figure from my
> upcoming Astrophysical Journal paper and the barebones Python/Pylab code
> used to generate it.
>
> I do not normally use the psdistiller or usetex options. I have changed
> my rc settings by letting numerix = numarray. Otherwise, they are the
> same as the default in all fields.
>
> I am using matplotlib CVS (current as of yesterday). My operating system
> is Debian "testing," which by default uses Python 2.3 (not 2.4). I always
> just use Python 2.3 per the Debian default. The packages are current.
>
> For the paper itself, I use Latex2e (AASTEX just has Latex macros to
> help typeset papers for ApJ). But the problem shows up when I do ps2pdf
> on the fig.ps file as well as ps2pdf on the whole paper. So I don't think
> that's the issue.
>
> I'm using GPL (not Aladdin) Ghostscript for the ps2pdf. Although fig.pdf
> displays correctly in acroread and xpdf, it does not print correctly (when
> I go print... in acroread 7). Using epstopdf produces the same thing: an
> apparently fine pdf file of the figure that doesn't print properly.
>
> Thanks,
> Curtis
-- 
Darren S. Dale, Ph.D.
dd...@co...
From: John H. <jdh...@ac...> - 2006年02月03日 02:50:32
>>>>> "Ted" == Ted Drain <ted...@jp...> writes:
 Ted> Panos, Ordinal in this context is the y values. It's not the
 Ted> length of the y array, it's the values in the array. Dates
 Ted> are days past some epoch and dates before the epoch are not
 Ted> allowed. Maybe you're getting a date value that's < 1 which
 Ted> is what is causing the problem. Are you plotting dates on
 Ted> the y axis anywhere?
Here ordinal is used in the sense of the python datetime toordinal
method, not in the ordinal / abscissa of the y / x axis. Admittendly
ambiguous. But I think your first comment is spot on: probably an
illegal ordinal value is used, eg
 import datetime
 print datetime.datetime.fromordinal(1)
 print datetime.datetime.fromordinal(0)
JDH
From: John H. <jdh...@ac...> - 2006年02月03日 02:47:28
>>>>> "Victoria" == Victoria G Laidler <la...@st...> writes:
 Victoria> Hi folks, I frequently need to make a vector plot that
 Victoria> shows (dx,dy) displacements from a set of (x,y)
 Victoria> points. "Quiver" doesn't seem to do quite what I want,
 Victoria> although maybe I just can't figure out how to use it.
There have been a few gripes about quiver...you are not alone.
 for i in range(len(x)):
 dhandle=plot([x[i],u[i]],[y[i],v[i]],'o-b',
 label='shifts [* %4.1f]'%scale)
In general, repeated calls to plot can be very inefficient since a new
matplotlib.lines.Line2D object is created each time. In cases like
these, you want to use a LineCollection or a PolygonCollection (see
matplotlib.collections). There are a number of examples in
matplotlib.axes and matplotlib.finance. Search for collections...
Thanks!
JDH
From: John H. <jdh...@ac...> - 2006年02月03日 02:45:33
>>>>> "Nils" == Nils Wagner <nw...@me...> writes:
 Nils> legend(r'u_0')
This is a typical error. legend expects you to pass a sequence of
strings, not a string (otherwise it interprets the string as a
sequence). This has nothing to do with subscripting... But we should
warn on this because it is such a common mistake. What you want is
legend((r'u_0',))
JDH
From: John H. <jdh...@ac...> - 2006年02月03日 02:42:14
>>>>> "Andrea" == Andrea Gavana <and...@ti...> writes:
 Andrea> Hello NG, I am sorry for the possible stupid
 Andrea> question. Does it make any sense to ask if it's possible
 Andrea> to define in matplotlib a Matlab-like command:
 Andrea> box on
 Andrea> or:
 Andrea> box off
 Andrea> In order to draw/undraw the axes bounding box?
I didn't know matlab had such a function, but it looks from your
description like it corresponds to the frame_on attribute of the
axes. You can turn the axes box off with, eg
 ax = subplot(111, frame_on=False)
or for an existing axes instance
 ax.set_frame_on(False)
or with matlab-like handle graphics
 setp(ax, frame_on=False)
( you can get the current axes instance wih gca() )
It just added a "box" wrapper function for pylab which
does 
def box(on=None):
 """
 Turn the axes box on or off according to 'on'
 If on is None, toggle state
 """
 ax = gca()
 if on is None:
 on = not ax.get_frame_on()
 ax.set_frame_on(on)
 draw_if_interactive()
which is now in CVS. Let me know if this has the desired behavior...
JDH
From: Jeff W. <js...@fa...> - 2006年02月02日 22:56:43
Craig Maloney wrote:
> Hi Jeff.
> On Feb 2, 2006, at 11:51 AM, Jeff Whitaker wrote:
>
>> Craig: If you export CXX=gcc, I think that error will go away. 
>> This is what the fink matplotlib package does. BTW - why don't you 
>> just "fink install matplotlib-py23" if you're using fink python?
>
>
> This helps with the previous linking error, but now it's not looking 
> for libpng the right place. (it's in /sw/lib) *argh*
>
> I'd *like* to use the fink version. I've been trying to stick mainly 
> to the 10.4-transitional binary distro. I'm a fink novice, so going 
> to src scares me as I've hosed my setup before. I guess now that I'm 
> a Mac guy (tm) -- I should probably figure it out eventually. 
Craig: It's hard to imagine how you can hose your system by installing 
a fink package from source. Don't be afraid - just type "fink 
selfupdate" then "fink install matplotlib-py23" and let me know off-list 
if you have any problems (I'm the maintainer of the fink package).
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Andrea G. <and...@ti...> - 2006年02月02日 22:22:29
Hello NG,
 I am sorry for the possible stupid question. Does it make any sense to
ask if it's possible to define in matplotlib a Matlab-like command:
box on
or:
box off
In order to draw/undraw the axes bounding box?
Thanks in advance.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77
From: Craig M. <cma...@ki...> - 2006年02月02日 22:17:52
Hi Jeff.
On Feb 2, 2006, at 11:51 AM, Jeff Whitaker wrote:
> Craig: If you export CXX=gcc, I think that error will go away. 
> This is what the fink matplotlib package does. BTW - why don't you 
> just "fink install matplotlib-py23" if you're using fink python?
This helps with the previous linking error, but now it's not looking 
for libpng the right place. (it's in /sw/lib) *argh*
I'd *like* to use the fink version. I've been trying to stick mainly 
to the 10.4-transitional binary distro. I'm a fink novice, so going 
to src scares me as I've hosed my setup before. I guess now that I'm 
a Mac guy (tm) -- I should probably figure it out eventually. I have
-----------------
Trees: local/main stable/main stable/crypto unstable/main unstable/ 
crypto
Distribution: 10.4-transitional
-------------------
in /sw/etc/fink.conf.
Is this right?
At any rate, my problem is that when I did a: "sudo fink -b install 
matplotlib-py23" I get this:
------------------------------- sudo fink -b install matplotlib-py23 
-----------------------------
Information about 4615 packages read in 4 seconds.
Failed: Internal error: node for pango1-xft2-shlibs already exists
------------------------------------------------------------------------ 
-----------------------------------
pango1-xft2-shlibs is already installed in from the binary distro.
--------------------------------- dpkg -s pango1-xft2-shlibs 
-----------------------------------
Package: pango1-xft2-shlibs
Status: install ok installed
Section: gnome
Installed-Size: 1072
Maintainer: The Gnome Core Team <fin...@li...>
Architecture: darwin-powerpc
Source: pango1-xft2
Version: 1.6.0-1
Replaces: pango1-shlibs
Provides: pango1-shlibs
Depends: gettext, glib2-shlibs (>= 2.4.0-1), libiconv, x11-shlibs, 
xft2-shlibs, darwin (>= 8-1)
Conflicts: pango1-xft1-shlibs
Description: GTK+ - i18n text shared libraries: for XFree86 (>= 4.3)
System for layout and rendering of internationalized text.
.
Web site: http://www.pango.org
.
Maintainer: The Gnome Core Team <fin...@li...>
BuildDependsOnly: Undefined
------------------------------------------------------------------------ 
-------------------------
I guess this is now off-topic since we've cascaded into fink 
territory, but I was hoping someone might have seen this.
Thanks much,
Craig
From: Eric F. <ef...@ha...> - 2006年02月02日 20:59:10
David,
Two more things:
1) Have you considered using contourf instead of imshow, or would it be 
inappropriate?
2) Please send me the code for the X array that you used in your example.
Thanks.
Eric
David Huard wrote:
> Hi,
> 
> I want to display a cumulative distribution function (i.e. a function 
> going from 0 to 1) using a discrete colormap. That is, I want the values 
> from 0 to .1 to be mapped to one color, .1 to .2 to another color and so 
> on, so the quantiles can be seen at a glance. To do so, I tried to 
> discretize the existing color maps, for example, I tried
> bone10 = matplotlib.colors.LinearSegmentedColormap('bone10', 
> cm._bone_data, 10)
> 
> and then plotted the matrix using
> imshow(X, cmap = bone10)
....
From: Jeff W. <js...@fa...> - 2006年02月02日 19:52:23
Craig Maloney wrote:
> Hi all.
>
> I was wondering if anyone might have any idea why I might be getting 
> these build errors.
>
> ----------------------------
> building 'matplotlib._nc_transforms' extension
> g++-3.3 -L/sw/lib -bundle -undefined dynamic_lookup -L/home/maloney/ 
> lib build/temp.darwin-8.2.0-PowerMacintosh-2.3/src/_nc_transforms.o 
> build/temp.darwin-8.2.0-PowerMacintosh-2.3/src/mplutils.o build/ 
> temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/cxx_extensions.o build/ 
> temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/cxxsupport.o build/ 
> temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/IndirectPythonInterface.o 
> build/temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/cxxextensions.o -L/usr/ 
> local/lib -L/usr/lib -L/sw/lib -lstdc++ -lm -o build/lib.darwin-8.2.0- 
> PowerMacintosh-2.3/matplotlib/_nc_transforms.so
> ld: warning -L: directory name (/home/maloney/lib) does not exist
> ld: /usr/lib/gcc/darwin/3.3/libstdc++.a(stdexcept.o) malformed 
> object, illegal reference for -dynamic code (reference to a coalesced 
> section (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) 
> relocation entry (0))
> ld: /usr/lib/gcc/darwin/3.3/libstdc++.a(stdexcept.o) malformed 
> object, illegal reference for -dynamic code (reference to a coalesced 
> section (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) 
> relocation entry (4))
> error: command 'g++-3.3' failed with exit status 1
> ------------------------------------------
>
> Seems like the problem is that the setup process wants to link 
> against /usr/lib/gcc/darwin/3.3/libstdc++.
>
> I'm building with
> "python2.3 setup.py build"
>
> where python2.3 is from fink.
>
> However, somehow, it seems like the build process wants to use 
> apple's gcc "/usr/bin/g++-3.3", which in turn uses apple's ld "/usr/ 
> bin/ld".
>
> Does anyone recognize the "malformed object" error?
>
> Don't know why it's looking for libs in my home directory.
>
> Thanks much,
> Craig
Craig: If you export CXX=gcc, I think that error will go away. This is 
what the fink matplotlib package does. BTW - why don't you just "fink 
install matplotlib-py23" if you're using fink python?
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: Craig M. <cma...@ki...> - 2006年02月02日 19:43:49
Hi all.
I was wondering if anyone might have any idea why I might be getting 
these build errors.
----------------------------
building 'matplotlib._nc_transforms' extension
g++-3.3 -L/sw/lib -bundle -undefined dynamic_lookup -L/home/maloney/ 
lib build/temp.darwin-8.2.0-PowerMacintosh-2.3/src/_nc_transforms.o 
build/temp.darwin-8.2.0-PowerMacintosh-2.3/src/mplutils.o build/ 
temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/cxx_extensions.o build/ 
temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/cxxsupport.o build/ 
temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/IndirectPythonInterface.o 
build/temp.darwin-8.2.0-PowerMacintosh-2.3/CXX/cxxextensions.o -L/usr/ 
local/lib -L/usr/lib -L/sw/lib -lstdc++ -lm -o build/lib.darwin-8.2.0- 
PowerMacintosh-2.3/matplotlib/_nc_transforms.so
ld: warning -L: directory name (/home/maloney/lib) does not exist
ld: /usr/lib/gcc/darwin/3.3/libstdc++.a(stdexcept.o) malformed 
object, illegal reference for -dynamic code (reference to a coalesced 
section (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) 
relocation entry (0))
ld: /usr/lib/gcc/darwin/3.3/libstdc++.a(stdexcept.o) malformed 
object, illegal reference for -dynamic code (reference to a coalesced 
section (__TEXT,__textcoal_nt) from section (__TEXT,__eh_frame) 
relocation entry (4))
error: command 'g++-3.3' failed with exit status 1
------------------------------------------
Seems like the problem is that the setup process wants to link 
against /usr/lib/gcc/darwin/3.3/libstdc++.
I'm building with
"python2.3 setup.py build"
where python2.3 is from fink.
However, somehow, it seems like the build process wants to use 
apple's gcc "/usr/bin/g++-3.3", which in turn uses apple's ld "/usr/ 
bin/ld".
Does anyone recognize the "malformed object" error?
Don't know why it's looking for libs in my home directory.
Thanks much,
Craig
From: Eric F. <ef...@ha...> - 2006年02月02日 19:27:29
David,
It is possible that I made this discretization problem worse when I 
modified some of the color handling code. In any case, I would like to 
come up with one or more good, clean solutions, but I may need a few 
days. The problem is with the normalization (the norm kwarg), not the 
colormap, which is little more than a list of colors. The trick may be 
making sure any change in the norm code doesn't mess up the way contour 
and colorbar work.
One workaround is to calculate Xindex from X, where Xindex is an integer 
array the same size as X but containing the desired index into the 
colormap for each value of X, and then call
imshow(Xindex, cmap = bone10, norm = colors.no_norm)
I think this should work, but I haven't tried it yet.
Eric
David Huard wrote:
> Hi,
> 
> I want to display a cumulative distribution function (i.e. a function 
> going from 0 to 1) using a discrete colormap. That is, I want the values 
> from 0 to .1 to be mapped to one color, .1 to .2 to another color and so 
> on, so the quantiles can be seen at a glance. To do so, I tried to 
> discretize the existing color maps, for example, I tried
> bone10 = matplotlib.colors.LinearSegmentedColormap('bone10', 
> cm._bone_data, 10)
> 
> and then plotted the matrix using
> imshow(X, cmap = bone10)
> 
> I included a figure showing on the left what I got using the standard 
> colormap bone and on the right what I obtain using bone10. As you can 
> see, the differences are important. The whole upper part of the 
> distribution is warped by the discrete colormapping. It seems that the 
> only values that are mapped to white are the values equal to 1. I 
> figured out this must be the quantization errors that the docstrings of 
> cm.bone warns about. My question is : is this the standard way to do 
> what I want and I'm not doing it properly, or it simply isn't the "right 
> way"? Curiously, the colorbar displays the right behavior.
> 
> In short, should I define a new colormap from scratch, with anchors at 
> [0, .1, .2, ..., .9, 1.] and the colorspace explicitely defined, or is 
> there a shortcut?
> 
> Thanks in advance for advice.
> 
> David
> 
> ------------------------------------------------------------------------
> 
From: David H. <dav...@gm...> - 2006年02月02日 19:18:55
Hi,
I posted a problem on the list earlier that didn't seem to make it to the
list. Anyway, It gave me time to solve my problem and the result is this
function that takes as input a .cpt file (a palette file format) and return=
s
a colormap dictionnary.
It can return a continuous or discrete colormap (provided the input palette
is itself discrete) and symetric/asymetric colormap.
Have fun !
David
# cpt_reader
# Read cpt palette and returns a segmented color dictionary for use in
matplotlib
# David Huard, February 2006
# dav...@gm...
from scipy.io import read_array
from scipy import zeros, linspace, shape, Float, concatenate
def cpt2seg(file_name, sym=3DFalse, discrete=3DFalse):
 """Reads a .cpt palette and returns a segmented colormap.
 sym : If True, the returned colormap contains the palette and a mirrore=
d
copy.
 For example, a blue-red-green palette would return a
blue-red-green-green-red-blue colormap.
 discrete : If true, the returned colormap has a fixed number of uniform
colors.
 That is, colors are not interpolated to form a continuous range.
 Example :
 >>> _palette_data =3D cpt2seg('palette.cpt')
 >>> palette =3D matplotlib.colors.LinearSegmentedColormap('palette',
_palette_data, 100)
 >>> imshow(X, cmap=3Dpalette)
 """
 dic =3D {}
 f =3D open(file_name, 'r')
 rgb =3D read_array(f)
 rgb =3D rgb/255.
 s =3D shape(rgb)
 colors =3D ['red', 'green', 'blue']
 for c in colors:
 i =3D colors.index(c)
 x =3D rgb[:, i+1]
 if discrete:
 if sym:
 dic[c] =3D zeros((2*s[0]+1, 3), dtype=3DFloat)
 dic[c][:,0] =3D linspace(0,1,2*s[0]+1)
 vec =3D concatenate((x ,x[::-1]))
 else:
 dic[c] =3D zeros((s[0]+1, 3), dtype=3DFloat)
 dic[c][:,0] =3D linspace(0,1,s[0]+1)
 vec =3D x
 dic[c][1:, 1] =3D vec
 dic[c][:-1,2] =3D vec
 else:
 if sym:
 dic[c] =3D zeros((2*s[0], 3), dtype=3DFloat)
 dic[c][:,0] =3D linspace(0,1,2*s[0])
 vec =3D concatenate((x ,x[::-1]))
 else:
 dic[c] =3D zeros((s[0], 3), dtype=3DFloat)
 dic[c][:,0] =3D linspace(0,1,s[0])
 vec =3D x
 dic[c][:, 1] =3D vec
 dic[c][:, 2] =3D vec
 return dic
From: Darren D. <dd...@co...> - 2006年02月02日 17:01:20
On Thursday 02 February 2006 11:06, Robert Hetland wrote:
> It appears that the recent CVS versions *require* verbose.level and
> verbose.fileo to be set in the rc file, as per the lines (923-930)
> matplotlib/__init__.py:
>
> if i == 1:
> key = 'verbose.level'
> val, line, cnt = rc_temp.pop(key)
> elif i == 2:
> key = 'verbose.fileo'
> val, line, cnt = rc_temp.pop(key)
> else:
> key, (val, line, cnt) = rc_temp.popitem()
>
> What's wrong with letting the default values slide through?
I needed to validate the verbose settings first, so reports could be generated 
during the rest of the validation process. I hadn't considered that rc files 
might not include these settings. Thanks for the report, it's fixed in cvs.
Darren
5 messages has been excluded from this view by a project administrator.

Showing results of 353

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