SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

You can subscribe to this list here.

2003 Jan
Feb
Mar
Apr
May
(3)
Jun
Jul
Aug
(12)
Sep
(12)
Oct
(56)
Nov
(65)
Dec
(37)
2004 Jan
(59)
Feb
(78)
Mar
(153)
Apr
(205)
May
(184)
Jun
(123)
Jul
(171)
Aug
(156)
Sep
(190)
Oct
(120)
Nov
(154)
Dec
(223)
2005 Jan
(184)
Feb
(267)
Mar
(214)
Apr
(286)
May
(320)
Jun
(299)
Jul
(348)
Aug
(283)
Sep
(355)
Oct
(293)
Nov
(232)
Dec
(203)
2006 Jan
(352)
Feb
(358)
Mar
(403)
Apr
(313)
May
(165)
Jun
(281)
Jul
(316)
Aug
(228)
Sep
(279)
Oct
(243)
Nov
(315)
Dec
(345)
2007 Jan
(260)
Feb
(323)
Mar
(340)
Apr
(319)
May
(290)
Jun
(296)
Jul
(221)
Aug
(292)
Sep
(242)
Oct
(248)
Nov
(242)
Dec
(332)
2008 Jan
(312)
Feb
(359)
Mar
(454)
Apr
(287)
May
(340)
Jun
(450)
Jul
(403)
Aug
(324)
Sep
(349)
Oct
(385)
Nov
(363)
Dec
(437)
2009 Jan
(500)
Feb
(301)
Mar
(409)
Apr
(486)
May
(545)
Jun
(391)
Jul
(518)
Aug
(497)
Sep
(492)
Oct
(429)
Nov
(357)
Dec
(310)
2010 Jan
(371)
Feb
(657)
Mar
(519)
Apr
(432)
May
(312)
Jun
(416)
Jul
(477)
Aug
(386)
Sep
(419)
Oct
(435)
Nov
(320)
Dec
(202)
2011 Jan
(321)
Feb
(413)
Mar
(299)
Apr
(215)
May
(284)
Jun
(203)
Jul
(207)
Aug
(314)
Sep
(321)
Oct
(259)
Nov
(347)
Dec
(209)
2012 Jan
(322)
Feb
(414)
Mar
(377)
Apr
(179)
May
(173)
Jun
(234)
Jul
(295)
Aug
(239)
Sep
(276)
Oct
(355)
Nov
(144)
Dec
(108)
2013 Jan
(170)
Feb
(89)
Mar
(204)
Apr
(133)
May
(142)
Jun
(89)
Jul
(160)
Aug
(180)
Sep
(69)
Oct
(136)
Nov
(83)
Dec
(32)
2014 Jan
(71)
Feb
(90)
Mar
(161)
Apr
(117)
May
(78)
Jun
(94)
Jul
(60)
Aug
(83)
Sep
(102)
Oct
(132)
Nov
(154)
Dec
(96)
2015 Jan
(45)
Feb
(138)
Mar
(176)
Apr
(132)
May
(119)
Jun
(124)
Jul
(77)
Aug
(31)
Sep
(34)
Oct
(22)
Nov
(23)
Dec
(9)
2016 Jan
(26)
Feb
(17)
Mar
(10)
Apr
(8)
May
(4)
Jun
(8)
Jul
(6)
Aug
(5)
Sep
(9)
Oct
(4)
Nov
Dec
2017 Jan
(5)
Feb
(7)
Mar
(1)
Apr
(5)
May
Jun
(3)
Jul
(6)
Aug
(1)
Sep
Oct
(2)
Nov
(1)
Dec
2018 Jan
Feb
Mar
Apr
(1)
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2020 Jan
Feb
Mar
Apr
May
(1)
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2025 Jan
(1)
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
S M T W T F S





1
(11)
2
(1)
3
(5)
4
(25)
5
(14)
6
(36)
7
(13)
8
(15)
9
10
(5)
11
(5)
12
(11)
13
(15)
14
(9)
15
(16)
16
(3)
17
(13)
18
(7)
19
(9)
20
(12)
21
(2)
22
(6)
23
24
(2)
25
(1)
26
(16)
27
(7)
28
(11)
29
(8)
30
(1)

Showing results of 277

<< < 1 2 3 4 5 6 .. 12 > >> (Page 4 of 12)
From: Russell E. O. <ro...@ce...> - 2006年09月18日 23:13:19
In article <450...@no...>,
 Christopher Barker <Chr...@no...> wrote:
