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
(13) |
2
(11) |
3
|
4
(9) |
|
5
(3) |
6
(17) |
7
(24) |
8
(11) |
9
(26) |
10
(19) |
11
(4) |
|
12
(4) |
13
(14) |
14
(9) |
15
(5) |
16
(18) |
17
(23) |
18
(3) |
|
19
(1) |
20
(7) |
21
(27) |
22
(26) |
23
(6) |
24
(17) |
25
(1) |
|
26
|
27
(7) |
28
(1) |
29
(4) |
30
(5) |
|
|
|
From: Christopher B. <Chr...@no...> - 2006-11-22 17:48:23
|
One more note: Christopher Barker wrote: > I wonder if you had installed 6.3.8 yourself. If you did, it really should have been put in /usr/local/ somewhere -- then you wouldn't risk conflicts with Apple's version. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Jeff W. <js...@fa...> - 2006-11-22 16:45:30
|
Christopher Barker wrote: > Tony Mannucci wrote: > >> If you saw my previous post about upgrading to XDarwin 1.1.3, and >> breaking matplotlib, the following seems to work: >> >> Soft-linking to libfreetype.6.3.8.dylib rather than >> libfreetype.6.3.dylib (see below, copied from previous email). >> > > That's interesting. I don't have a 6.3.8, only 6.3 (and 6, linked to > 6.3). I did just install the latest Apple X11 update. > Same here (intel mac with X11 1.1.3). -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 NOAA/OAR/CDC R/PSD1 FAX : (303)497-6449 325 Broadway Boulder, CO, USA 80305-3328 |
|
From: Ted D. <ted...@jp...> - 2006-11-22 16:32:57
|
John,
One small note - we've been bitten in the past by doing:
x != 0
This assumes a numeric (int/float) quantity. If someone substitutes
a different type that looks like a number, this will most likely
fail. Python has a __nonzero__ method which can be used by calling
'not' or 'bool()':
not x == ! bool( x )
All the numeric types implement this correctly (i.e. like a test for
x == 0). Of course, I haven't been following this conversion so I'm
not sure this applies here...
Ted
At 06:08 AM 11/22/2006, John Hunter wrote:
> >>>>> "Robert" == Robert Cimrman <cim...@nt...> writes:
>
>
> Robert> BTW would you consider changing the definition of spy(2)
> Robert> as shown below, so that one could specify what 'to be a
> Robert> zero' means?
>
>I added these enhancement, and a couple more, and an
>examples/spy_demos.py.
>
>On reflection, it might be better to allow the user to simply pass a
>sparsity function rather than a precision
>
>def not_zero(Z):
> return Z!=0.
>
>class not_near_zero:
> def __init__(self, precision):
> self.precision = precision
> def __call__(self, Z):
> return absolute(asarray(Z))>self.precision
>
>def spy(Z, element=not_zero):
> mask = element(Z)
>
>Then you could do:
>
>spy(Z, issparse=not_near_zero(1e-6))
>
>
>
>The precision implementation you suggested is in svn, but if there is
>any consensus that either of these approaches is better, speak up.
>
>JDH
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys - and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>Matplotlib-users mailing list
>Mat...@li...
>https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Christopher B. <Chr...@no...> - 2006-11-22 15:53:55
|
Tony Mannucci wrote: > If you saw my previous post about upgrading to XDarwin 1.1.3, and > breaking matplotlib, the following seems to work: > > Soft-linking to libfreetype.6.3.8.dylib rather than > libfreetype.6.3.dylib (see below, copied from previous email). That's interesting. I don't have a 6.3.8, only 6.3 (and 6, linked to 6.3). I did just install the latest Apple X11 update. Also, in the past, MPL has been know not to work with Apple's X11 libfreetype. I wonder if you had installed 6.3.8 yourself. That would have explained it, in that usually if you install, for instance, 6.3.8, there would be a link from 6.3 to 6.3.8, which may have been what you linked to originally. Then, if Apple provided a new 6.3 with their X11, it overwrote yours. I do note that your 6.3.8 is MUCH larger than 6.3, which is a bit curious. Anyway, most of us end up linking MPL statically against a self-installed libfreetype, just for these reasons. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chr...@no... |
|
From: Robert C. <cim...@nt...> - 2006-11-22 14:18:01
|
John Hunter wrote: >>>>>> "Robert" == Robert Cimrman <cim...@nt...> writes: > > > Robert> BTW would you consider changing the definition of spy(2) > Robert> as shown below, so that one could specify what 'to be a > Robert> zero' means? > > I added these enhancement, and a couple more, and an > examples/spy_demos.py. > > On reflection, it might be better to allow the user to simply pass a > sparsity function rather than a precision > > def not_zero(Z): > return Z!=0. > > class not_near_zero: > def __init__(self, precision): > self.precision = precision > def __call__(self, Z): > return absolute(asarray(Z))>self.precision > > def spy(Z, element=not_zero): > mask = element(Z) > > Then you could do: > > spy(Z, issparse=not_near_zero(1e-6)) > > > > The precision implementation you suggested is in svn, but if there is > any consensus that either of these approaches is better, speak up. I was thinking about passing directly a function (or an expression?) too. But I would not remove the precision argument, since it's usage is simpler, and is usually all one needs. The best would be to have both possibilities :) (function, if present, taking precedence?) r. |
|
From: John H. <jdh...@ac...> - 2006-11-22 14:13:44
|
>>>>> "Stephen" == Stephen George <ste...@op...> writes:
Stephen> Have a lot of data, and when looking at full view I'd
Stephen> like no markers, but when zoom in to see individual
Stephen> points I'd like to place markers on the graph. Planing
Stephen> on attaching some code to events to toggle markers on my
Stephen> line. Is there a way to change the markers a line uses
Stephen> after it has been plotted, or do I have to clear the plot
Stephen> and replot?
Here is some example code that changes the marker style based on zoom
level. I wrote the example initially to show how to clip data from a
line based on zoom, but it also changes the marker style based on
number of points in the view window
"""
Clip a line according to the current xlimits, and change the marker
style when zoomed in
"""
from matplotlib.lines import Line2D
import matplotlib.numerix as nx
from pylab import figure, show
class ClippedLine(Line2D):
"""
Clip the xlimits to the axes view limits -- this example assumes x is sorted
"""
def __init__(self, ax, *args, **kwargs):
Line2D.__init__(self, *args, **kwargs)
self.ax = ax
def set_data(self, *args, **kwargs):
Line2D.set_data(self, *args, **kwargs)
self.xorig = nx.array(self._x)
self.yorig = nx.array(self._y)
def draw(self, renderer):
xlim = self.ax.get_xlim()
ind0, ind1 = nx.searchsorted(self.xorig, xlim)
self._x = self.xorig[ind0:ind1]
self._y = self.yorig[ind0:ind1]
N = len(self._x)
if N<1000:
self._marker = 's'
self._linestyle = '-'
else:
self._marker = None
self._linestyle = '-'
Line2D.draw(self, renderer)
fig = figure()
ax = fig.add_subplot(111, autoscale_on=False)
t = nx.arange(0.0, 100.0, 0.01)
s = nx.sin(2*nx.pi*t)
line = ClippedLine(ax, t, s, color='g', ls='-', lw=2)
ax.add_line(line)
ax.set_xlim(10,30)
ax.set_ylim(-1.1,1.1)
show()
|
|
From: John H. <jdh...@ac...> - 2006-11-22 14:08:49
|
>>>>> "Robert" == Robert Cimrman <cim...@nt...> writes:
Robert> BTW would you consider changing the definition of spy(2)
Robert> as shown below, so that one could specify what 'to be a
Robert> zero' means?
I added these enhancement, and a couple more, and an
examples/spy_demos.py.
On reflection, it might be better to allow the user to simply pass a
sparsity function rather than a precision
def not_zero(Z):
return Z!=0.
class not_near_zero:
def __init__(self, precision):
self.precision = precision
def __call__(self, Z):
return absolute(asarray(Z))>self.precision
def spy(Z, element=not_zero):
mask = element(Z)
Then you could do:
spy(Z, issparse=not_near_zero(1e-6))
The precision implementation you suggested is in svn, but if there is
any consensus that either of these approaches is better, speak up.
JDH
|
|
From: Christian K. <ck...@ho...> - 2006-11-22 13:20:33
|
Darren Dale <dd55@...> writes: > We tried supporting sans-serif ticklabels with usetex a while back, and it > turned out to be a headache. I'll have a look at cmbright, but no promises. Thanks. Btw., I didn't know about cmbright before looking at this problem. It seems to be part of most tex distributions, e.g. tetex, miktex. Christian |
|
From: Darren D. <dd...@co...> - 2006-11-22 11:26:19
|
On Wednesday 22 November 2006 3:27 am, Christian Kristukat wrote:
> I am unable to get sans-serif tick labels with matplotlib 0.87.5 in tex
> text mode. I tried with some hints from the list archive but had no
> success. So I had a look at the tex-files which are created to render the
> tick labels, which look like this:
>
> \documentclass{article}
> \usepackage{type1cm}
> \renewcommand{\rmdefault}{pnc}
> \usepackage{helvet}
> \usepackage{courier}
> \usepackage{textcomp}
> \usepackage[papersize={72in,72in}, body={70in,70in},
> margin={1in,1in}]{geometry}
> \pagestyle{empty}
> \begin{document}
> \fontsize{16.000000}{20.000000}{\sffamily $80$}
> \end{document}
>
> According to the psnfss doc, the package helvet does not affect the font in
> math mode. So I don't see why a tick label '$80$' should be rendered in
> sans-serif.
Right, most fonts do not provide sans-serif math-mode fonts. And the
ticklabels are always rendered in math mode, such that minus signs are
rendered as minus signs (and not hyphens). That may seem like a minor issue,
but having hyphens for minus signs on a linear x-axis and regular minus signs
on a log y-axis doesnt look professional.
> I experimented with texmanager.py and added a
> \usepackage{cmbright}, which introduces sans-serif fonts in math mode,
> and was able to display sans-serif tick labels on screen but the ps-backend
> failed with a segfault(!).
>
> I simply added an element to the font_info dict in texmanager.py:
>
> 'cmbright' : ('cmbr', r'\usepackage{cmbright}'),
>
> and added 'CMBright' to the list of sans-serif fonts in my .matplotlibrc
>
> It would be nice if some tex-expert could have a look at this or tell me
> what I could do to get sans-serif tick labels.
We tried supporting sans-serif ticklabels with usetex a while back, and it
turned out to be a headache. I'll have a look at cmbright, but no promises.
Darren
|
|
From: Christian K. <ck...@ho...> - 2006-11-22 08:27:23
|
I am unable to get sans-serif tick labels with matplotlib 0.87.5 in tex
text mode. I tried with some hints from the list archive but had no success.
So I had a look at the tex-files which are created to render the tick labels,
which look like this:
\documentclass{article}
\usepackage{type1cm}
\renewcommand{\rmdefault}{pnc}
\usepackage{helvet}
\usepackage{courier}
\usepackage{textcomp}
\usepackage[papersize={72in,72in}, body={70in,70in},
margin={1in,1in}]{geometry}
\pagestyle{empty}
\begin{document}
\fontsize{16.000000}{20.000000}{\sffamily $80$}
\end{document}
According to the psnfss doc, the package helvet does not affect the font in
math mode. So I don't see why a tick label '$80$' should be rendered in
sans-serif. I experimented with texmanager.py and added a
\usepackage{cmbright}, which introduces sans-serif fonts in math mode,
and was able to display sans-serif tick labels on screen but the ps-backend
failed with a segfault(!).
I simply added an element to the font_info dict in texmanager.py:
'cmbright' : ('cmbr', r'\usepackage{cmbright}'),
and added 'CMBright' to the list of sans-serif fonts in my .matplotlibrc
It would be nice if some tex-expert could have a look at this or tell me what
I could do to get sans-serif tick labels.
Christian
|
|
From: Robert C. <cim...@nt...> - 2006-11-22 07:52:26
|
John Hunter wrote:
>>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
>
> Eric> Yes, it should be !=0. The purpose is to show how sparse a
> Eric> matrix is--how much is filled with zeros--by displaying the
> Eric> non-zero entries.
>
> OK I fixed it. Thanks.
Thanks!
BTW would you consider changing the definition of spy(2) as shown below,
so that one could specify what 'to be a zero' means?
r.
def spy(self, Z, precision = None, marker='s', markersize=10, **kwargs):
if hasattr(Z, 'tocoo'):
c = Z.tocoo()
if precision is None:
x = c.row
y = c.col
z = c.data
else:
ii = where( abs( c.data ) > precision )[0]
x = c.row[ii]
y = c.col[ii]
z = c.data[ii]
else:
if precision is None:
x,y,z = matplotlib.mlab.get_xyz_where(Z, Z != 0)
else:
x,y,z = matplotlib.mlab.get_xyz_where(Z, abs( Z ) > precision)
return self.plot(x+0.5,y+0.5, linestyle='None',
marker=marker,markersize=markersize, **kwargs)
|
|
From: Richard J. <soy...@tb...> - 2006-11-22 06:50:57
|
I have been trying the 3D matplotlib examples in http://www.scipy.org/Cookbook/Matplotlib/mplot3D using ipython as follows: python -pylab -p scipy import matplotlib.axes3d as ax3d u=r_[0:2*pi:100j] v=r_[0:2*pi:100j] x=10*outer(cos(u),sin(v)) y=10*outer(sin(u),sin(v)) z=10*outer(ones(size(u)),cos(v)) a=ravel(x) b=ravel(y) c=ravel(z) fig=figure() ax=ax3d.Axes3D(fig) This works fine for ax.plot_wireframe(x,y,z) and ax.scatter3D(a,b,c) but when I try ax.plot3D(a,b,c) the following errors appear: x.plot3D(a,b,c) --------------------------------------------------------------------------- exceptions.TypeError Traceback (most recent call last) /home/rj/<ipython console> /usr/lib/python2.3/site-packages/matplotlib/axes3d.py in plot3D(self, xs, ys, zs, *args, **kwargs) 488 def plot3D(self, xs, ys, zs, *args, **kwargs): 489 had_data = self.has_data() --> 490 lines = Axes.plot(self, xs,ys, *args, **kwargs) 491 if len(lines)==1: 492 line = lines[0] /usr/lib/python2.3/site-packages/matplotlib/axes.py in plot(self, *args, **kwargs) 2129 lines = [line for line in lines] # consume the generator 2130 -> 2131 self.autoscale_view(scalex=scalex, scaley=scaley) 2132 return lines 2133 TypeError: autoscale_view() got an unexpected keyword argument 'scalex' Also, moving the mouse into the blank figure window gives many errors like: File "/usr/lib/python2.3/site-packages/matplotlib/proj3d.py", line 243, in proj_trans_points return proj_transform(xs,ys,zs,M) File "/usr/lib/python2.3/site-packages/matplotlib/proj3d.py", line 226, in proj_transform return proj_transform_vec(vec,M) File "/usr/lib/python2.3/site-packages/matplotlib/proj3d.py", line 185, in proj_transform_vec vecw = nx.matrixmultiply(M,vec) TypeError: unsupported operand type(s) for *: 'NoneType' and 'float' I am using Scientific Linux 4.4 i386 Scipy(with ATLAS) & numpy from svn, rev. 2292 & 3375 respectively MatPlotLib 87.7 Any ideas about what is going on? Thanks RJ |
|
From: Pierre GM <pgm...@gm...> - 2006-11-22 04:22:45
|
On Tuesday 21 November 2006 22:09, Stephen George wrote:
> Thank you Pierre,
>
> I've taken a while to get around to it, but this code worked a treat,
> and taught me a little about how I can override things in matplotlib
Glad you found it useful.
playing some more about it, I realized that there could be some improvement
with small values between 0.001 and 1: the following modifications should
take care of that:
def _set_orderOfMagnitude(self, mrange):
"""Sets the order of margnitude."""
locs = N.absolute(self.locs)
if self.offset:
oom = math.floor(math.log10(mrange))
else:
if locs[0] > locs[-1]:
val = locs[0]
else:
val = locs[-1]
if val == 0:
oom = 0
else:
oom = math.floor(math.log10(val))
if oom <= -3:
self.orderOfMagnitude = 3*(oom//3)
elif oom <= -1:
self.orderOfMagnitude = -3
elif oom >= 4:
self.orderOfMagnitude = 3*(oom//3)
else:
self.orderOfMagnitude = 0
|
|
From: Stephen G. <ste...@op...> - 2006-11-22 03:09:36
|
Thank you Pierre,
I've taken a while to get around to it, but this code worked a treat,
and taught me a little about how I can override things in matplotlib
Thanks
Steve
Pierre GM wrote:
>> One thing I cannot work out is the axis number presentation.
>> Cannot find any documentation about how to control the presentation of
>> the axis number.
>>
>
> Poke around ticker.formatter
>
>
>> However I would prefer it would present in enginering notation (10, 100,
>> 1e3, 10e3, 100e3, 1e6, 10e6 ...etc)
>>
>
> The easiest is to define your own formatter. Please try the solution below.
> You can use it as:
> gca().xaxis.set_major_formatter(EngrFormatter(3))
>
> #####
> -------------------------------------------------------------------------
> #---- --- Formatters ---
> #####
> -------------------------------------------------------------------------
> class EngrFormatter(ScalarFormatter):
> """A variation of the standard ScalarFormatter, using only multiples of
> three
> in the mantissa. A fixed number of decimals can be displayed with the optional
> parameter `ndec` . If `ndec` is None (default), the number of decimals is
> defined
> from the current ticks.
> """
> def __init__(self, ndec=None, useOffset=True, useMathText=False):
> ScalarFormatter.__init__(self, useOffset, useMathText)
> if ndec is None or ndec < 0:
> self.format = None
> elif ndec == 0:
> self.format = "%d"
> else:
> self.format = "%%1.%if" % ndec
> #........................
> def _set_orderOfMagnitude(self, mrange):
> """Sets the order of margnitude."""
> ScalarFormatter._set_orderOfMagnitude(self, mrange)
> self.orderOfMagnitude = 3*(self.orderOfMagnitude//3)
> #........................
> def _set_format(self):
> """Sets the format string to format all ticklabels."""
> # set the format string to format all the ticklabels
> locs = (N.array(self.locs)-self.offset) /
> 10**self.orderOfMagnitude+1e-15
> sigfigs = [len(str('%1.3f'% loc).split('.')[1].rstrip('0')) \
> for loc in locs]
> sigfigs.sort()
> if self.format is None:
> self.format = '%1.' + str(sigfigs[-1]) + 'f'
> if self._usetex or self._useMathText: self.format = '$%s$'%self.format
>
>
|
|
From: Stephen G. <ste...@op...> - 2006-11-22 03:07:14
|
Have a lot of data, and when looking at full view I'd like no markers, but when zoom in to see individual points I'd like to place markers on the graph. Planing on attaching some code to events to toggle markers on my line. Is there a way to change the markers a line uses after it has been plotted, or do I have to clear the plot and replot? Any suggestions appreciated Thanks Steve |
|
From: Tony M. <Ton...@jp...> - 2006-11-22 00:35:25
|
If you saw my previous post about upgrading to XDarwin 1.1.3, and breaking matplotlib, the following seems to work: Soft-linking to libfreetype.6.3.8.dylib rather than libfreetype.6.3.dylib (see below, copied from previous email). Thanks for that Apple! -Tony > >>> import numpy as N >>>> N.__version__ >'0.9.6' >>>> import matplotlib >>>> matplotlib.__version__ >'0.87.2' >>>> import pylab as PLT >Traceback (most recent call last): > File "<stdin>", line 1, in ? > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py", >line 1, in ? > from matplotlib.pylab import * > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py", >line 200, in ? > from axes import Axes, PolarAxes > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py", >line 15, in ? > from axis import XAxis, YAxis > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py", >line 25, in ? > from font_manager import FontProperties > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/font_manager.py", >line 39, in ? > from matplotlib import ft2font >ImportError: Failure linking new module: >/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so: >Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib > Referenced from: >/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so > Reason: Incompatible library version: ft2font.so requires version >10.0.0 or later, but libfreetype.6.dylib provides version 6.3.0 I note that in /usr/X11R6/lib that softlinks to the libraries mentioned above were recently changed: >/usr/X11R6/lib >jplajm:8:lib $ ll libfree* >-rwxr-xr-x 1 root wheel 1786588 Apr 28 2006 libfreetype.6.3.8.dylib >-rw-r--r-- 1 root wheel 683560 Nov 6 17:31 libfreetype.6.3.dylib >lrwxr-xr-x 1 root wheel 21 Nov 21 09:07 libfreetype.6.dylib >-> libfreetype.6.3.dylib >-rw-r--r-- 1 root wheel 1907688 Apr 28 2006 libfreetype.a >lrwxr-xr-x 1 root wheel 21 Nov 21 09:07 libfreetype.dylib >-> libfreetype.6.3.dylib >-rwxr-xr-x 1 root wheel 836 Apr 28 2006 libfreetype.la -- Tony Mannucci Supervisor, Ionospheric and Atmospheric Remote Sensing Group Mail-Stop 138-308, Tel > (818) 354-1699 Jet Propulsion Laboratory, Fax > (818) 393-5115 California Institute of Technology, Email > Ton...@jp... 4800 Oak Grove Drive, http://genesis.jpl.nasa.gov Pasadena, CA 91109 |
|
From: Tony M. <Ton...@jp...> - 2006-11-22 00:03:42
|
Using an automatic update, I upgraded my Darwin X server to X11 1.1.3. Now my matplotlib installation is broken (see below). Do I need to re-install everything? I am worried about incompatibilities between numpy, matplotlib and scipy. I've been reading about this in the email lists, and so I've wanted to keep my versions stable. Can anyone recommend binaries that work with my python version and gcc? >Python 2.4.1 (#2, Mar 31 2005, 00:05:10) >[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin I am staying away from fink and MacPorts (Darwinports). I installed these earlier either with binary packages or from source. I had a great system working! Thanks for your help. On another note, my entire system is now broken. The computer runs dog slow. I looked at the logs on the mac and noticed the following (not sure it is relevant): >XFree86 Version 4.4.0 / X Window System >(protocol Version 11, revision 0, vendor release 6600) >[DRI] screen 0 installation complete >Screen 0 added: 1920x1200 @ (0,0) >Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, >removing from list! More info below. -Tony > >>> import numpy as N >>>> N.__version__ >'0.9.6' >>>> import matplotlib >>>> matplotlib.__version__ >'0.87.2' >>>> import pylab as PLT >Traceback (most recent call last): > File "<stdin>", line 1, in ? > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/pylab.py", >line 1, in ? > from matplotlib.pylab import * > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/pylab.py", >line 200, in ? > from axes import Axes, PolarAxes > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axes.py", >line 15, in ? > from axis import XAxis, YAxis > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/axis.py", >line 25, in ? > from font_manager import FontProperties > File >"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/font_manager.py", >line 39, in ? > from matplotlib import ft2font >ImportError: Failure linking new module: >/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so: >Library not loaded: /usr/X11R6/lib/libfreetype.6.dylib > Referenced from: >/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/matplotlib/ft2font.so > Reason: Incompatible library version: ft2font.so requires version >10.0.0 or later, but libfreetype.6.dylib provides version 6.3.0 I note that in /usr/X11R6/lib that softlinks to the libraries mentioned above were recently changed: >/usr/X11R6/lib >jplajm:8:lib $ ll libfree* >-rwxr-xr-x 1 root wheel 1786588 Apr 28 2006 libfreetype.6.3.8.dylib >-rw-r--r-- 1 root wheel 683560 Nov 6 17:31 libfreetype.6.3.dylib >lrwxr-xr-x 1 root wheel 21 Nov 21 09:07 libfreetype.6.dylib >-> libfreetype.6.3.dylib >-rw-r--r-- 1 root wheel 1907688 Apr 28 2006 libfreetype.a >lrwxr-xr-x 1 root wheel 21 Nov 21 09:07 libfreetype.dylib >-> libfreetype.6.3.dylib >-rwxr-xr-x 1 root wheel 836 Apr 28 2006 libfreetype.la -- Tony Mannucci Supervisor, Ionospheric and Atmospheric Remote Sensing Group Mail-Stop 138-308, Tel > (818) 354-1699 Jet Propulsion Laboratory, Fax > (818) 393-5115 California Institute of Technology, Email > Ton...@jp... 4800 Oak Grove Drive, http://genesis.jpl.nasa.gov Pasadena, CA 91109 |
|
From: pranal s. <sha...@gm...> - 2006-11-21 23:04:12
|
hey folks, is there any way in matplotlib to find aout the X-Y locations of the points plotted by markers, without using Wx-python..... pls let me know...if there is........ pranal |
|
From: John H. <jdh...@ac...> - 2006-11-21 22:09:49
|
>>>>> "Adam" == Adam Miller <am...@gr...> writes:
Adam> Hi, It is correct that the machine I'm building on does not
Adam> have X11 running, though it is installed. I can, however,
Adam> enter python and import gtk without error.
Adam> [root@localhost examples]# python Python 2.4.1 (#1, May 16
Adam> 2005, 15:15:14) [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on
Adam> linux2 Type "help", "copyright", "credits" or "license" for
Adam> more information.
>>>> import gtk
>>>>
Adam> [root@localhost examples]#
Hmm... something is fish, because the error message you printed in
your first message is triggered only by an attempt to import gtk.
Look in setup.py: here is what is happening
if BUILD_GTK:
try:
import gtk
except ImportError:
print 'GTK requires pygtk'
BUILD_GTK = 0
except RuntimeError:
print 'pygtk present but import failed'
I submit that something is different in your build environment in
which you triggered the original message and the one you are testing
in now.
JDH
|
|
From: Adam M. <am...@gr...> - 2006-11-21 21:59:35
|
Hi, It is correct that the machine I'm building on does not have X11 running, though it is installed. I can, however, enter python and import gtk without error. [root@localhost examples]# python Python 2.4.1 (#1, May 16 2005, 15:15:14) [GCC 4.0.0 20050512 (Red Hat 4.0.0-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import gtk >>> [root@localhost examples]# Adam On Tue, 21 Nov 2006, John Hunter wrote: >>>>>> "Adam" == Adam Miller <am...@gr...> writes: > > Adam> Hi, I'm having a bit of troulbe getting pylab.show() to > Adam> display a figure drawn with matplotlib. > > Adam> The Test: > > Adam> python import pylab pylab.plot([0,0],[1,1]) pylab.show() > > Adam> I do not recieve an error, though I also do not see the > Adam> graph. > > Adam> FC4 x86_64 install > > Adam> python-matplotlib-debuginfo-0.87.7-2 > Adam> python-matplotlib-0.87.7-2 > > Adam> gtk2-2.6.10-2.fc4.4.i386 gtk2-2.6.10-2.fc4.4.x86_64 > Adam> gtk2-devel-2.6.10-2.fc4.4.i386 > Adam> gtk2-devel-2.6.10-2.fc4.4.x86_64 > > Adam> When I build the rpms from the srpm I see the following, > Adam> though the build continues. > > Adam> pygtk present but import failed pygtk present but import > Adam> failed > > > matplotlib build has this annoying problem that it requires an X11 > environment to build the GTK runtime code. Often if you are logged in > as su you may not have access to the X display. You need to build in > an environment in which you can do: > >> python >>>> import gtk > > Then mpl should build the gtk backend properly. What you are > currently seeing is that the GTK build is failing which is why you are > getting the runtime error. > > JDH > |
|
From: John H. <jdh...@ac...> - 2006-11-21 21:42:53
|
>>>>> "Adam" == Adam Miller <am...@gr...> writes:
Adam> Hi, I'm having a bit of troulbe getting pylab.show() to
Adam> display a figure drawn with matplotlib.
Adam> The Test:
Adam> python import pylab pylab.plot([0,0],[1,1]) pylab.show()
Adam> I do not recieve an error, though I also do not see the
Adam> graph.
Adam> FC4 x86_64 install
Adam> python-matplotlib-debuginfo-0.87.7-2
Adam> python-matplotlib-0.87.7-2
Adam> gtk2-2.6.10-2.fc4.4.i386 gtk2-2.6.10-2.fc4.4.x86_64
Adam> gtk2-devel-2.6.10-2.fc4.4.i386
Adam> gtk2-devel-2.6.10-2.fc4.4.x86_64
Adam> When I build the rpms from the srpm I see the following,
Adam> though the build continues.
Adam> pygtk present but import failed pygtk present but import
Adam> failed
matplotlib build has this annoying problem that it requires an X11
environment to build the GTK runtime code. Often if you are logged in
as su you may not have access to the X display. You need to build in
an environment in which you can do:
> python
>>> import gtk
Then mpl should build the gtk backend properly. What you are
currently seeing is that the GTK build is failing which is why you are
getting the runtime error.
JDH
|
|
From: Adam M. <am...@gr...> - 2006-11-21 21:37:32
|
Hi, I'm having a bit of troulbe getting pylab.show() to display a figure drawn with matplotlib. The Test: python import pylab pylab.plot([0,0],[1,1]) pylab.show() I do not recieve an error, though I also do not see the graph. FC4 x86_64 install python-matplotlib-debuginfo-0.87.7-2 python-matplotlib-0.87.7-2 gtk2-2.6.10-2.fc4.4.i386 gtk2-2.6.10-2.fc4.4.x86_64 gtk2-devel-2.6.10-2.fc4.4.i386 gtk2-devel-2.6.10-2.fc4.4.x86_64 When I build the rpms from the srpm I see the following, though the build continues. pygtk present but import failed pygtk present but import failed In /usr/src/redhat/BUILD/matplotlib-0.87.7/examples I run 'python subplot_demo.py -dGTKAgg' and get 'ImportError: No module named _ns_backend_gdk' Am I missing something? Thanks! Adam Miller |
|
From: John H. <jdh...@ac...> - 2006-11-21 21:27:28
|
>>>>> "Eric" == Eric Firing <ef...@ha...> writes:
Eric> Anyone who has not done such a compilation is likely to run
Eric> into missing devel packages (because they don't get
Eric> installed by default), but installing them using synaptic or
Eric> apt-get should be easy, and a matter of only a few minutes.
Eric> (It might help if we had a list of exactly which packages
Eric> are needed--has anyone compiled this? Any volunteers for a
Eric> wiki entry, if there isn't one already?)
Here is the starter list which I made from a redhat distro a couple of
years ago -- much of this is probably still accurate but should be
updated by distro and wiki-ized
* matplotlib core: zlib, zlib-devel, libpng, libpng-devel,
freetype, freetype-devel, freetype-utils
* gtk/gtkagg backend: gtk2-devel, gtk+-devel, pygtk2, glib-devel,
pygtk2-devel, gnome-libs-devel, pygtk2-libglade
* tk backend: tcl, tk, tkinter
* wx/wxagg backends - the wxpython rpms from wxpython
For example, I think the tcl/tk need to have some devel libs added.
JDH
|
|
From: Eric F. <ef...@ha...> - 2006-11-21 20:54:44
|
Josh Lifton wrote: > As I posted a couple of days ago, Ubuntu users have the following options > to avoid old versions of MPL: > > * Upgrade to the Edgy (6.10) distribution, which uses MPL 0.87.5. > Upgrading is easy, see > http://www.ubuntu.com/download/releasenotes/610?highlight=%28edgy%29%7C%28upgrade%29 (I am a happy Edgy user, but I installed from scratch.) I have read that the upgrade to Edgy may or may not go smoothly, however, depending on whether things like Automatix or EasyUbuntu were used. > > * Add a repository containing the newest MPL to your > /etc/apt/sources.list. Such a repository was announced on this list a > couple of days ago. But I seem to recall that there was a problem with this--the dependencies did not take care of making sure that compatible versions of numeric libraries were installed, meaning the ones against which the new mpl package was compiled. > > * Compile MPL from source off the SVN repository. Or from the latest tarball, which might be slightly easier and more stable, but misses the very latest changes. Anyone who has not done such a compilation is likely to run into missing devel packages (because they don't get installed by default), but installing them using synaptic or apt-get should be easy, and a matter of only a few minutes. (It might help if we had a list of exactly which packages are needed--has anyone compiled this? Any volunteers for a wiki entry, if there isn't one already?) Anyone wanting to use wxPython will run into the long-standing missing-headers-bug: https://launchpad.net/distros/ubuntu/+source/wxwidgets2.6/+bug/2887 but it is easy to fix, as described in the link. (There is a typo in step 3 of the workaround: 2.6.3.2 should be 2.6.3.3.) Don't bother unless you really want wx, though. > > Cheers, > Josh |
|
From: John H. <jdh...@ac...> - 2006-11-21 19:29:32
|
>>>>> "Samuel" == Samuel M Smith <sm...@sa...> writes:
Samuel> I figured it out. It is saving the outside edge as
Samuel> transparent not gray. I was viewing the images in Apple's
Samuel> preview and it displays transparent as gray (not
Samuel> checkerboard like photoshop or graphic converter).
I still don't understand where the transparency is coming from (unless
you are setting the alpha explicitly somewhere else). In the example
output I posted previously, the 4th entry in the image RGBAs is 1,
indicating that the alpha channel is 1, fully opaque.
JDH
|