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
|
From: matthew a. <ma...@ca...> - 2004-03-05 06:01:12
|
On Thu, 4 Mar 2004, matthew arnison wrote: > * if I savefig('file.eps') from the TkAgg backend, the EPS file is sized > to something much bigger than A4 (but it still works fine from the GTK > backend) I've just found I've had similar problems saving EPS figures from the GTK backend of matplotlib 0.51 too. Plus TkAgg doesn't like it if you close a plot using the window close box (not the X in the toolbar): [I have TkAgg as my default backend in ~/.matplotlibrc and interactive set to True] $ python Python 2.2.2 (#1, Feb 24 2003, 19:13:11) [GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib.matlab import * >>> x = arange(0.0, 3.14, 0.01) >>> plot(x, sin(x)) [<matplotlib.lines.Line2D instance at 0x84143b4>] ... click on window close button (not toolbar close button) ... >>> plot(x, sin(x)) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.2/site-packages/matplotlib/matlab.py", line 788, in plot draw_if_interactive() File "/usr/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py", line 46, in draw_if_interactive figManager.show() File "/usr/lib/python2.2/site-packages/matplotlib/backends/backend_tkagg.py", line 121, in show self.window.deiconify() File "/usr/lib/python2.2/lib-tk/Tkinter.py", line 1343, in wm_deiconify return self.tk.call('wm', 'deiconify', self._w) TclError: can't invoke "wm" command: application has been destroyed m. |
From: matthew a. <ma...@ca...> - 2004-03-05 05:07:16
|
Hi Now that we have the lovely new syntax for setting legend labels for each line: plot(x, sin(x), label='sin(x)') plot(x, cos(x), label='cos(x)') how do we then move the legend from the default upper right location? legend() turns the legend on, but the LOC argument has to be second or third, after the LINES and/or LABELS. What about a new loc keyword for legend? E.g. legend(loc=5) While we're talking about problems inherited from matlab's use of positional arguments, is there some easy way to set the x or y axis limits without setting the other axis? E.g. if I want to leave the x axis automatic, but manually set the y axis? I looked at help(axis) and at http://matplotlib.sourceforge.net/matlab_commands.html and I couldn't see anything obvious like xaxis or yaxis functions. This works: autoaxis = axis() autoaxis[2:4] = (ymin, ymax) axis(autoaxis) but what if I add a plot afterwards that changes the x axis limits? And it seems like hard work compared to: yaxis(ymin, ymax) Cheers, Matthew. |
From: John H. <jdh...@ac...> - 2004-03-04 21:12:42
|
>>>>> "Arnold" == Arnold Moene <arn...@wu...> writes: Arnold> unsupported operand type(s) for /: 'array' and 'float' This is a known bug with older versions of Numeric (eg 22.0) combined with "from __future__ import division". It also affects current versions of numarray. If you upgrade to the latest Numeric it will go away. I try and code around it; in this case I forgot. I'll add the parens. Arnold> PS: the mathtext-option was a very pleasant surprise to me Arnold> (hadn't seen any discussion on it on the mailing list). Glad to hear it - there was some discussion on the matplotlib-devel list. I'm sure you'll encounter strangeness and some parse errors since it is not widely tested, so please alert me when you do (check the KNOWN ISSUES section of http://matplotlib.sourceforge.net/matplotlib.mathtext.html). JDH |
From: Arnold M. <arn...@wu...> - 2004-03-04 08:31:52
|
Hi all, I encountered a strange error (which I now remember was there already in version 0.50). When I run (for example) the mathtext_demo.py, I get the following error: <error> File "/usr/lib/python2.3/site-packages/matplotlib/backends/backend_gtk.py", line 504, in points_to_pixels return points*PIXELS_PER_INCH/72.0*self.dpi.get()/72.0 TypeError: unsupported operand type(s) for /: 'array' and 'float' </error> When I replace that line 504 with (note the parentheses) return points*(PIXELS_PER_INCH/72.0*self.dpi.get()/72.0) python is happy. I don't understand why python doesn't like the present construct. Possibly an odd combination of versions: -> Python 2.3 (#2, Aug 31 2003, 17:27:29) [GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2 -> Numeric 22.0 -> scipy cvs_version = (1,196,1591,4120) Cheers, Arnold PS: the mathtext-option was a very pleasant surprise to me (hadn't seen any discussion on it on the mailing list). |
From: matthew a. <ma...@ca...> - 2004-03-04 06:11:37
|
Well that was one juicy update! I was just trying to figure out how to speed up the completer in interactive.py (which adds a noticable lag to the prompt if len(locals()) gets to 3000 like it does for me) when I noticed this new release. TkAgg allows me to use the default python in interactive mode, which allows me to use rlcompleter, *and* have matplotlib plots pop up without losing the prompt. Which is all lovely. A couple of issues I noticed with TkAgg: * fontTools installed one of its files (FontTools.pth I think) without read permission for normal users, which cause import fontTools to fail mysteriously * fontTools didn't find my TTF fonts because the extensions were TTF instead of ttf * if I savefig('file.eps') from the TkAgg backend, the EPS file is sized to something much bigger than A4 (but it still works fine from the GTK backend) * after playing around, I found that text.fontname : sans in .matplotlibrc is the only way to get reasonably nice sans serif both in TkAgg and in eps files. Otherwise I get complaints from one or the other (e.g. if I specify Arial or Helvetica). Cheers and thanks, Matthew. |
From: Sajec, M. T. <ms...@tq...> - 2004-03-04 03:34:31
|
First of all, thanks very much for matplotlib! This is a great library, and fills one of the last voids in regards to scientific python computing. On to the question, has anyone written a boxplot function yet? If so, please share the code. If not, I'll take a stab at it. Best Regards, Mike |
From: Phil E. <pj...@ha...> - 2004-03-04 00:30:31
|
Hello John, I have run into the following minor matplotlib bug. Using the sample code below, the y axis label and tick marks in the second subplot seem not to be in the right places. Also on that second subplot, the first legend is missing when the window is initially drawn, but gets redrawn correctly if I use the x axis interactive scrolling buttons. Attached to this note is a snapshot of the figure window as initially drawn showing the bugs. (I don't know whether the mailing list deals with attachments correctly, so I'm mailing you a copy directly.) The installation here is matplotlib version 0.50 running on a Redhat 9 linux box: [pje@amon site-packages]$ uname -a Linux amon 2.4.20-6smp #1 SMP Thu Feb 27 09:59:40 EST 2003 i686 i686 i386 GNU/Linux ----------------------------------------------------------------------- Code: from matplotlib.matlab import * figure(1) subplot(211) plot(rand(50),'r') plot(rand(30),'k') plot(rand(80),'g') plot(rand(70),'b') plot(rand(60),'m') plot(5 * array([1,1]), get(gca(),'ylim'), 'b') plot(15 * array([1,1]), get(gca(),'ylim'), 'b') axis([0,100,-2,2]) ylabel('Test me') title('Test me') legend(['TX Min', 'RX min', 'Pulse 1', 'Pulse 2', 'P1-P2']) subplot(212) plot(rand(50),'r') plot(rand(30),'k') plot(rand(80),'g') plot(rand(70),'b') plot(rand(60),'m') plot(5 * array([1,1]), get(gca(),'ylim'), 'b') plot(15 * array([1,1]), get(gca(),'ylim'), 'b') axis([0,100,-2,2]) ylabel('Test me') title('Test me') legend(['TX Min', 'RX min', 'Pulse 1', 'Pulse 2', 'P1-P2']) show() -- ---- Phil Erickson email: pj...@ha... Atmospheric Sciences Group WWW: http://www.haystack.mit.edu MIT Haystack Observatory voice: 781 981 5769 Westford, MA 01886 USA fax: 781 981 5766 Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x54878872 |
From: John H. <jdh...@ac...> - 2004-03-03 23:29:54
|
What's new in matplotlib 0.51 Tkinter backend Todd Miller has written a Tkinter backend. This is a significant step forward, because now matplotlib works out of the box with any python + numeric. The Tkinter backend works interactively from any python shell - see the interactive documentation. Also, because TkAgg uses the agg backend for rendering, it has all of the features of agg, including fast antialiased rendering, freetype2, alpha blending, mathtext, and so on. See http://matplotlib.sf.net/backends.html#TkAgg. To use the TkAgg backend, you must launch your scripts in interactive mode > python -i myscript.py -dTkAgg otherwise they'll just pop up and disappear. freetype2 support added for agg backend With freetype2, agg now renders fonts nicely even at very small raster sizes. math text matplotlib now ships with the BaKoMa TeX Computer Modern fonts, and displays math text using TeX expressions. See screenshot http://matplotlib.sf.net/screenshots.html#mathtext_demo and the mathtext documentation http://matplotlib.sf.net/matplotlib.mathtext.html for usage information. Currently available on GTK, Agg, TkAgg and GTKAgg. If you build matplotlib yourself, you need to edit setup.py and set BUILD_FT2FONT configuration file A configuration file is placed in your install path (distutils.sysconfig.PREFIX + 'share/matplotlib'). This determines many of the default figure properties: the default backend, line properties, text properties, colors, and more. See http://matplotlib.sf.net/.matplotlibrc for an example configuration file and details. Place this in your home dir (linux and friends), or edit in the install path (windows). numarray support Todd Miller has provided a numerix module http://matplotlib.sf.net/matplotlib.numerix.html which allows you to choose between Numeric of numarray. You can set Numeric or numarray in your matplotlibrc file, with an environment variable, or from the prompt. See the numerix module for more information and numarray issues http://matplotlib.sf.net/NUMARRAY_ISSUES for a summary of known issues in using numarray. data clipping off by default Data clipping, as opposed to viewport clipping, is turned off by default. You can change the default behavior in .matplotlibrc or set it to be true when needed as in examples/stock_demo.py kwargs in plot commands The plot commands now take kwargs that are can be used to set line properties (any property that has a set_* method). You can use this to set a line label (for auto legends), linewidth, anitialising, marker face color, etc. Here is an example: plot([1,2,3], [1,2,3], 'go-', label='line 1', linewidth=2) plot([1,2,3], [1,4,9], 'rs', label='line 2') axis([0, 4, 0, 10]) legend() Bugfixes and minor improvements * GTK : fixed a subplot selection GUI bug specific to python2.2 * GTK : fixed a text layout bug * ALL : Fixed a multiple column subplot layout bug * PS : Fixed an afm parser - thanks Dominique * Agg : Agg now respects antialiased=False Download: http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474&release_id=221304 |
From: John H. <jdh...@ac...> - 2004-03-03 17:57:45
|
>>>>> "Phil" == Phil Erickson <pj...@ha...> writes: Phil> Hello John, I have run into the following minor matplotlib Phil> bug. Using the sample code below, the y axis label and tick Phil> marks in the second subplot seem not to be in the right Phil> places. Also on that second subplot, the first legend is Phil> missing when the window is initially drawn, but gets redrawn Phil> correctly if I use the x axis interactive scrolling buttons. Hi Phil, Wow, that was a subtle one. Thanks very much for a detailed description, screenshot and demo code. You can distill the essence of the bug in this script from matplotlib.matlab import * subplot(211) plot([1,2,3]) ylabel('Test me') subplot(212) plot([1,2,3]) ylabel('Test me') show() The key observation is that this script exposes the bug, but examples/subplot_demo.py does not. I found that if I commented out the first ylabel the bug also disappeared. This led me to the solution. I cache font instances in many of the backends since font creation and drawing can be expensive, particularly on the GTK backend for vertical text where I have to do the rotation by hand, pixel-by-pixel in python. In the cache I map text properties to font instances in a dictionary. As one of the properties, I was using the x, and y coords of the text in *user* rather than *display* coords, so the second ylabel was using the cached information of the first. In the case of the ylabels, the user coords are relative to their respective axes, and so are identical for identical labels. The same explanation applies to the legend code because the legends had duplicate text. A simple fix. In matplotlib.text.py, on or around line 118 replace get_prop_tup with def get_prop_tup(self): """ Return a hashable tuple of properties Not intended to be human readable, but useful for backends who want to cache derived information about text (eg layouts) and need to know if the text has changed """ x, y = self.get_xy_display() return (x, y, self._text, self._color, self._verticalalignment, self._horizontalalignment, self._fontname, self._fontsize, self._fontweight, self._fontangle, self._rotation, self.dpi.get()) The key is to use the display coords for the cache value. Thanks again, JDH |
From: Phil E. <pj...@ha...> - 2004-03-03 16:11:46
|
John Hunter wrote: >>>>>>"Phil" == Phil Erickson <pj...@ha...> writes: > > > Phil> Hi all, I am really enjoying working with matplotlib and > Phil> hats off to an excellent effort. > > Phil> I have done a cursory search of the mailing list archives > Phil> but didn't find the answer to a practical question that I > Phil> ran into in MATLAB all the time (which is where I'm coming > Phil> from in terms of familiarity). > > Phil> Suppose I have an array to plot, and I want to exclude > Phil> certain points from being plotted. In MATLAB, I would set > Phil> the y vector points I wanted excluded to "NaN" and then the > Phil> plot routine would draw connected lines up to the point > Phil> before the excluded one, skip the bad/not wanted point, and > Phil> then continue drawing lines beginning at the next point. > > Phil> How does one accomplish that using matplotlib? This > Phil> actually comes up quite often in our radar work here, in > Phil> cases where we are making log plots of vectors which may > Phil> contain zeros. > > What matplotlib currently does is simply ignore non-positive data with > an approach along the lines of > > ind = nonzero(y > 0) > validy = take(y, ind) > > Just to make sure I'm understanding you properly, that's not a good > solution for you because you want to the gap in the connected line > where the complex (y<=0) points are. Is this right? That's right. In our field, we often have data sets which have to be culled before plotting for points which might fail some sanity test like excessive variance, etc. I'm sure other science data sets have a similar requirement. For ease of use, I would definitely not want to have to break up my plot task into multiple lines myself by segmenting the incoming data, but rather have the method do it based on some signal value in the data. In fact, the plots that I was trying to make were of a quantity which needs to be expressed in dB, which is 10 * log10(y) So the problem is actually a bit more general, in that just calling semilogy() would make a plot of log10(y) which is not quite the same. For my needs, I have been using plot(x, 10 * ProtectedLog(y)) where: def ProtectedLog(a): "Calculate log10() but protect against non-positives." zeroIndex = find(a <= 0.0) b = array(a) for index in zeroIndex: # ideally we would use whatever value will # signal a non-plotted point; 1e-30 is # non-optimal b[index] = 1e-30 c = log10(b) return c Therefore, both plot() and semilogy() would have to pay attention to a special signal value. > > What you describe is certainly possible but would impose a performance > hit that depends on the number of separate connected lines that had to > be constructed. Eg, semilogy could find the non-positive indices and > create the line segments appropriately. Indeed, but your line drawing functions seem to be fast enough that maybe this isn't an issue. > > As for NaN, I'm not an expert here. As far as I understand, there is > no support for it in Numeric but there is in numarray. Look for basic > numarray support in the next release. All our code uses Numeric, so we have inertia working against us :) NaN is for me just a value that I know MATLAB pays attention to when plotting. If you had another way to put a value in, I could use that and all would be well. Unfortunately, it seems Python has some trouble with IEEE standard values such as positive/negative infinity and NaNs. There seems to be a pure Python package which would handle IEEE 754 standard NaN values at http://www.analytics.washington.edu/Zope/projects/fpconst/ which perhaps might be a way to go. The author has also made a request that this functionality be included in further Python releases. cheers, -- ---- Phil Erickson email: pj...@ha... Atmospheric Sciences Group WWW: http://www.haystack.mit.edu MIT Haystack Observatory voice: 781 981 5769 Westford, MA 01886 USA fax: 781 981 5766 Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x54878872 |
From: John H. <jdh...@ac...> - 2004-03-03 15:43:25
|
>>>>> "Phil" == Phil Erickson <pj...@ha...> writes: Phil> Hi all, I am really enjoying working with matplotlib and Phil> hats off to an excellent effort. Phil> I have done a cursory search of the mailing list archives Phil> but didn't find the answer to a practical question that I Phil> ran into in MATLAB all the time (which is where I'm coming Phil> from in terms of familiarity). Phil> Suppose I have an array to plot, and I want to exclude Phil> certain points from being plotted. In MATLAB, I would set Phil> the y vector points I wanted excluded to "NaN" and then the Phil> plot routine would draw connected lines up to the point Phil> before the excluded one, skip the bad/not wanted point, and Phil> then continue drawing lines beginning at the next point. Phil> How does one accomplish that using matplotlib? This Phil> actually comes up quite often in our radar work here, in Phil> cases where we are making log plots of vectors which may Phil> contain zeros. What matplotlib currently does is simply ignore non-positive data with an approach along the lines of ind = nonzero(y > 0) validy = take(y, ind) Just to make sure I'm understanding you properly, that's not a good solution for you because you want to the gap in the connected line where the complex (y<=0) points are. Is this right? What you describe is certainly possible but would impose a performance hit that depends on the number of separate connected lines that had to be constructed. Eg, semilogy could find the non-positive indices and create the line segments appropriately. As for NaN, I'm not an expert here. As far as I understand, there is no support for it in Numeric but there is in numarray. Look for basic numarray support in the next release. JDH |
From: John H. <jdh...@ac...> - 2004-03-03 15:27:22
|
>>>>> "Kuzminski," == Kuzminski, Stefan R <SKu...@fa...> writes: Kuzminski> I tried the new Agg backend, very nice. I'm all set Kuzminski> to jettison GD altogether and go with Agg except that Kuzminski> the anti-aliased graphs that look so great, print Kuzminski> poorly.. :-( Is there a way to turn off the Kuzminski> anti-aliasing? It would be *great* to be able to drop Kuzminski> that GD dependency. agg plus/minus antialiasing is included in the next release, due out soon. Alpha version is here if you want to test. Please report any problems. http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib-0.51g.win32-py2.3.exe JDH |
From: Matt F. <mfi...@us...> - 2004-03-03 02:19:26
|
Hello, I'm trying to convert my python program that uses matplotlib to an exe using py2exe and I'm having a problem. Running >python setup.py py2exe works fine and creates files in the /dist path. However, when I run the .exe I get a runtime error (see below) Traceback (most recent call last): File "out2jpg.py", line 124, in ? File "matplotlib\matlab.pyc", line 497, in figure File "matplotlib\backends\backend_wx.pyc", line 1066, in new_figure_manager File "matplotlib\backends\backend_wx.pyc", line 1094, in __init__ File "matplotlib\backends\backend_wx.pyc", line 1320, in __init__ File "matplotlib\backends\backend_wx.pyc", line 1340, in _create_controls File "matplotlib\backends\backend_wx.pyc", line 1191, in _load_bitmap File "matplotlib\__init__.pyc", line 157, in get_data_path RuntimeError: Could not find the matplotlib data files --Matt |
From: Phil E. <pj...@ha...> - 2004-03-02 22:13:28
|
Hi all, I am really enjoying working with matplotlib and hats off to an excellent effort. I have done a cursory search of the mailing list archives but didn't find the answer to a practical question that I ran into in MATLAB all the time (which is where I'm coming from in terms of familiarity). Suppose I have an array to plot, and I want to exclude certain points from being plotted. In MATLAB, I would set the y vector points I wanted excluded to "NaN" and then the plot routine would draw connected lines up to the point before the excluded one, skip the bad/not wanted point, and then continue drawing lines beginning at the next point. How does one accomplish that using matplotlib? This actually comes up quite often in our radar work here, in cases where we are making log plots of vectors which may contain zeros. cheers, -- ---- Phil Erickson email: pj...@ha... Atmospheric Sciences Group WWW: http://www.haystack.mit.edu MIT Haystack Observatory voice: 781 981 5769 Westford, MA 01886 USA fax: 781 981 5766 Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x54878872 |
From: John H. <jdh...@ac...> - 2004-03-02 15:57:59
|
>>>>> "Dominique" == Dominique Orban <do...@da...> writes: Dominique> Allright thanks. In Linux, i can compile the new Dominique> matplotlib with gcc 3.3. I notice the same problem Dominique> with fontTools. This time i do have a FontTools.pth in Dominique> my source directory, but it isn't copied to Dominique> /whatever/python2.3/site-packages when i run python Dominique> setup.py install. Just copy the file to site-packages. This problem is fixed in CVS but with Paul's new font finder hopefully it will soon be a non-issue. Dominique> Now it doesn't find _backend_agg. Sorry to be bugging Dominique> you with all these minor annoyances. No problem - I want to fix these problems as soon as possible so keep them coming. Did you edit setup.py? You need to set the flags BUILD_AGG and BUILD_FONTTOOLS. If this doesn't do it for you, please post compile errors or tracebacks. Dominique> Also i notice the 'afm' problem i reported earlier with Dominique> the PS backend hasn't been fixed. Did you receive my Dominique> little fix? Thanks for the reminder - it had slipped too low in the pile and I forgot about it. It's in now. JDH |
From: Paul B. <ba...@st...> - 2004-03-02 15:18:59
|
John Hunter wrote: > > ttfquery and FontTools are packages to enable cross platform > font-finding. I am very interested in factoring out this dependency > since it complicates installation (as you are seeing). [ Perry, if > anyone in your group is still interested in this, there is a > reasonably well documented example in cvs examples/ftface_props.py > that shows how to access all the relevant freetype attributes (family > name, is italics, etc) using the matplotlib.ft2face module ] Hi John, I'm currently working on a replacment for FontTools. I hope to have something out in the next day or so. -- Paul -- Paul Barrett, PhD Space Telescope Science Institute Phone: 410-338-4475 ESS/Science Software Branch FAX: 410-338-4767 Baltimore, MD 21218 |
From: Dominique O. <do...@da...> - 2004-03-02 15:10:30
|
* On Tue, 02 Mar 2004, John Hunter wrote: > > >>>>> "Dominique" == Dominique Orban <do...@da...> writes: > > Dominique> I don't have it actually. It is on neither of my > Dominique> Windows installs. Can i just create it? > > OK, this is a bug in the windows installer - fixed for next release. > Yes, just create it. Allright thanks. In Linux, i can compile the new matplotlib with gcc 3.3. I notice the same problem with fontTools. This time i do have a FontTools.pth in my source directory, but it isn't copied to /whatever/python2.3/site-packages when i run python setup.py install. Now it doesn't find _backend_agg. Sorry to be bugging you with all these minor annoyances. Also i notice the 'afm' problem i reported earlier with the PS backend hasn't been fixed. Did you receive my little fix? Dominique |
From: John H. <jdh...@ac...> - 2004-03-02 14:56:24
|
>>>>> "Dominique" == Dominique Orban <do...@da...> writes: Dominique> I don't have it actually. It is on neither of my Dominique> Windows installs. Can i just create it? OK, this is a bug in the windows installer - fixed for next release. Yes, just create it. Dominique> I haven't seen any other user complain about Dominique> this. Could this come from an upgrade of matplotlib? Dominique> During the upgrade, it seems to be backing up stuff but Dominique> who knows what it is doing exactly. Well, you would only notice it if 1) you haven't installed FontTools before 2) you are using windows 3) you are trying to use on of the FontTools dependent backends (Agg, GD) and 4) you are kind enough to report the problem. Dominique> The font.cache is in site-packages/ttfquery, i presume Dominique> this is correct? After you fix the FontTools.pth problem erase this file and it will be automagically recreated by ttfquery. JDH |
From: Dominique O. <do...@da...> - 2004-03-02 14:00:05
|
* On Tue, 02 Mar 2004, John Hunter wrote: > Critically, you should also have > c:\Python23\Lib\site-packages\FontTools.pth. I am pretty certain it > is in the windows installer. This file should contain one line, which > reads simply > > FontTools > > If you don't have it I would like to know! I don't have it actually. It is on neither of my Windows installs. Can i just create it? I haven't seen any other user complain about this. Could this come from an upgrade of matplotlib? During the upgrade, it seems to be backing up stuff but who knows what it is doing exactly. > All of this is consistent with a missing FontTools.pth. ttfquery will > try and load each windows font, but catches all exceptions and > continues. So you'll get an exception *for each font* the first time > you load ttfquery if something is wrong with your install. After you > have fixed fontools, be sure to remove site-packages/font.cache so > ttfquery can regenerate the font cache. The font.cache is in site-packages/ttfquery, i presume this is correct? > Agg is a pure image backend - ie, it only produces image output. In > the next release of matplotlib (this week) there will are 2 GUI > backends that use agg for rendering GtkAgg and TkAgg, both of which > are compiled into the windows installer. Great! Thanks much, Dominique |
From: Dominique O. <do...@da...> - 2004-03-02 13:50:52
|
* On Tue, 02 Mar 2004, John Hunter wrote: > > >>>>> "Dominique" == Dominique Orban <do...@da...> writes: > > Dominique> I am in Windows 2000 and XP. I am using 0.50e in Linux, > Dominique> because i am upgrading my gcc. The newer 0.50 won't > Dominique> compile with the gcc i have now. I only get the 'None > Dominique> Active' in Linux though. I suspect it comes from my > Dominique> GTK. I am using KDE and installing Gnome libraries when > Dominique> i need them. There might be a glitch somewhere. > > Note, you can just set all the BUILD_* flags at the top of setup.py > and matplotlib won't try and compile anything. It will install all of > the pre 0.50 modules (GTK, WX, PS, etc) but you won't have access to > Agg. Yes i will try that to start with. In the end, i'll want to use Agg though, given the apparent quality of the plots. > For the record, what gcc were you using and what error message did you > get? gcc version 2.95.3 20010315 (SuSE) I wanted to try the Intel c++ compiler for Linux, but am not sure how to tell setup.py which compiler i want to use and with which options. 'python setup.py build' eventually gives gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Isrc -Iagg2/include -I/usr/include/freetype1 -I/usr/local/include/python2.3 -c src/_backend_agg.cpp -o build/temp.linux-i686-2.3/src/_backend_agg.o In file included from /usr/local/include/python2.3/Python.h:8, from src/_backend_agg.h:40, from src/_backend_agg.cpp:8: /usr/local/include/python2.3/pyconfig.h:847: warning: `_POSIX_C_SOURCE' redefined /usr/include/features.h:171: warning: this is the location of the previous definition src/_backend_agg.cpp:286: multiple storage classes in declaration of `RendererAgg_Type' error: command 'gcc' failed with exit status 1 Many thanks for the help. Dominique |
From: John H. <jdh...@ac...> - 2004-03-02 13:22:58
|
>>>>> "Dominique" == Dominique Orban <do...@da...> writes: Dominique> I am in Windows 2000 and XP. I am using 0.50e in Linux, Dominique> because i am upgrading my gcc. The newer 0.50 won't Dominique> compile with the gcc i have now. I only get the 'None Dominique> Active' in Linux though. I suspect it comes from my Dominique> GTK. I am using KDE and installing Gnome libraries when Dominique> i need them. There might be a glitch somewhere. Note, you can just set all the BUILD_* flags at the top of setup.py and matplotlib won't try and compile anything. It will install all of the pre 0.50 modules (GTK, WX, PS, etc) but you won't have access to Agg. For the record, what gcc were you using and what error message did you get? Thanks, JDH |
From: John H. <jdh...@ac...> - 2004-03-02 13:19:08
|
>>>>> "Dominique" == Dominique Orban <do...@da...> writes: Dominique> Just wanted to signal some path issues with the current Dominique> Windows installer. I have looked in the mailing list, Dominique> but haven't seen anyone having the same problem. Dominique> In both Windows 2000 and XP, installation of Matplotlib Dominique> 0.50 results in the following directory hierarchy in my Dominique> main Python directory c:\Python23\Lib\site-packages Dominique> (Enthought Edition): Dominique> FontTools/ fontTools/ sstruct.py ttLib/ Critically, you should also have c:\Python23\Lib\site-packages\FontTools.pth. I am pretty certain it is in the windows installer. This file should contain one line, which reads simply FontTools If you don't have it I would like to know! ttfquery and FontTools are packages to enable cross platform font-finding. I am very interested in factoring out this dependency since it complicates installation (as you are seeing). [ Perry, if anyone in your group is still interested in this, there is a reasonably well documented example in cvs examples/ftface_props.py that shows how to access all the relevant freetype attributes (family name, is italics, etc) using the matplotlib.ft2face module ] Dominique> it says it cannot import 'fontTools' (lowercase f, Dominique> uppercase T). Changing the name of the top directory Dominique> (FontTools) to 'fontTools' doesn't solve it of course, Dominique> since what it is looking for is the innermost Dominique> one. Hence i must move the 'fontTools' directory one Dominique> level up. Next, it can import ttLib, scans my TTFPATH, Dominique> but breaks down (after litterally one zillion messages) Dominique> saying that 'module' has no attribute 'SFNTReader'. It Dominique> is in fact trying to import sfnt and is stuck in the Dominique> __init__() of Class TTFont. Drastically reducing my Dominique> TTFPATH, i see that the error is in fact coming from Dominique> the fact that it cannot import module 'sstruct' in Dominique> sfnt.py. All of this is consistent with a missing FontTools.pth. ttfquery will try and load each windows font, but catches all exceptions and continues. So you'll get an exception *for each font* the first time you load ttfquery if something is wrong with your install. After you have fixed fontools, be sure to remove site-packages/font.cache so ttfquery can regenerate the font cache. Dominique> That stuns me. A 'from fontTools import sstruct' would Dominique> do. How comes Python isn't looking recursively into Dominique> directories? I guess moving everything to the top level Dominique> isn't a good idea. Also, still in sfnt.py, the 'import Dominique> struct' works, but i have no clue where it finds this Dominique> one; a search was unsuccessful. Anyhow, including Dominique> 'c:\Python23\fontTools' into the PYTHONPATH solves it Dominique> but i thought directories would be parsed recursively. Dominique> Also, can you only use savefig() with the Agg backend? Dominique> show() isn't popping any window. Agg is a pure image backend - ie, it only produces image output. In the next release of matplotlib (this week) there will are 2 GUI backends that use agg for rendering GtkAgg and TkAgg, both of which are compiled into the windows installer. Dominique> As they told me to at SuSE, i'm having a lot of fun. You mean battling the hairy windows beast? JDH |
From: Jean-Baptiste C. <Jea...@de...> - 2004-03-02 10:09:12
|
S=E6l=20 Thanks for the detailed answerS I will try to go one step further for the u= nclear question. I hope this will help other users too :) > - I want to systematically disable the vertical zoom/move on the > second subplot, but not the first. How can I do that ? >=20 > Well, when the menu is working properly that is how you do it. By > "systematically", do you mean by default so it's disabled when the > plot comes up? >=20 > If so, this depends on how you are building your GUI window. > Basically you need to get your hands on the gtk.Toolbar instance, > which contains an omenu (gtk.OptionMenu) attribute (wait until the > next release, a couple of days, where I've cleaned this up a bit). > Eg, if you are using the matlab interface >=20 > manager =3D get_current_fig_manager() > items =3D manager.toolbar.omenuItems > items[-1].set_active(False) >=20 > Turns off navigation for the last subplot. items[0] would turn off > navigation for the first subplot, and so on. Indeed I meant 'by default' and you answered partially my question. I would like to disable only the veritcal zoom, not the horizontal one. Is it possible ? > - How can I activate a tooltip on top of my plots ? >=20 > You'll have to read up on gtk tooltips. Depends on what elements you > want to add tips to. Give me a little more info. DO you want to add > tips to the navigation buttons or lines on your plot or text elements > or what? I am aware of tooltips in pygtk, and I would liek to use them on the axes o= nly. As I understood those axes are included in a figure which is a DrwaingArea.= But DrawingArea do not accept tooltip easily. Did you implement a workaround to have a tooltip on the axes > - How could I add a button to directly print out the picture in the too= lbar ? >=20 > Print as in to a printer? No support for that yet and am not sure I > want to go there right now (cross platform printing would might take > lot of work). Best I can offer you currently is the savefig button. > I think gnome-print has made a fair amount of progress since I first > wrote matplotlib so if you want to be on the vanguard and explore this > option I would be happy. I used the NavigationToolbar as a GTKToolbar and added a button with the fu= nction I wanted. This solved my problem > - Is there any density plot available ? >=20 > Do you mean hist? The histogram provide a similar plot to what I want. I am currently using it, but when i zoom horizontally I can get very few an= d large bars. Therefore I would be interested in a simple curve fitted to pass through al= l the tops of histograms. This would make the picture more consistent throughout the zooming If the curve was filled it would be even better :) > - I have MANY small plots on my graph. Is there a cost effective way > to filter which plots to show ? >=20 > I don't know what this means. Wouldn't you want to show all the plots > on your figure? Why else would you put them there? Please elaborate. Within one Sublot I have thousands of small "lines" plotted. This takes tim= e to draw and show on the screen Within my software I would like to be able to filter interactively that inf= ormation according to various criteria to show only few of them In order to do that cost effectively I was wondering if matplotlib provides= an option to show/hide specific "lines" that I could turn on/off That woudl avoid me to redraw the whole picture after 1 single change Takk Kve=F0ja Jean-Baptiste --=20 ----------------------------- Jea...@de... Department of Statistics deCODE genetics Sturlugata,8 570 2993 101 Reykjav=EDk |
From: Dominique O. <do...@da...> - 2004-03-02 06:30:33
|
Just wanted to signal some path issues with the current Windows installer. I have looked in the mailing list, but haven't seen anyone having the same problem. In both Windows 2000 and XP, installation of Matplotlib 0.50 results in the following directory hierarchy in my main Python directory c:\Python23\Lib\site-packages (Enthought Edition): FontTools/ fontTools/ sstruct.py ttLib/ When i try to import the Agg backend: import matplotlib matplotlib.use( 'Agg' ) from matplotlib.matlab import * it says it cannot import 'fontTools' (lowercase f, uppercase T). Changing the name of the top directory (FontTools) to 'fontTools' doesn't solve it of course, since what it is looking for is the innermost one. Hence i must move the 'fontTools' directory one level up. Next, it can import ttLib, scans my TTFPATH, but breaks down (after litterally one zillion messages) saying that 'module' has no attribute 'SFNTReader'. It is in fact trying to import sfnt and is stuck in the __init__() of Class TTFont. Drastically reducing my TTFPATH, i see that the error is in fact coming from the fact that it cannot import module 'sstruct' in sfnt.py. That stuns me. A 'from fontTools import sstruct' would do. How comes Python isn't looking recursively into directories? I guess moving everything to the top level isn't a good idea. Also, still in sfnt.py, the 'import struct' works, but i have no clue where it finds this one; a search was unsuccessful. Anyhow, including 'c:\Python23\fontTools' into the PYTHONPATH solves it but i thought directories would be parsed recursively. Also, can you only use savefig() with the Agg backend? show() isn't popping any window. As they told me to at SuSE, i'm having a lot of fun. Dominique |
From: Dominique O. <do...@da...> - 2004-03-02 06:18:24
|
* On Mon, 01 Mar 2004, John Hunter wrote: > It looks like there is a "print" statement somewhere in your code. > It's possible that this was from a vestigial debug command I left in. > I don't get get it on my system. Are you using matplotlib-0.50? I > also don't get the "None Active" line. I am in Windows 2000 and XP. I am using 0.50e in Linux, because i am upgrading my gcc. The newer 0.50 won't compile with the gcc i have now. I only get the 'None Active' in Linux though. I suspect it comes from my GTK. I am using KDE and installing Gnome libraries when i need them. There might be a glitch somewhere. > I'm using this as a test script > > from matplotlib.matlab import * > > x = 100*rand(100000) > y = 100*rand(100000) > s = rand(100000) > > scatter(x,y,s) > #plot(x,y,'o') > show() > > Takes about 30s on my system. Note that plot with circles can be must > faster that scatter if you don't need to vary the size or color of the > symbols. I see that plot is usually faster than scatter. The script works fine with smaller data sets, and takes a pretty long time with larger sets. > There are several areas where matplotlib performance is subpar - > mostly for large numbers of patches (circles for scatter, rectangles > for pcolor). Fixing this is a fairly high priority and I have a good > idea how to go about it - see > http://sourceforge.net/mailarchive/message.php?msg_id=7142332 for a > recent discussion. I think in the next 3-4 weeks I can get this > fixed. Basically, the plan is to set up an additional backend method > or two that the various backends may optionally implement in extension > code for performance. That would be wonderful. I have never looked into the Gnuplot code but they have a fairly efficient algorithm. Plotting data sets like that i described takes less than a second on my laptop (from the Python interface). It would be great if matplotlib could do it too. > Are you using the default GTK that comes with SuSE or did you upgrade? > I have gotten myself into a world of pain before trying to upgraded > GTK libs on a linux box. It does look like you are getting some > unusual behavior. Make sure you are using the latest matplotlib and > try running the test script I posted above. If you still get the same > errors, something is whacked with your install or paths. Otherwise, > stay tuned for performance enhancements coming soon to theaters > everywhere. You can be sure i'm staying tuned. Dominique |