> Russell E Owen wrote:
> >> well, I didnt' mean more than one numerix option, exactly. What I meant 
> >> was that MPL is using numarray, but another module you've imported is 
> >> using Numeric (or numpy or whatever).
> > 
> > Ah. I can guarantee that's happening. Some of my code uses Numeric (due 
> > to high speed on short arrays) and some uses numarray (because I started 
> > using it for all new code when it looked like it would take over).
> 
> Then this could be it. In general, they should co-exist just fine, but 
> do know someone else has weird crashing problems when they were mixed 
> with MPL (and GDAL, in his case). Both numpy and Numeric, and numarray 
> have a lot of extension code that shares names, etc. who knows what 
> problem that can cause?
> 
> > I
> > hope to switch to numpy for everything once the dust settles,
> 
> good plan, and it's getting close. The API should be stable now. The 
> sooner the better, I think. You'll be a lot more help with bugs or 
> potential bugs like this one.
I look forward to the unification, but unfortunately I don't think it 
will help with this crash (unless the very fact that the numarray and/or 
Numeric are installed but not loaded can cause problems).
I see the crash even with this trivial script:
$ python
>>> from pylab import *
>>> plot([1,2,3,4])
>>> show()
boom!
matplotlib 0.87.5 crashes with ~/.matplotlib/matplotlibrc set to use 
numarray (1.5.1), Numeric or numpy (1.0b5).
> > I don't have wx or gtk installed, so no easy way to test those backends.
> 
> if you install the mpkg on pythonmac.org/packages, wx should work. 
> that's pretty easy.
Fair enough. I installed wxPython (2.6) and the above scripts works fine 
(as long as interactive is false).
> > It does not crash with plain old Agg (but of course I don't see any plot).
> 
> Does it save a png successfully?
I can try this if you think it will help. It appears to be a lot more 
work than just slapping up a plot using pylab so I've not tried it yet.
I also failed to build matplotlib from source. I had all the 
prerequisites in /usr/local (and I reinstalled freetype 2.2.1 to be 
sure, since the version shown in /usr/local/lib has no resemblance to 
the source version). During the build I see these warnings (but no 
errors):
/usr/bin/ld: for architecture i386
/usr/bin/ld: warning /usr/local/lib/libpng.dylib cputype (18, 
architecture ppc) does not match cputype (7) for specified -arch flag: 
i386 (file not loaded)
and after installation, importation of pylab fails as follows:
>>> from pylab import *
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
 File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac
kages/pylab.py", line 1, in ?
 from matplotlib.pylab import *
 File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac
kages/matplotlib/pylab.py", line 200, in ?
 from axes import Axes, PolarAxes
 File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac
kages/matplotlib/axes.py", line 15, in ?
 from axis import XAxis, YAxis
 File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac
kages/matplotlib/axis.py", line 25, in ?
 from font_manager import FontProperties
 File 
"/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-pac
kages/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-pack
ages/matplotlib/ft2font.so: Symbol not found: 
_FMDisposeFontFamilyIterator
 Referenced from: /usr/local/lib/libfreetype.6.dylib
 Expected in: flat namespace
-- Russell
From: Daniel M. <dan...@ya...> - 2006年09月18日 19:28:04
Hello Charlie,
I tried the solution you suggested below to get py2exe working and get rid of
the "no such file wxmsw26uh_vc.dll" message when trying to run the compiled .exe
1. I removed the _wxagg.pyd file from matplotlib/backends (although I was loathe
to do so as my guess is that this will make plotting slower?)
2. I removed the exclusion on the wxmsw26uh_vc.dll in the setup file
Now I can compile to an .exe but the application starts briefly, but stops and
closes the output window before I can see anything. It doesn't write anything to
the .log file.
I'm running XP, Python 2.4, wxPython 2.6.3.3-py4 and MPL 87.5
Has anybody else tried this solution and got it to work?
Thanks for any help you can provide.
- Daniel
P.S. If it's relevant, my setup.py is below...
# For py2exe only
"""
 Setup.py
 
 Create .exe for VizTool. This code was provided on the Matploblib users
mailinglist
 
 Run with the following command (use py2exe 0.6.2 or higher)
 python.exe -OO setup.py py2exe -b 3 -c -p numarray,pytz -e numpy
"""
import os
from distutils.core import setup
import py2exe
import glob
import matplotlib
#Following ops assignment pulled from Py2Exe WIKI :
http://starship.python.net/crew/theller/moin.cgi/MatPlotLib
opts = {
 'py2exe': { 'compressed': 1,
 'optimize': 2,
 'packages': ['encodings',
 'matplotlib.backends',
 'pytz',
 'matplotlib.numerix'
 ],
 'includes': 'matplotlib.numerix.random_array',
 'excludes': ['_gtkagg', '_tkagg'],
 'dll_excludes': ['libgdk-win32-2.0-0.dll',
 'libgobject-2.0-0.dll',
 'tcl84.dll',
 'tk84.dll']
 }
 }
setup( version = '0.0.1',
 windows = ['VizToolApp.py'], 
 data_files = [('conf',['conf/GraphStyles.ini']),
 ('',['matplotlibrc']),
 matplotlib.get_py2exe_datafiles()],
 options=opts,
)
From: Christopher B. <Chr...@no...> - 2006年09月18日 17:01:24
Russell E Owen wrote:
>> well, I didnt' mean more than one numerix option, exactly. What I meant 
>> was that MPL is using numarray, but another module you've imported is 
>> using Numeric (or numpy or whatever).
> 
> Ah. I can guarantee that's happening. Some of my code uses Numeric (due 
> to high speed on short arrays) and some uses numarray (because I started 
> using it for all new code when it looked like it would take over).
Then this could be it. In general, they should co-exist just fine, but 
do know someone else has weird crashing problems when they were mixed 
with MPL (and GDAL, in his case). Both numpy and Numeric, and numarray 
have a lot of extension code that shares names, etc. who knows what 
problem that can cause?
 > I
