From: matthew a. <ma...@ca...> - 2004-11-09 02:43:50
|
Hi, I keep getting this error when my matplotlib gtk app starts up: Could not load matplotlib icon: Couldn't recognize the image file format for file 'C:\Python23\share\matplotlib\matplotlib.svg' I don't *think* it's my fault. It doesn't seem to do any harm but it's untidy all the same. Any suggestions? Cheers, Matthew. |
From: <na...@te...> - 2004-11-09 04:48:09
|
Hello, Matplotlib has been helping me a lot with my graphic needs. I am still surprised by the looking of the pictures. Many thanks for the great software. I'm having some issues, though. Sometimes I get error messages, usually an error in KERNEL32.DLL on Windows ME, and on Windows only, I don't get this behaviour in Linux. It's not as bad as it may seem, as every script runs completely, the pictures are saved and, besides the message box informing the error, nothing weird happens. I don't know how to reproduce the errors - when I run from the DOS prompt or from IDLE, I get the messages. When I run from my IDE (I use PSPad) I usually don't get error messages, with the same scripts. Any hint to what I can be doing wrong, or how to find out what is happening? Also, I'm in need of some help. I must draw six subplots, one below the other (subplot(6, ...)), but the way things are coming out, the plots are to thin, and, although the picture looks good, I thought that if I could make each subplot a little bigger, that would help a lot. Is there any way this can be done? In other plots, I need to index the subplots (label them '(a)', '(b)', ... for reference in text). I was using xlabel to do that, but when I have more than two subplots, the xlabel is shadowed by the following subplot. Is there any way to make the space between the plots bigger, so the xlabels can be shown, or is there any other (better) way to do that? Thanks in advance. --- José Alexandre Nalon na...@te... |
From: Gary <pa...@in...> - 2004-11-09 13:14:37
|
Did I do something wrong? After installing from the windows installer, from a DOS window: Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from matplotlib.matlab import * Traceback (most recent call last): File "<stdin>", line 1, in ? File "C:\Python23\Lib\site-packages\matplotlib\matlab.py", line 162, in ? from axes import Axes, PolarAxes File "C:\Python23\Lib\site-packages\matplotlib\axes.py", line 9, in ? from artist import Artist File "C:\Python23\Lib\site-packages\matplotlib\artist.py", line 4, in ? from transforms import identity_transform File "C:\Python23\Lib\site-packages\matplotlib\transforms.py", line 189, in ? from _transforms import IDENTITY, LOG10, POLAR, Func, FuncXY ImportError: cannot import name POLAR >>> |
From: John H. <jdh...@ac...> - 2004-11-10 14:55:21
|
>>>>> "Jos=E9" =3D=3D Jos=E9 Alexandre Nalon <na...@te...> writes: Jos=E9> Hello, Matplotlib has been helping me a lot with my graphic Jos=E9> needs. I am still surprised by the looking of the Jos=E9> pictures. Many thanks for the great software. Jos=E9> I'm having some issues, though. Sometimes I get error Jos=E9> messages, usually an error in KERNEL32.DLL on Windows ME, Jos=E9> and on Windows only, I don't get this behaviour in Jos=E9> Linux. It's not as bad as it may seem, as every script runs Jos=E9> completely, the pictures are saved and, besides the message Jos=E9> box informing the error, nothing weird happens. I don't know Jos=E9> how to reproduce the errors - when I run from the DOS prompt Jos=E9> or from IDLE, I get the messages. When I run from my IDE (I Jos=E9> use PSPad) I usually don't get error messages, with the same Jos=E9> scripts. Any hint to what I can be doing wrong, or how to Jos=E9> find out what is happening? I haven't seen this one before. Intermittent errors are the hardest to track down. What GUI is PSPad based on. Is any of the information at http://matplotlib.sourceforge.net/faq.html#FREEZE helpful? Jos=E9> Also, I'm in need of some help. I must draw six subplots, Jos=E9> one below the other (subplot(6, ...)), but the way things Jos=E9> are coming out, the plots are to thin, and, although the Jos=E9> picture looks good, I thought that if I could make each Jos=E9> subplot a little bigger, that would help a lot. Is there any Jos=E9> way this can be done? subplot is simply a thin wrapper to axes - http://matplotlib.sf.net/matplotlib.matlab.html#-axes . You can use axes to make the axes any size you want. The syntax is # left, bottom, width, height ax1 =3D axes([0.125, 0.1, 0.7, .8]) where all values are fractions of the total figure size. See http://matplotlib.sourceforge.net/examples/ganged_plots.py for an example where no space is left between the axes, and xlabels are put only on the bottom. Jos=E9> In other plots, I need to index the subplots (label them Jos=E9> '(a)', '(b)', ... for reference in text). I was using xlabel Jos=E9> to do that, but when I have more than two subplots, the Jos=E9> xlabel is shadowed by the following subplot. Is there any Jos=E9> way to make the space between the plots bigger, so the Jos=E9> xlabels can be shown, or is there any other (better) way to Jos=E9> do that? You can use the text command to place text anywhere in the figure you want - http://matplotlib.sourceforge.net/matplotlib.matlab.html#-text. You can place text in data coordinates text(.5, 12, 'hi mom') in which case the text will "move" visually if you pan and zoom the axes, or in axes coordinates (0,0) is lower left and 1,1 is upper right, in which case the text will remain stationary with respect to changes in the axes limits text(0.05, 0.9, 'hi mom', transform=3Dgca().transAxes) See http://matplotlib.sourceforge.net/examples/alignment_test.py for lots of examples showing text placement and alignment. You can also place text outside the axes using the text command # to the left and above the axes box text(-0.1, 1.05, 'hi mom', transform=3Dgca().transAxes) Hope this helps, JDH |
From: <na...@te...> - 2004-11-10 16:03:19
|
John Hunter wrote: > I haven't seen this one before. Intermittent errors are the hardest > to track down. What GUI is PSPad based on. Is any of the information > at http://matplotlib.sourceforge.net/faq.html#FREEZE helpful? PSPad is based on native toolkit, I think. It is not open source, though it is freeware. Information on the FAQ didn't help, but I tried running some of the examples and my scripts on every IDE, and got basically the same results. I think the DOS box message error is the most helpful of them, but not that much. Double-clicking from Windows Explorer: Microsoft Visual C++ Runtime Error - abnormal programa termination DOS command line: Fatal Python Error: PyEval_RestoreThread: NULL state Interpreter running in a DOS box: shows no error, but gives me a Microsoft Visual C++ error as above when I quit the DOS box. IDLE: shows no error, but gives me a Microsoft Visual C++ error as above. Pyshell: BSODs. I noticed, however, that it only happens when I save the figure, and _never_ when I show them in a windows. And, in every case, the picture is saved with no problems before the error occurs. I am using the previous binary version of matplotlib (I'm downloading the newest version right now and will test as soon as possible), with Python-2.3.4. I double-checked to see if I was using the right versions (it could have happen), but I don't think that this is the problem. If there is any other information that could be helpful, I can find it here. > You can use > axes to make the axes any size you want. The syntax is I'm sorry to ask so simple questions. The main reason is that the matlab interface is so simple that I rarely need to do more than what it provides. This will help a lot, thanks! --- José Alexandre Nalon na...@te... |