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
(11) |
2
(2) |
3
(2) |
4
|
5
(1) |
6
(6) |
7
(9) |
8
(5) |
9
(1) |
10
(1) |
11
(1) |
12
(7) |
13
(6) |
14
(3) |
15
(1) |
16
(10) |
17
(1) |
18
(2) |
19
(3) |
20
(14) |
21
(14) |
22
(18) |
23
(5) |
24
(5) |
25
(1) |
26
(22) |
27
(5) |
28
(21) |
29
(25) |
30
(3) |
|
From: John H. <jdh...@ac...> - 2004-04-28 21:09:24
|
>>>>> "Jos=E9" =3D=3D Jos=E9 Alexandre Nalon <na...@te...> writes: Jos=E9> Yes, it was the version I downloaded and tried. I tried the Jos=E9> simple_plot.py running, and I got the exact picture shown in Jos=E9> the homepage (the quality of the image still amazes me). The Jos=E9> window is shown without any problems, but with the figure Jos=E9> saved in a file, it results in a figure bigger than the Jos=E9> page, so the result is clipped. OK, the fix is in. For the record there were three problems that needed fixing. 1) backend_tkagg, gtkagg and wxagg were doing way to much work on a call to print_figure. All that is needed is to forward the call onto agg, which now handles ps detection itself. 2) When creating figures with the PS backend (not switching backends as in tkagg->ps) the matlab interface needed to detect this situation and override any default DPI that is set since PS is always 72. When the figures used to be coupled to the backend, this happened at the backend level. Apparently something was lost in translation. 3) Any time the figure dpi is set the new Figure.resize method needs to be called so it can update it's bounding box - not too elegant but works for now. This call forwards the resize call down to it's axes, so the axes resize commands no longer need to be made. Fortunately, all the fixes were a the python level, so you should just be able to unzip this file in your site-packages dir and be good to go http://nitace.bsd.uchicago.edu:8080/files/share/matplotlib.zip CVS is also updated. Let me know how it goes... JDH |
From: Perry G. <pe...@st...> - 2004-04-28 21:04:25
|
One more thought along this line. Perhaps it's possible for matplotlib to inspect whether or not any of the supported gui's has already been imported and make that the default. It seems like a sensible rule to me. If none are found, then all the other mechanisms apply. Perry |
From: Perry G. <pe...@st...> - 2004-04-28 21:01:47
|
> Darren> I was thinking about the first example in the tutorial. On > Darren> windows, TkAgg is the default backend, at least for the > Darren> precompiled windows version. If Idle is run with -n, the > Darren> show() command must be omitted, or the window will not > Darren> render. Interactive2.py will try to render the window and > Darren> then hang, as will pycrust. I think the first thing a > Darren> newbie to matplotlib wants to do is open their favorite > Darren> shell interface and make sure they can reproduce the first > Darren> example in the tutorial. > > Hi Darren, > > This is a problem. It may be time to look into Pearu Peterson's > gui_thread which was developed for chaco but is easily decoupled from > scipy. It would be nice if the various backends played nicely with > the various IDEs. (One for the priorities list, Perry?) > Sure. But my recollection was that gui_thread needed a lot of work (Eric Jones told me at least a month!), and it could well be that one is needed for each gui (it does mapping of gui requests from one thread to another or something like that so that a thread running the mainloop allows the python interactive loop to run separately. It would be nice if gui's played well with each other, but I don't know if that is easy to do (or even workable for all combinations). If someone knows how to do this sort of thing that would be great, but we don't (neither the resources or expertise). At the moment I take the position that it is simplest not to mix gui's. The current rule of thumb should be that if you want to use a shell that runs under a gui, you need the back end in matplotlib to go with that gui. I hope someone can make me a liar on that. Perry |
From: John H. <jdh...@ac...> - 2004-04-28 20:39:11
|
>>>>> "Jos=E9" =3D=3D Jos=E9 Alexandre Nalon <na...@te...> writes: Jos=E9> Yes, it was the version I downloaded and tried. I tried the Jos=E9> simple_plot.py running, and I got the exact picture shown in Jos=E9> the homepage (the quality of the image still amazes me). The Jos=E9> window is shown without any problems, but with the figure Jos=E9> saved in a file, it results in a figure bigger than the Jos=E9> page, so the result is clipped. Jos=E9> I have the EPS generated, I can send them directly to you or Jos=E9> to the list, if you want to look at them. OK, you're right. I hadn't noticed it before because my postscript viewer was showing the who figure. When I measure it the postscript figure extends beyond the 8 inches that it should if you are using the standard figsize=3D8,6. This is related to the centering 640 thing Todd noticed earlier. I'll work on a fix. JDH |
From: John H. <jdh...@ac...> - 2004-04-28 20:07:33
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> I was thinking about the first example in the tutorial. On Darren> windows, TkAgg is the default backend, at least for the Darren> precompiled windows version. If Idle is run with -n, the Darren> show() command must be omitted, or the window will not Darren> render. Interactive2.py will try to render the window and Darren> then hang, as will pycrust. I think the first thing a Darren> newbie to matplotlib wants to do is open their favorite Darren> shell interface and make sure they can reproduce the first Darren> example in the tutorial. Hi Darren, This is a problem. It may be time to look into Pearu Peterson's gui_thread which was developed for chaco but is easily decoupled from scipy. It would be nice if the various backends played nicely with the various IDEs. (One for the priorities list, Perry?) In the meantime, I've added this warning to the win32 section of the installing page Important: There are known conflicts with some of the backends with some python IDEs such as pycrust, idle. If you want to use matplotlib from an IDE, please consult the backends documentaion for compatibility information. You will have the greatest likelihood of success if you run the examples from the command shell or by double clicking on them, rather than from an IDE. If you are interactively generating plots, your best bet is TkAgg from the standard python shell. JDH |
From: <na...@te...> - 2004-04-28 20:06:28
|
Hello, Thanks for all your help! > On earlier versions of matplotlib there was a figure sizing issue when > you saved from tkagg -> postscript or eps, (...) > Are you using the latest version 0.53.1? Yes, it was the version I downloaded and tried. I tried the simple_plot.py running, and I got the exact picture shown in the homepage (the quality of the image still amazes me). The window is shown without any problems, but with the figure saved in a file, it results in a figure bigger than the page, so the result is clipped. I have the EPS generated, I can send them directly to you or to the list, if you want to look at them. --- José Alexandre Nalon na...@te... |
From: Todd M. <jm...@st...> - 2004-04-28 19:56:49
|
On Wed, 2004-04-28 at 11:50, Darren Dale wrote: > I was thinking about the first example in the tutorial. On windows, TkAgg > is the default backend, at least for the precompiled windows version. If > Idle is run with -n, the show() command must be omitted, or the window will > not render. Not in my experience. What's the command sequence you're executing? > Interactive2.py will try to render the window and then hang, I think interactive2.py is for GTK. It's a bad idea to use it with TkAgg since TkAgg is Tcl/Tk based. > as will pycrust. I think PyCrust is WxWindows based. It's also a bad idea to use with TkAgg. In general, multiple GUIs in the same process is a bad idea. > I think the first thing a newbie to matplotlib wants to do is > open their favorite shell interface and make sure they can reproduce the > first example in the tutorial. I gotta admit, shell confusion/compatibility is out of hand. For TkAgg, the only windows shells I recommend are python (not pythonwin!), idle -n, and IPython. Anything else either doesn't work or hasn't been tested. Regards, Todd |
From: John H. <jdh...@ac...> - 2004-04-28 19:41:51
|
>>>>> "Todd" == Todd Miller <jm...@st...> writes: >> * Well, here is my real problem. I need to generate EPS files >> of my pictures for use with TeX (MiKTeX). I'm having a lot of >> trouble with it (this includes problems with the GS conversion >> tool, but that is beyond the scope of this list). Basically, >> using TkAgg or the savefig method, I can generate a PS file >> with the figure. But the problem is that the figure does not >> show well - it is bigger than the generated page, so a very >> significant part of the figure is cut out. Is there anyway to >> resize the picture or tell matplotlib to fit the picture within >> specified dimensions (like some and some centimeters or inches >> height and width)? Resizing the drawing window _did_ solve the >> problem, but then I can't generate the figures by scripting - I >> would have to manually resize everyone of them. Todd> I'm not sure it's made clear anywhere, but you can generate Todd> EPS by using the extension ".ep" or ".eps". On earlier versions of matplotlib there was a figure sizing issue when you saved from tkagg -> postscript or eps, but I thought this was cleared up. Eg when I run examples/simple_plot.py with TkAgg backend and then save test.eps, I don't see any figure size issues. Are you using the latest version 0.53.1? If so can you post a test script that reproduces the eps figure size problem you describe. In the latter case I can probably fix it pronto. JDH |
From: Todd M. <jm...@st...> - 2004-04-28 19:21:01
|
On Wed, 2004-04-28 at 10:14, José Alexandre Nalon wrote: > Greetings. > > I'm new to matplotlib and to this list. I know it is a > good thing to wait a little before posting, but I need > some work done quickly, so I had to post a message as > soon as I could. I also couldn't find in the list > archives a solution to my problems, so I had to ask. > Bear with me, please. > > I must say that I'm very impressed with the overall > quality of the figures generated with matplotlib, and > the possibility to add TeX expression as labels is a > fantastic feature that I have never even thought about > (but now I can't live without). > > I had some problems though, which I report below. Some > of them I could solve (by hacking a little), others I > didn't. > > * I use TK backend, but also tried wx. They didn't work > well: in the TK backend, in interactive mode, the fi- > gure take a lot of time to be rendered, and sometimes > it does not. The same with wx. I looked into the > code of 'show' method in backend_tkagg.py, and did > some changes. The Tk.mainloop() was commented, I > uncommented it. I also changed the interactive mode > to False. By doing this, I lost the interactive > environment, but at least the figure shows quickly > when I use the 'show' command. I don't know if this > has been an issue for everyone, or if it is a problem > with compatibility with what I have installed here > (it is Python 2.3.2, Windows ME, Tk 8.4, if I'm right), > but if there is a better solution to it, I'd like to > hear. I can't look at this today but I'll try to look tomorrow. > * Also in the backend_tkagg.py there was two lines with > wrong identation. Line 181 (method show of > FigureManagerTkAgg class and line 416 (method update > of NavigationToolbar class) were not idented correctly. > I tried identing them and everything seems to be working > fine. I might have changed something that I shouldn't, > though. I got these. Thanks. > * Well, here is my real problem. I need to generate EPS > files of my pictures for use with TeX (MiKTeX). I'm > having a lot of trouble with it (this includes problems > with the GS conversion tool, but that is beyond the > scope of this list). Basically, using TkAgg or the > savefig method, I can generate a PS file with the > figure. But the problem is that the figure does not > show well - it is bigger than the generated page, so a > very significant part of the figure is cut out. Is > there anyway to resize the picture or tell matplotlib > to fit the picture within specified dimensions (like > some and some centimeters or inches height and width)? > Resizing the drawing window _did_ solve the problem, > but then I can't generate the figures by scripting - > I would have to manually resize everyone of them. I'm not sure it's made clear anywhere, but you can generate EPS by using the extension ".ep" or ".eps". Regards, Todd -- Todd Miller <jm...@st...> |
From: Darren D. <dd...@co...> - 2004-04-28 18:10:43
|
>John writes: >I still support the other backends because people still use them but >spend less energy porting all the new features to them. If someone >says "I need alpha blending on WX", I usually say "Can you use >WXAgg?", and so on. postscript is still very actively maintained >because it is in a different category and widely used for publication >and TeX. All things to all people...PS support is a big selling point. >Now I see why you were looking at >interactive2.py -- you want to embed a python shell in your >application. No, not really. I was just reading through the documentation, found interactive2, and tried it out. I like the command recall better than Idle. It would be interesting to have a matplotlib user interface, akin to the one from Matlab. If for no other reason than to make converts like myself feel familiar. For example, I still dont know how to change the working directory from inside the shell, or how to access a list of attributes for an object. >You may also want to look into VTK if you need 3D plotting, which has >nice integration with pygtk. I use this a lot in my application. I >find it amazing that you can embed an OpenGL window into a GTK widget >set wrapped by pygtk running in a python interpreter on a Microsoft >Windows OS and still get hardware acceleration! And a partridge in a pear tree. (that IS impressive!) |
From: Darren D. <dd...@co...> - 2004-04-28 16:55:23
|
Starting at line 363: console.execute_line('import matplotlib') console.execute_line("matplotlib.use('GTKAgg')") # or 'GTK'. This is the only change console.execute_line('matplotlib.interactive(1)') console.execute_line('from matplotlib.matlab import *') Otherwise, an incompatible backend will cause the plot window to hang. Darren |
From: Darren D. <dd...@co...> - 2004-04-28 15:51:01
|
I was thinking about the first example in the tutorial. On windows, TkAgg is the default backend, at least for the precompiled windows version. If Idle is run with -n, the show() command must be omitted, or the window will not render. Interactive2.py will try to render the window and then hang, as will pycrust. I think the first thing a newbie to matplotlib wants to do is open their favorite shell interface and make sure they can reproduce the first example in the tutorial. Darren Darren S. Dale dd...@co... PGP public key available |
From: <na...@te...> - 2004-04-28 14:18:58
|
Greetings. I'm new to matplotlib and to this list. I know it is a good thing to wait a little before posting, but I need some work done quickly, so I had to post a message as soon as I could. I also couldn't find in the list archives a solution to my problems, so I had to ask. Bear with me, please. I must say that I'm very impressed with the overall quality of the figures generated with matplotlib, and the possibility to add TeX expression as labels is a fantastic feature that I have never even thought about (but now I can't live without). I had some problems though, which I report below. Some of them I could solve (by hacking a little), others I didn't. * I use TK backend, but also tried wx. They didn't work well: in the TK backend, in interactive mode, the fi- gure take a lot of time to be rendered, and sometimes it does not. The same with wx. I looked into the code of 'show' method in backend_tkagg.py, and did some changes. The Tk.mainloop() was commented, I uncommented it. I also changed the interactive mode to False. By doing this, I lost the interactive environment, but at least the figure shows quickly when I use the 'show' command. I don't know if this has been an issue for everyone, or if it is a problem with compatibility with what I have installed here (it is Python 2.3.2, Windows ME, Tk 8.4, if I'm right), but if there is a better solution to it, I'd like to hear. * Also in the backend_tkagg.py there was two lines with wrong identation. Line 181 (method show of FigureManagerTkAgg class and line 416 (method update of NavigationToolbar class) were not idented correctly. I tried identing them and everything seems to be working fine. I might have changed something that I shouldn't, though. * Well, here is my real problem. I need to generate EPS files of my pictures for use with TeX (MiKTeX). I'm having a lot of trouble with it (this includes problems with the GS conversion tool, but that is beyond the scope of this list). Basically, using TkAgg or the savefig method, I can generate a PS file with the figure. But the problem is that the figure does not show well - it is bigger than the generated page, so a very significant part of the figure is cut out. Is there anyway to resize the picture or tell matplotlib to fit the picture within specified dimensions (like some and some centimeters or inches height and width)? Resizing the drawing window _did_ solve the problem, but then I can't generate the figures by scripting - I would have to manually resize everyone of them. * The EPS problem I might solve with a little hack, and generate an EPS file directly from my scripts. If this turns out to work well, I will contribute the code, of course, if the developers would want it. * Another very important thing to me is to generate the plot of discrete functions (like the Matlab 'mesh' command). Is there anyway to do that with matplotlib? If not, can I suggest it as a feature request? :) That's all for now. Thanks for the great software. --- José Alexandre Nalon na...@te... |
From: John H. <jdh...@ac...> - 2004-04-28 12:18:23
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> I was wondering why matplotlib strives to support so many Darren> backends... Accretion. In the beginning there was GTK, but being a LaTeX user, I needed a postscript output. Also, there was a lot of interest in a pure image backend that could make JPG/PNG/etc w/o having a window popup. gdmodule is a python module wrapping the very nice gd library so I wrote the gd backend to provide pure image generation (could have just as easily done PIL at this point). Around the same time, David Moore, also needing a pure image backend (gd hadn't been ported to win32 yet), stealthily developed paint, a libart backend. Meanwhile, Jeremy needed wx at work, and developed the wx backend. At this time the proliferation of backends was beginning to become a maintenance hassle, and Perry Greenfield had a bright idea: another backend! But not just any old backend, the mother of all backends, that could be used not only for pure image generation but used to render directly into the GUI canvases. GTK and WX use native GUI drawing code to render the figure, so we not only need to support not only all the widget-set related stuff, but all the drawing stuff as well. The new idea is to focus development on one high quality image backend and use this in as many areas as possible. We looked hard at libart and gd, but both had bugs that could not be fixed. Having worked with the developers of chaco, Perry suggested antigrain which is a very high quality 2D image library that I've just begun to scratch the surface of. So Agg was born and the GUI wrappers GTKAgg, TkAgg and WXAgg quickly followed suit. These 3 are the GUI backends of choice for performance, feature set, and quality. I still support the other backends because people still use them but spend less energy porting all the new features to them. If someone says "I need alpha blending on WX", I usually say "Can you use WXAgg?", and so on. postscript is still very actively maintained because it is in a different category and widely used for publication and TeX. Darren> I wrote a gui app in matlab that takes the fourier Darren> transform of a semi-infinite crystal. The point is to Darren> simulate X-ray diffraction (I work at the Cornell Darren> Synchrotron). The program is pretty good, from a science Darren> standpoint. I am considering publishing the work, but I Darren> wanted to make it open source. What's the point of doing Darren> work funded by the NSF if the public can't access it? So I Darren> am investigating rewriting the code using pygtk. I wanted Darren> something free and cross platform, and I need the Darren> vectorized matrix operations. Darren> Aside from that specific project, I am just trying to get Darren> the interactive feel of matlab. I need to take some time Darren> to look carefully through all the documentation here, it Darren> seems all of my questions have had answers published on Darren> the web. Sounds very similar to my situation. I develop a pretty complex application for EEG and medical image data analysis. I originally wrote it in matlab but became dissatisfied with the ability of matlab to easily manipulate complex data structures, work with databases, fill out CGI forms, and the like. You can do all of this in matlab using the matlab JVM stuff (and I did), but it's a pain and it's slow. I started over in python and decided on pygtk. I couldn't find a 2D plotting library I was satisfied with so wrote matplotlib around pygtk. If you need any additional encouragement, the quality of the application and the ease of extending it are dramatically better now. I develop on linux and most of the users are on win32, and have been very happy with GTK on win32. The only bug I've seen on OS X is that progress bars don't seem to work. Now I see why you were looking at interactive2.py -- you want to embed a python shell in your application. I think pygtk + matplotlib + GTKAgg + a modified interactive2.py is a good combination for you. Some features of interactive2.py are underdeveloped, such as cutting and pasting code blocks from an editor into the interpreter. You may also want to look into VTK if you need 3D plotting, which has nice integration with pygtk. I use this a lot in my application. I find it amazing that you can embed an OpenGL window into a GTK widget set wrapped by pygtk running in a python interpreter on a Microsoft Windows OS and still get hardware acceleration! JDH |
From: John H. <jdh...@ac...> - 2004-04-28 11:42:40
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> The desired size of the tickmarks depends on whether I am Darren> creating a plot for publication, or for a talk. I find Darren> that I tweak this quite a bit in Matlab, looking for the Darren> most appealing result (I started in graphic design, 10 Darren> years ago). The easiest way to set the size of the tick labels is labels = get(gca(), 'xtickabels') set(labels, 'fontsize', 12) I also end up doing the same thing, tweaking line size, font size and weight, etc, to make figures that show up nicely in small journal formats. JDH |
From: Gary R. <ga...@em...> - 2004-04-28 07:37:51
|
Hi Darren, If this is a Windows font problem as John suggests, a recent post of mine may be relevant to you. Here it is reproduced since the mailing list archive seems to have broken. It would be interesting to know whether option B also fixes your problem. If it does, can you let the list know: -- I just installed Gimp 2 for windows along with the latest GTK+ runtime and noticed that it exhibited the same font problem I've been experiencing for ages with matplotlib. I was getting WARNING **: Couldn't load font "MS Sans Serif 8" falling back to "Sans 8" errors. It's addressed in their FAQ, <http://www2.arnes.si/~sopjsimo/gimp/faq.html>, reproduced here: # I installed Gimp 2.0 on Windows 9x/ME or NT 4, and I'm getting a lot of messages saying ** (gimp-2.0.exe:4294830849): WARNING **: Couldn't load font "MS Sans Serif 8" falling back to "Sans 8". What should I do? # You have two options: * Go to Control Panel->Display properties->Apperance tab, and set all fonts to Tahoma (or any other TrueType font). * Uninstall GTK+ 2.2.4, then re-install it without the GTK-Wimp component. I took option B and now all is well with both Gimp and Matplotlib. I'm running Win98 and the Gimp FAQ entry hints that it may be a problem in Win98,ME and NT installations. It might be worth adding this to the Matplotlib faq page next to the "On windows with GTK, I'm getting lots of messages about not finding the Times font" entry. Gary -- -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Darren D. <dd...@co...> - 2004-04-28 03:39:57
|
>Unfortunately, we do not have the resources to manage every backend >across every platform. gtk, tk, wx, gd, ps, agg cross win32, osx, >linux, solaris equals 24 possible environments; multiply this by >different versions of python/gd/tk/gtk/wx and the problem gets worse. I was wondering why matplotlib strives to support so many backends... >Let me know what you are trying to do, and I >can give more targeted and appropriate advice.... I wrote a gui app in matlab that takes the fourier transform of a semi-infinite crystal. The point is to simulate X-ray diffraction (I work at the Cornell Synchrotron). The program is pretty good, from a science standpoint. I am considering publishing the work, but I wanted to make it open source. What's the point of doing work funded by the NSF if the public can't access it? So I am investigating rewriting the code using pygtk. I wanted something free and cross platform, and I need the vectorized matrix operations. Aside from that specific project, I am just trying to get the interactive feel of matlab. I need to take some time to look carefully through all the documentation here, it seems all of my questions have had answers published on the web. Darren |
From: Darren D. <dd...@co...> - 2004-04-28 02:59:10
|
John, thanks for the information, I will study these options. In Matlab, set(gca,'FontSize',12) will have at least two effects. The fontsize of the tickmark labels will be set accordingly, and the set of tickmarks will be reasonably adjusted to prevent overlapping text. If a legend exists, the fonts there will also be changed. Axes labels are not affected. For example, axes % returns empty plot, x and yrange=[0 1] set(gca,'FontSize',12) % tickmarks=[0:0.2:1] set(gca,'FontSize',8) % tickmarks=[0:0.1:1] set(gca,'FontSize',20) % tickmarks=[0:0.5:1] The desired size of the tickmarks depends on whether I am creating a plot for publication, or for a talk. I find that I tweak this quite a bit in Matlab, looking for the most appealing result (I started in graphic design, 10 years ago). Darren |
From: John H. <jdh...@ac...> - 2004-04-28 02:35:00
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> Hi All, interactive2.py, with GTK backend, is continually Darren> returning: 'Warning **: Couldnt load font "Tahoma Italic Darren> 8" falling back to "Sans Italic 8" Basically you are experiencing a win32 GTK font bug. If GTKAgg is a possibility for you, I encourage you to use it. You can do an end-run around GTK's font handling with GTKAgg. Unfortunately, we do not have the resources to manage every backend across every platform. gtk, tk, wx, gd, ps, agg cross win32, osx, linux, solaris equals 24 possible environments; multiply this by different versions of python/gd/tk/gtk/wx and the problem gets worse. Thus I encourage you and everyone to switch to TkAgg, GTKAgg or WXAgg where possible. Not only will you get the highest quality and probably fastest rendering, you'll get the latest features and the best support. The other platforms are still supported, but not as aggressively.... Darren> I found this line in interactive2.py: Darren> self.style_err.set_property( "style", pango.STYLE_ITALIC ) Darren> and checked GTK/etc/pango/pango.aliases. There is no Darren> mention of Tahoma fonts in this file. Darren> Any suggestions? The fact that it is not mentioned in your pango.aliases file is essentially the problem. When GTK tries to load a font it can't find it goes to this file to look for an alias. Try mapping it to a known good font on your system, as described in http://matplotlib.sf.net/faq.html#WINFONTS. The fact that you are using interactive2.py means you need an interactive shell. If you want interactivity from the python shell on win32, I recommend TkAgg if it is a possibility for you. Noting else comes close for interactive use from the standard python shell, particularly if you set tk.window_focus : True in your .matplotlibrc. Let me know what you are trying to do, and I can give more targeted and appropriate advice.... JDH |
From: John H. <jdh...@ac...> - 2004-04-28 02:18:25
|
>>>>> "Darren" == Darren Dale <dd...@co...> writes: Darren> Hi everyone, Is there an equivalent to the Matlab Darren> set(gca,'FontSize',12)? There is no direct way to set the font size for the current axes. Actually, I've never quite understood what that call does in matlab. If I recall correctly, it does not set *all* the axes text instances to that size; eg, I don't think it affects the tick labels. Admittedly it's been a long time, mainly because I don't use matlab much anymore :-). If you know what this command does in matlab and can explain it to me, I'm all ears! However, in matplotlib, the font sizes of all the figure elements can be controlled. The best way to do this depends on what you are trying to do. Any text command, eg text, xlabel, ylabel, title, accepts the fontsize kwarg, so you can specify the fontsize with, for example, xlabel('my label', fontsize=14) If you want more global control, at any point in a script's execution, you can set the default font properties; see examples/font_properties_demo.py in the matplotlib src distribution. If you want to change the default fontsize for all figures created in a given script/interactive session, you can set the rcParams font.size attribute on a per script bases, as described in http://matplotlib.sf.net/faq.html#CUSTOM. Finally, if you want to change the default font size globally for all figures in all scripts, you can edit your .matplotlibrc file, as described in http://matplotlib.sf.net/faq.html#MATPLOTLIBRC Hope this helps! JDH |
From: Darren D. <dd...@co...> - 2004-04-27 20:18:09
|
Hi All, interactive2.py, with GTK backend, is continually returning: 'Warning **: Couldnt load font "Tahoma Italic 8" falling back to "Sans Italic 8" I found this line in interactive2.py: self.style_err.set_property( "style", pango.STYLE_ITALIC ) and checked GTK/etc/pango/pango.aliases. There is no mention of Tahoma fonts in this file. Any suggestions? Darren |
From: Darren D. <dd...@co...> - 2004-04-27 19:40:12
|
Hi everyone, Is there an equivalent to the Matlab set(gca,'FontSize',12)? |
From: John H. <jdh...@ac...> - 2004-04-27 12:35:18
|
>>>>> "Kenneth" == Kenneth McDonald <kmm...@wi...> writes: Kenneth> I've been using matplotlib for some plotting involving Kenneth> dated values, but wasn't able to figure out how to use Kenneth> the new plot_date with log axes. (I'm still a rank newbie Very nice; I haven't used property but I can see it is very useful and I should be using it more.... For the record, you can set the scaling on the x axis to be logarithmic with ax.set_xscale('log') or set(gca(), 'xscale', 'log') Kenneth> at matplotlib.) It struck me that an integer that "knew" Kenneth> it represented seconds since the epoch would be a neat Kenneth> way of feeding matplotlib's non-date functions the values Kenneth> they expected, while at the same time manipulating dates Kenneth> in my own code; and, since I'd just done a bit of reading Kenneth> of new-style classes in Python, came up with the Kenneth> following: The other nice thing about this is that it can be used with bar, scatter, etc. and all the tick locators and formatters still work. I wrote a little example using bar just to convince myself of this :-) import datetime, time from matplotlib.ticker import MinuteLocator, DateFormatter from matplotlib.matlab import * class intdate(int): '''Subclasses int for use as dates.''' def __init__(self, ordinal): int.__init__(self, ordinal) self.__date = datetime.date.fromtimestamp(ordinal) day = property(fget=lambda self:self.__date.day) month = property(fget=lambda self:self.__date.month) year = property(fget=lambda self:self.__date.year) def isoformat(self): return self.__date.isoformat() def timetuple(self): return self.__date.timetuple() def date(self): return self.__date def epoch(x): 'convert userland datetime instance x to epoch' return time.mktime(x.timetuple()) def date(year, month, day): return intdate(epoch(datetime.date(year, month, day))) def today(): return intdate(epoch(datetime.date.today())) # simulate collecting data every minute starting at midnight t0 = date(2004,04,27) t = t0+arange(0, 2*3600, 60) # 2 hours sampled every 2 minute s = rand(len(t)) ax = subplot(111) ax.xaxis.set_major_locator( MinuteLocator(20) ) ax.xaxis.set_major_formatter( DateFormatter('%H:%M') ) ax.bar(t, s, width=60) show() Do you mind if I include these date classes and functions in matplotlib.dates? I would probably need to rename the functions to avoid clashing with other namespaces, something like epoch_to_intdate, ymd_to_intdate, today_to_intdate. Thanks! John Hunter |
From: Kenneth M. <kmm...@wi...> - 2004-04-27 07:11:51
|
I've been using matplotlib for some plotting involving dated values, but wasn't able to figure out how to use the new plot_date with log axes. (I'm still a rank newbie at matplotlib.) It struck me that an integer that "knew" it represented seconds since the epoch would be a neat way of feeding matplotlib's non-date functions the values they expected, while at the same time manipulating dates in my own code; and, since I'd just done a bit of reading of new-style classes in Python, came up with the following: import datetime, time class intdate(int): '''Subclasses int for use as dates.''' def __init__(self, ordinal): int.__init__(self, ordinal) self.__date = datetime.date.fromtimestamp(ordinal) day = property(fget=lambda self:self.__date.day) month = property(fget=lambda self:self.__date.month) year = property(fget=lambda self:self.__date.year) def isoformat(self): return self.__date.isoformat() def timetuple(self): return self.__date.timetuple() def date(self): return self.__date def epoch(x): 'convert userland datetime instance x to epoch' return time.mktime(x.timetuple()) def date(year, month, day): return intdate(epoch(datetime.date(year, month, day))) def today(): return intdate(epoch(datetime.date.today())) Use 'today' and 'date' to create intdate instances. They can be used in python wherever you would normally use an integer (I believe), but can also be treated as instances of the intdate class. They can't be used in numarry/numeric of course, and certainly aren't suited for use with large data sets, but I thought this was sorta neat, in a nasty hacky kind of way. You could of course expand the indate class; my needs were simple. It would also be simple to reimplement some of the functions so an internal instance of datetime wasn't necessary... Too bad there isn't a standard C primitive type for representing dates in some standardized numeric format, such as the epoch style. But I thought some people might find this useful and/or informative Cheers, Ken |
From: Greg W. <gr...@th...> - 2004-04-27 00:18:48
|
Hi all, I was using Red Hat 9 with matplotlib, but switched to Xandros (Debian sarge based distro) recently. I installed all the prerequisites, but setup.py died compiling tkagg. It didn't have the right include directory for tk.h. My tk.h is at /usr/include/tcl8.4/tk.h. setupext.py does the following to get the tcl include directory import Tkinter tk = Tkinter.Tk() ... o.tcl_inc = os.path.join((tk.getvar('tcl_library')), '../../include') but tk.getvar('tcl_library') gives '/usr/lib/tcl8.4' so the right directory isn't found. As a workaround I just hard-coded o.tcl_inc in the setupext.py and it worked fine. I don't know what the general solution is. Thanks, Greg |