> hope to switch to numpy for everything once the dust settles,
good plan, and it's getting close. The API should be stable now. The 
sooner the better, I think. You'll be a lot more help with bugs or 
potential bugs like this one.
>>> I also tried setting numerix to Numeric and it still happens.
Darn.
> I don't have wx or gtk installed, so no easy way to test those backends.
if you install the mpkg on pythonmac.org/packages, wx should work. 
that's pretty easy.
> It does not crash with plain old Agg (but of course I don't see any plot).
Does it save a png successfully?
> I'll be happy to try the "non-agg TK back-end" if you can tell me what 
> setting to use for it.
hmm. I just assumed it was there, but I can't find it either.
> I started this project several years ago and at the time Tcl/Tk was the 
> only game in town for Mac+unix+windows cross-platform support. 
I meant that tongue-in-cheek -- we all have our reasons, and I know 
you've been using TK for a good long time now.
> Sometimes I wish I'd 
> used Java, even though the I strongly prefer Python, just to get a 
> standard GUI.
which one would that be? AWT? Swing? SWT?, or for that matter, wxJAVA.
> I'll try bulding matplotlib from source, just to see if there might be 
> some quirk about the installer package.
It's always worth a shot!
-Chris
-- 
Christopher Barker, Ph.D.
Oceanographer
 		
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chr...@no...
From: John H. <jdh...@ac...> - 2006年09月18日 14:06:17
>>>>> "Wolfgang" == Wolfgang <wo...@gm...> writes:
 Wolfgang> Hello John, I had also to remove the quotationmarks from
 Wolfgang> the png/dvi Filename command = 'dvipng -bg Transparent
 Wolfgang> -D %s -T tight -o %s %s'%\ (dpi, pngfile, dvifile)
 Wolfgang> Now it works fine! Thanks for the quick reply.
But it's still not clear where the quotemarks on the 200 came from in
the first place, as they ere not in the src code, at least in my
version. What version are you working with?
JDH
From: Wolfgang <wo...@gm...> - 2006年09月18日 14:02:03
Hello John,
I had also to remove the quotationmarks from the png/dvi Filename
 command = 'dvipng -bg Transparent -D %s -T tight -o %s %s'%\
 (dpi, pngfile, dvifile)
Now it works fine! Thanks for the quick reply.
Wolfgang
John Hunter schrieb:
>>>>>> "Wolfgang" == Wolfgang <wo...@gm...> writes:
> 
> Wolfgang> Hi all, I have absolutely no idea what the problem
> Wolfgang> is. I'm running the actual enthought python version (on
> Wolfgang> WinXP) which includes matplotlib version 0.87.3.
> 
> Wolfgang> The conversion of the dvi file to png does not work:
> Wolfgang> dvipng -bg Transparent -D "200" -T tight -o
> Wolfgang> "C:\temp\temp\.matplotlib\tex.cache6円ded4018a133b00dd5abd9e27ca15efa.png"
> Wolfgang> "C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi"
> 
> Wolfgang> ... RuntimeError: dvipng was not able to process the
> Wolfgang> flowing file:
> Wolfgang> C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi
> Wolfgang> Here is the full report generated by dvipng:
> 
> Wolfgang> This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
> Wolfgang> dvipng: Fatal error, bad -D parameter
> 
> I don't understand why the 200 is being quoted in the -D flag, etc 
> 
> -D "200"
> 
> The relavent bit of code in matplotlib.texmanager reads
> 
> command = self.get_shell_cmd('cd "%s"' % self.texcache, 
> 'dvipng -bg Transparent -D %s -T tight -o \
> "%s" "%s" > "%s"'%(dpi, os.path.split(pngfile)[-1], 
> os.path.split(dvifile)[-1], outfile))
> 
> WOlfgang, try playing around with this code in
> site-packages/matplotlib/texmanager.py (in the make_png function).
> Does this help
> 
> command = self.get_shell_cmd('cd "%s"' % self.texcache, 
> 'dvipng -bg Transparent -D %d -T tight -o \
> "%s" "%s" > "%s"'%(int(dpi), os.path.split(pngfile)[-1], 
> os.path.split(dvifile)[-1], outfile))
> 
> JDH
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
From: John H. <jdh...@ac...> - 2006年09月18日 13:55:49
>>>>> "Wolfgang" == Wolfgang <wo...@gm...> writes:
 Wolfgang> Hi all, I have absolutely no idea what the problem
 Wolfgang> is. I'm running the actual enthought python version (on
 Wolfgang> WinXP) which includes matplotlib version 0.87.3.
 Wolfgang> The conversion of the dvi file to png does not work:
 Wolfgang> dvipng -bg Transparent -D "200" -T tight -o
 Wolfgang> "C:\temp\temp\.matplotlib\tex.cache6円ded4018a133b00dd5abd9e27ca15efa.png"
 Wolfgang> "C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi"
 Wolfgang> ... RuntimeError: dvipng was not able to process the
 Wolfgang> flowing file:
 Wolfgang> C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi
 Wolfgang> Here is the full report generated by dvipng:
 Wolfgang> This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
 Wolfgang> dvipng: Fatal error, bad -D parameter
I don't understand why the 200 is being quoted in the -D flag, etc 
 -D "200"
The relavent bit of code in matplotlib.texmanager reads
 command = self.get_shell_cmd('cd "%s"' % self.texcache, 
 'dvipng -bg Transparent -D %s -T tight -o \
 "%s" "%s" > "%s"'%(dpi, os.path.split(pngfile)[-1], 
 os.path.split(dvifile)[-1], outfile))
WOlfgang, try playing around with this code in
site-packages/matplotlib/texmanager.py (in the make_png function).
Does this help
 command = self.get_shell_cmd('cd "%s"' % self.texcache, 
 'dvipng -bg Transparent -D %d -T tight -o \
 "%s" "%s" > "%s"'%(int(dpi), os.path.split(pngfile)[-1], 
 os.path.split(dvifile)[-1], outfile))
JDH
From: Wolfgang <wo...@gm...> - 2006年09月18日 13:42:27
Hi all,
I have absolutely no idea what the problem is. I'm running the actual 
enthought python version (on WinXP) which includes matplotlib version 
0.87.3.
The conversion of the dvi file to png does not work:
dvipng -bg Transparent -D "200" -T tight -o 
"C:\temp\temp\.matplotlib\tex.cache6円ded4018a133b00dd5abd9e27ca15efa.png" 
"C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi"
...
RuntimeError: dvipng was not able to process the flowing file:
C:\temp\temp\.matplotlib\tex.cache\a7b7bb1f22dc4f78602fb90e430bed74.dvi
Here is the full report generated by dvipng:
This is dvipng 1.6 Copyright 2002-2005 Jan-Ake Larsson
dvipng: Fatal error, bad -D parameter
The path to the dvi file is correct. The strange thing is, that this 
commands works when I paste it into the windows command line!
I hope someone can help me.
Regards
Wolfgang
Hi Don,
On Sunday 17 September 2006 7:06 pm, Don Peterson wrote:
> For my Windows XP machine, I downloaded enthon-python2.4-1.0.0.exe and
> matplotlib-0.87.5.win32-py2.4.exe. I installed python first (it's version
> 2.4.3) via the Enthought executable; it installed fine with no errors. 
> Then matplotlib installed fine with no errors.
>
> I installed the matplotlib_examples_0.87.1.zip examples and tried to run
> the barchart_demo.py script; here's the error message I got:
>
> RuntimeError: module compiled against version 1000002 of C-API but this
> version of numpy is 90907
>
> The import of the numpy version of the nxutils module,
> _nsnxutils, failed. This is is either because numpy was
> unavailable when matplotlib was compiled, because a dependency of
> _nsnxutils could not be satisfied, or because the build flag for
> this module was turned off in setup.py. If it appears that
> _nsnxutils was not built, make sure you have a working copy of
> numpy and then re-install matplotlib. Otherwise, the following
> traceback gives more details:
>
> Traceback (most recent call last):
> File "barchart_demo.py", line 3, in ?
> from pylab import *
> File "C:\bin\PYTHON~1\Lib\site-packages\pylab.py", line 1, in ?
> from matplotlib.pylab import *
> File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\pylab.py", line 198,
> in ? import mlab #so I can override hist, psd, etc...
> File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\mlab.py", line 64, in
> ? import nxutils
> File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\nxutils.py", line 17,
> in ? from matplotlib._ns_nxutils import *
> ImportError: numpy.core.multiarray failed to import
>
> The following shows I can import numpy OK:
>
> --> python
> Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug 2 2006, 12:09:59) [MSC
> v.1310 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> from numpy import *
>
> I would very much like to be able to use matplotlib, as it looks much
> better suited to my needs than gnuplot. Any ideas on how to address this
> problem?
Enthought includes matplotlib, so you dont need to install it seperately. The 
reason for the problem is that your enthought executable includes an older 
version of numpy and matplotlib. The newest matplotlib is compatible with 
numpy1-0b5 and later.
Darren
PS- Please turn off HTML formatting when posting to lists like these
From: John H. <jdh...@ac...> - 2006年09月17日 23:12:15
>>>>> "Zack" == Zack <za...@gm...> writes:
 Zack> """ Public attributes transData - transform data coords
 Zack> to display coords transAxis - transform axis coords to
 Zack> display coords
 Zack> """ LABELPAD = 5 --------------
You can use it:
 ax.xaxis.LABELPAD = 10 
 ax.yaxis.LABELPAD = 10 
We could make it a property and rc param, though, so it is consistent
with the rest of the API.
JDH
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
 <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="+1"><font face="Helvetica, Arial, sans-serif">For my
Windows XP machine, I downloaded enthon-python2.4-1.0.0.exe and
matplotlib-0.87.5.win32-py2.4.exe.&nbsp; I installed python first (it's
version 2.4.3) via the Enthought executable; it installed fine with no
errors.&nbsp; Then matplotlib installed fine with no errors.<br>
<br>
I installed the matplotlib_examples_0.87.1.zip examples and tried to
run the barchart_demo.py script; here's the error message I got:<br>
<br>
</font></font><font size="+1"><tt>RuntimeError: module compiled against
version 1000002 of C-API but this version<br>
of numpy is 90907<br>
<br>
The import of the numpy version of the nxutils module,<br>
_nsnxutils, failed.&nbsp; This is is either because numpy was<br>
unavailable when matplotlib was compiled, because a dependency of<br>
_nsnxutils could not be satisfied, or because the build flag for<br>
this module was turned off in setup.py.&nbsp; If it appears that<br>
_nsnxutils was not built, make sure you have a working copy of<br>
numpy and then re-install matplotlib. Otherwise, the following<br>
traceback gives more details:<br>
<br>
Traceback (most recent call last):<br>
&nbsp; File "barchart_demo.py", line 3, in ?<br>
&nbsp;&nbsp;&nbsp; from pylab import *<br>
&nbsp; File "C:\bin\PYTHON~1\Lib\site-packages\pylab.py", line 1, in ?<br>
&nbsp;&nbsp;&nbsp; from matplotlib.pylab import *<br>
&nbsp; File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\pylab.py", line
198, in ?<br>
&nbsp;&nbsp;&nbsp; import mlab&nbsp; #so I can override hist, psd, etc...<br>
&nbsp; File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\mlab.py", line 64,
in ?<br>
&nbsp;&nbsp;&nbsp; import nxutils<br>
&nbsp; File "C:\bin\PYTHON~1\Lib\site-packages\matplotlib\nxutils.py", line
17, in ?<br>
&nbsp;&nbsp;&nbsp; from matplotlib._ns_nxutils import *<br>
ImportError: numpy.core.multiarray failed to import<br>
<br>
</tt></font><font size="+1"><font face="Helvetica, Arial, sans-serif">The
following shows I can import numpy OK:<br>
<br>
</font></font><font size="+1"><tt>--&gt; python<br>
Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug&nbsp; 2 2006, 12:09:59)
[MSC v.1310<br>
32 bit (Intel)] on win32<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
&gt;&gt;&gt; from numpy import *<br>
&gt;&gt;&gt;</tt></font><font size="+1"><font
 face="Helvetica, Arial, sans-serif"><br>
<br>
I would very much like to be able to use matplotlib, as it looks much
better suited to my needs than gnuplot.&nbsp; Any ideas on how to address
this problem?<br>
<br>
</font></font>
</body>
</html>
From: Zack <za...@gm...> - 2006年09月17日 22:57:51
Hi, John!
On Sunday 17 September 2006 19:26, John Hunter wrote:
> The tick labels are part of the Tick, so this setting will affect
> them. The Axis labels are automatically placed to be below (or to the
> left of) the tick labels. So it may be enough to simply set the pad.
I have found the parameter I need.
It was placed inside of Axis class definition.
--------------
class Axis(Artist):
 """
 Public attributes
 transData - transform data coords to display coords
 transAxis - transform axis coords to display coords
 """
 LABELPAD = 5
--------------
I'm wondering if it might be possible to release this parameter, that
anyone could adjust it according his needs.
It will make matplotlib even more flexible.
Thanks for the great lib!
-- 
Alexey
From: Daniel K. <kor...@re...> - 2006年09月17日 21:27:09
Hi:
Thanks for you last reply John you where right on.
Yet another newbie question, how do I take off the frame off ?
I have tried frameon=False, and played with the figsize and dpi, and I 
just can't get rid of the gray (or white) border around my image. I want 
the image to expand to take on the whole sizer I can't afford the 
padding on the side.
This is how I am adding my image to the figure:
 (I don't know if I should be using add_subplot(111) ? )
 figure = Figure()
 self.axes = figure.add_subplot(111)
 self.axes.imshow(self.image, interpolation='nearest')
 self.axes.axis('off')
 Thanks.
 
Daniel.
From: Achim G. <Ach...@ph...> - 2006年09月17日 21:24:45
Attachments: matplotlib_fix
While compiling matplotlib-0.87.5 with python-2.5 on debian testing some
errors occured:
gcc: src/agg.cxx
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)':
src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
Ada/C/ObjC but not for C++
src/agg.cxx: In function 'int SWIG_Python_ConvertPtr(PyObject*, void**,
swig_type_info*, int)':
src/agg.cxx:1231: error: invalid conversion from 'const char*' to 'char*'
src/agg.cxx: In function 'void SWIG_Python_FixMethods(PyMethodDef*,
swig_const_info*, swig_type_info**, swig_type_info**)':
src/agg.cxx:27624: error: invalid conversion from 'const char*' to 'char*'
error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall
-Wstrict-prototypes -fPIC -Iagg23/include -Isrc -Iswig
-I/home/achim/local/include/python2.5 -c src/agg.cxx -o
build/temp.linux-i686-2.5/src/agg.o" failed with exit status 1
similar errors occured in src/swig_runtime.h
src/swig_runtime.h: In function 'int SWIG_Python_ConvertPtr(PyObject*,
void**, swig_type_info*, int)':
src/swig_runtime.h:1140: error: invalid conversion from 'const char*' to
'char*'
a fix is attached.
Achim
From: John H. <jdh...@ac...> - 2006年09月17日 17:40:17
>>>>> "Zack" == Zack <za...@gm...> writes:
 Zack> Hi, Thanks for your help.
 Zack> On Sunday 17 September 2006 16:54, John Hunter wrote:
 >> From code, you can also control the pad with, for example, for
 >> tick in ax.xaxis.get_major_ticks(): tick.set_pad(6)
 Zack> And how do I do same thing with labels? They are instances
 Zack> of Text object not ticks.
The tick labels are part of the Tick, so this setting will affect
them. The Axis labels are automatically placed to be below (or to the
left of) the tick labels. So it may be enough to simply set the pad.
JDH
From: Zack <za...@gm...> - 2006年09月17日 16:09:32
Hi,
Thanks for your help.
On Sunday 17 September 2006 16:54, John Hunter wrote:
> From code, you can also control the pad with, for example,
> for tick in ax.xaxis.get_major_ticks():
> tick.set_pad(6)
And how do I do same thing with labels?
They are instances of Text object not ticks.
-- 
Alexey
From: John H. <jdh...@ac...> - 2006年09月17日 15:24:11
>>>>> "Daniel" == Daniel Kornhauser <kor...@re...> writes:
 Daniel> I know I should find this in the documentation, but I am
 Daniel> finding all kinds of bells and whistles about the
 Daniel> interpolation and the fancy agg features except how to
 Daniel> disable antialiasing .
When you say antialiasing, do you mean interpolation? AFAIK,
antialiasing doesn't really come into play on the images. 
Perhaps what you want is
ax.imshow(nx.mlab.rand(10,10), interpolation='nearest')
JDH
From: John H. <jdh...@ac...> - 2006年09月17日 15:08:33
>>>>> "Zack" == Zack <za...@gm...> writes:
 Zack> Hi, all how to change the spacing between axes and ticks
 Zack> labels, ticks labels and axes labels? I mean vertical
 Zack> spacing for X axis and horizontal one for Y.
See these parameters from your matplotlibrc file:
http://matplotlib.sf.net/matplotlibrc
 xtick.major.pad : 4 # distance to major tick label in points
 xtick.minor.pad : 4 # distance to the minor tick label in points
 ytick.major.pad : 4 # distance to major tick label in points
 ytick.minor.pad : 4 # distance to the minor tick label in points
>From code, you can also control the pad with, for example, 
for tick in ax.xaxis.get_major_ticks():
 tick.set_pad(6)
ditto for the yaxis and minor ticks..
JDH
From: Zack <za...@gm...> - 2006年09月17日 11:23:54
Hi, all
how to change the spacing between axes and ticks labels, ticks labels and axes 
labels?
I mean vertical spacing for X axis and horizontal one for Y.
Thanks,
-- 
Alexey
From: Daniel K. <kor...@re...> - 2006年09月17日 08:26:40
I know I should find this in the documentation, but I am finding all 
kinds of bells and whistles about the interpolation and the fancy agg 
features except how to disable antialiasing .
 Sorry for the newbie question.
 
 
Daniel.
From: R. P. S. <R.S...@um...> - 2006年09月17日 01:14:02
I've added full directional control and the ability to specify something 
besides the joining distance for the vertical axis. I've also changed 
things so that the program doesn't use linestyle='steps' to make the 
branches, as a result you now have the ability to specify line styles 
for different branches in addition to color (useful if you're publishing 
in black & white).
If anyone has any suggestions for additional features they'd like to 
see, let me know and I'll see what I can do. If you'd like to write 
your own modifications, feel free to pass them along to me and I'll post 
an updated version that includes your modifications.
http://www.umit.maine.edu/~r.springuel/000CCFE8-80000018/
-- 
R. Padraic Springuel
Teaching Assistant
Department of Physics and Astronomy
University of Maine
Bennett 309
Office Hours: Wednesday 2-3pm
From: R. P. S. <R.S...@um...> - 2006年09月16日 21:23:07
Ah! That's so much simpler. Thank you.
-- 
R. Padraic Springuel
Teaching Assistant
Department of Physics and Astronomy
University of Maine
Bennett 309
Office Hours: Wednesday 2-3pm
From: John H. <jdh...@ac...> - 2006年09月16日 18:00:26
>>>>> "R" == R Padraic Springuel <R.S...@um...> writes:
 R> I'm trying to make a plot where instead of the y-axis being
 R> oriented in the traditional sense (large numbers on top, small
 R> on bottom) it needs to be oriented in the reverse sense (small
 R> numbers on top, large on bottom).
 R> Now, my first thought on how to do this was the following:
 >>>> plot(x,-y) pos,lab = yticks()
 >>>> yticks(pos,map(str,-array(pos)))
Just try setting 
ylim(ymax, ymin)
instead of explicitly mucking with the ticks. Eg,
http://matplotlib.sf.net/examples/invert_axes.py
JDH
From: R. P. S. <R.S...@um...> - 2006年09月16日 16:12:06
I'm trying to make a plot where instead of the y-axis being oriented in 
the traditional sense (large numbers on top, small on bottom) it needs 
to be oriented in the reverse sense (small numbers on top, large on bottom).
Now, my first thought on how to do this was the following:
 >>>plot(x,-y)
 >>>pos,lab = yticks()
 >>>yticks(pos,map(str,-array(pos)))
This works, but if I've set a specific y-axis limit range before 
reversing the labeling, the yticks command messes that up. On the other 
hand, if I do the yticks command first, then I get the range I want, but 
the tick marks don't cover the whole range of the plot.
Is there a better way of doing this, or some way to fix the above method 
to make it work?
-- 
R. Padraic Springuel
Teaching Assistant
Department of Physics and Astronomy
University of Maine
Bennett 309
Office Hours: Wednesday 2-3pm
From: Russell E. O. <ro...@ce...> - 2006年09月15日 22:50:24
In article <450...@no...>,
 Christopher Barker <Chr...@no...> wrote:
> Russell E Owen wrote:
> > Interesting idea. I'm not sure I'd know how to use more than one numerix 
> > option at once,
> 
> well, I dint' mean more than one numerix option, exactly. What I meant 
> was that MPL is using numarray, but another module you've imported is 
> using Numeric (or numpy or whatever).
Ah. I can guarantee that's happening. Some of my code uses Numeric (due 
to high speed on short arrays) and some uses numarray (because I started 
using it for all new code when it looked like it would take over). I 
hope to switch to numpy for everything once the dust settles, but I 
don't want to force my users to all move at once (a lot of them are on 
unix and will have to manually install numpy -- no big deal, but I get 
complaints every time I require a new package).
> ...Does it happen with wxAgg? or just plain ol Agg? also try the non-agg TK 
> back-end.
I don't have wx or gtk installed, so no easy way to test those backends.
It does not crash with plain old Agg (but of course I don't see any 
plot).
I'll be happy to try the "non-agg TK back-end" if you can tell me what 
setting to use for it. I didn't see it in the matplotlibrc's list of 
options (but WXAgg is also missing from that particular list), nor on 
the "Which backend should I use?" page.
> If not, then you've apparently found a tkAgg bug.
> 
> TK has always been a bit of a second-class citizen on the Mac -- why 
> haven't you switched to wx yet? ;-)
I started this project several years ago and at the time Tcl/Tk was the 
only game in town for Mac+unix+windows cross-platform support. 
Admittedly the Mac support was poor, but it has gotten much better, and 
I like Tkinter pretty well overall. It would be a major job to switch 
now and I doubt I can justify the expense and time. Sometimes I wish I'd 
used Java, even though the I strongly prefer Python, just to get a 
standard GUI.
I'm bulding matplotlib from source now, just to see if there might be 
some quirk about the installer package.
-- Russell
From: Russell E O. <ro...@ce...> - 2006年09月15日 22:37:28
At 3:12 PM -0700 9/15/06, Christopher Barker wrote:
>Russell E Owen wrote:
>>Interesting idea. I'm not sure I'd know how to use more than one 
>>numerix option at once,
>
>well, I dint' mean more than one numerix option, exactly. What I 
>meant was that MPL is using numarray, but another module you've 
>imported is using Numeric (or numpy or whatever).
Ah. I can guarantee that's happening. Some of my code uses Numeric 
(due to high speed on short arrays) and some uses numarray (because I 
started using it for all new code when it looked like it would take 
over). I hope to switch to numpy for everything once the dust 
settles, but I don't want to force my users to all move at once (a 
lot of them are on unix and will have to manually install numpy -- no 
big deal, but I get complaints every time I require a new package).
> > but it did inspire me to try a few things:
>
>>backend : TkAgg
>>numerix : numarray
>>interactive : True
>>and the crash still happens:
>>from pylab import *
>>plot([1,2,3,4])
>
>>I also tried setting numerix to Numeric and it still happens.
>
>Does it happen with wxAgg? or just plain ol Agg? also try the 
>non-agg TK back-end.
I don't have wx or gtk installed, so no easy way to test those backends.
It does not crash with plain old Agg (but of course I don't see any plot).
I'll be happy to try the "non-agg TK back-end" if you can tell me 
what setting to use for it. I didn't see it in the matplotlibrc's 
list of options (but WXAgg is also missing from that particular 
list), nor on the "Which backend should I use?" page.
>If not, then you've apparently found a tkAgg bug.
>
>TK has always been a bit of a second-class citizen on the Mac -- why 
>haven't you switched to wx yet? ;-)
I started this project several years ago and at the time Tcl/Tk was 
the only game in town for Mac+unix+windows cross-platform support. 
Admittedly the Mac support was poor, but it has gotten much better, 
and I like Tkinter pretty well overall. It would be a major job to 
switch now and I doubt I can justify the expense and time. Sometimes 
I wish I'd used Java, even though the I strongly prefer Python, just 
to get a standard GUI.
I'll try bulding matplotlib from source, just to see if there might 
be some quirk about the installer package.
-- Russell
2 messages has been excluded from this view by a project administrator.

Showing results of 277

<< < 1 2 3 4 5 6 .. 12 > >> (Page 4 of 12)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /