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
(47)
2
(13)
3
(12)
4
(16)
5
(3)
6
(6)
7
(20)
8
(45)
9
(24)
10
(30)
11
(14)
12
(4)
13
(1)
14
(6)
15
(6)
16
(10)
17
(15)
18
(13)
19
(4)
20
21
(14)
22
(13)
23
(9)
24
(19)
25
(24)
26
27
(4)
28
(20)
29
(17)
30
(7)



Showing results of 397

<< < 1 .. 6 7 8 9 10 .. 16 > >> (Page 8 of 16)
From: Christopher B. <cbr...@gm...> - 2010年06月12日 22:57:35
On an iMac running 10.6.3, python 2.6.4 I have installed numpy and then matplotlib using 'pip'.
The message in both cases was that the install was successful.
'import matplotlib' does not cause error messages.
'from pylab import randn, hist' gets a traceback with the message "ImportError: No module named ma"
How do I get matplotlib to work?
Thank you for any help.
Christopher
------
>>> from pylab import randn, hist
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/__init__.py:62: DeprecationWarning: the md5 module is deprecated; use hashlib instead
 import md5, os, re, shutil, sys, warnings
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pytz/tzinfo.py:5: DeprecationWarning: the sets module is deprecated
 from sets import Set
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pylab.py", line 1, in <module>
 from matplotlib.pylab import *
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/pylab.py", line 206, in <module>
 from matplotlib.numerix import npyma as ma
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/numerix/__init__.py", line 166, in <module>
 __import__('ma', g, l)
 File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/numerix/ma/__init__.py", line 16, in <module>
 from numpy.core.ma import *
ImportError: No module named ma
------
From: Miguel de V. B. <mig...@gm...> - 2010年06月12日 20:27:10
Hi,
I would like to set the limits of the x axis and get the y scale
adjusted to the new range. I have tried something like
plot.axis('tight', xmin=0, xmax=1), but this shows all the data as
indicated in the documentation. Is there any way to limit the x axis
and set the y axis to tight?
Thanks,
Miguel
From: Eric F. <ef...@ha...> - 2010年06月12日 01:49:28
On 06/11/2010 03:24 PM, Dr. David Kirkby wrote:
> On 06/11/10 10:28 PM, Eric Firing wrote:
>> On 06/11/2010 10:54 AM, Dr. David Kirkby wrote:
>>> The latest stable (0.99.3) matplotlib builds ok on Solaris 10 03/05 on SPARC.
>>>
>>> However, your latest trunc release has some useful fixes, so it was downloaded
>>> by a fellow Sage devloper. However, when I try to build this version on a Sun
>>> Blade 1000 running Solaris 10 03/05, it presents a problem:
>>>
>>> /usr/include/stdlib.h:144: error: declaration of C function 'void swab(const
>>> char*, char*, ssize_t)' conflicts with
>>> /usr/include/unistd.h:480: error: previous declaration 'void swab(const void*,
>>> void*, ssize_t)' here
>>> error: command 'gcc' failed with exit status 1
>>> Error building matplotlib package.
>>>
>>>
>>> There are two declarations of 'swab' in the Solaris header files, and what one
>>> you get depends on the compilation mode. The reasons are explained in the
>>> Solaris header files.
>>>
>>> The issue is traced at
>>>
>>> http://trac.sagemath.org/sage_trac/ticket/9202
>>>
>>> where you will see the full error message and attachments of the header files.
>>>
>>> For this, gcc 4.4.4 was used.
>>
>> Can you get it to work by adding "-D_XOPEN_SOURCE" to your CFLAGS
>> environment variable?
>>
>> Eric
>
> I did reply, but I think off-list by mistake. So I'll reply to the list.
>
> I think this actually causes the build to break earlier.
>
> Do you have access to Sun SPARC hardware? If not, I can almost certainly arrange
> access to a Sun T5240 (16 core) at the University of Washington for a serious
> matplotlib developer.
Dave,
Thanks, but much as I would like to see this problem solved, I don't 
really want to get sucked into it. I haven't messed with Suns for many 
years, and I am not eager to resume.
Did you compile the previous version of matplotlib that you used on your 
machine, or did someone else there do it?
Have you looked at the Cookbook entry?
http://www.scipy.org/Cookbook/Matplotlib/CompilingMatPlotLibOnSolaris10
Eric
>
> Dave
>
>
> ld/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_image
> copying lib/matplotlib/tests/baseline_images/test_image/image_interps.svg -> bui
> ld/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_image
> creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
> mathtext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.pdf -> build
> /lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.png -> build
> /lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.svg -> build
> /lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.pdf ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.png ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.svg ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.pdf
> -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_matht
> ext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.png
> -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_matht
> ext
> copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg
> -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_matht
> ext
> creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
> simplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/clipping.pdf ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
> cation
> copying lib/matplotlib/tests/baseline_images/test_simplification/clipping.png ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
> cation
> copying lib/matplotlib/tests/baseline_images/test_simplification/clipping.svg ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
> cation
> copying lib/matplotlib/tests/baseline_images/test_simplification/clipping_diamon
> d.pdf -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
> simplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/clipping_diamon
> d.png -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
> simplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/clipping_diamon
> d.svg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
> simplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/fft_peaks.pdf -
> > build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplif
> ication
> copying lib/matplotlib/tests/baseline_images/test_simplification/fft_peaks.png -
> > build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplif
> ication
> copying lib/matplotlib/tests/baseline_images/test_simplification/fft_peaks.svg -
> > build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplif
> ication
> copying lib/matplotlib/tests/baseline_images/test_simplification/hatch_simplify.
> pdf -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
> mplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/hatch_simplify.
> png -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
> mplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/hatch_simplify.
> svg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
> mplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/overflow.pdf ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
> cation
> copying lib/matplotlib/tests/baseline_images/test_simplification/overflow.png ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
> cation
> copying lib/matplotlib/tests/baseline_images/test_simplification/overflow.svg ->
> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
> cation
> copying lib/matplotlib/tests/baseline_images/test_simplification/simplify_curve.
> pdf -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
> mplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/simplify_curve.
> png -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
> mplification
> copying lib/matplotlib/tests/baseline_images/test_simplification/simplify_curve.
> svg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
> mplification
> creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
> spines
> copying lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.p
> df -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_spi
> nes
> copying lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.p
> ng -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_spi
> nes
> copying lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.s
> vg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_spi
> nes
> creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
> text
> copying lib/matplotlib/tests/baseline_images/test_text/font_styles.pdf -> build/
> lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
> copying lib/matplotlib/tests/baseline_images/test_text/font_styles.png -> build/
> lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
> copying lib/matplotlib/tests/baseline_images/test_text/font_styles.svg -> build/
> lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
> copying lib/matplotlib/tests/baseline_images/test_text/multiline.pdf -> build/li
> b.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
> copying lib/matplotlib/tests/baseline_images/test_text/multiline.png -> build/li
> b.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
> copying lib/matplotlib/tests/baseline_images/test_text/multiline.svg -> build/li
> b.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
> copying lib/dateutil/zoneinfo/zoneinfo-2010g.tar.gz -> build/lib.solaris-2.10-su
> n4u-2.6/dateutil/zoneinfo
> running build_ext
> building 'matplotlib.ft2font' extension
> creating build/temp.solaris-2.10-sun4u-2.6
> creating build/temp.solaris-2.10-sun4u-2.6/src
> creating build/temp.solaris-2.10-sun4u-2.6/CXX
> gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
> _ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
> /32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
> me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
> e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c src/ft2font.cpp -
> o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
> bjC but not for C++
> <command-line>: warning: "_XOPEN_SOURCE" redefined
> <built-in>: warning: this is the location of the previous definition
> In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/Python.h:8,
> from ./CXX/WrapPython.h:58,
> from ./CXX/Extensions.hxx:37,
> from src/ft2font.h:4,
> from src/ft2font.cpp:1:
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
> arning: "_FILE_OFFSET_BITS" redefined
> In file included from /usr/include/sys/time.h:24,
> from ./CXX/WrapPython.h:43,
> from ./CXX/Extensions.hxx:37,
> from src/ft2font.h:4,
> from src/ft2font.cpp:1:
> /usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
> re_tests.h:197:1: warning: this is the location of the previous definition
> src/ft2font.cpp: In member function 'Py::Object FT2Font::get_sfnt_table(const Py
> ::Tuple&)':
> src/ft2font.cpp:1569: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> src/ft2font.cpp:1572: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> src/ft2font.cpp:1597: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> src/ft2font.cpp:1661: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> src/ft2font.cpp:1684: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> src/ft2font.cpp:1705: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> src/ft2font.cpp:1708: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> src/ft2font.cpp:1725: warning: dereferencing type-punned pointer will break stri
> ct-aliasing rules
> gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
> _ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
> /32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
> me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
> e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c src/mplutils.cpp
> -o build/temp.solaris-2.10-sun4u-2.6/src/mplutils.o
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
> bjC but not for C++
> <command-line>: warning: "_XOPEN_SOURCE" redefined
> <built-in>: warning: this is the location of the previous definition
> gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
> _ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
> /32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
> me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
> e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/cxx_extension
> s.cxx -o build/temp.solaris-2.10-sun4u-2.6/CXX/cxx_extensions.o
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
> bjC but not for C++
> <command-line>: warning: "_XOPEN_SOURCE" redefined
> <built-in>: warning: this is the location of the previous definition
> In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/Python.h:8,
> from ./CXX/WrapPython.h:58,
> from CXX/cxx_extensions.cxx:37:
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
> arning: "_FILE_OFFSET_BITS" redefined
> In file included from /usr/include/sys/time.h:24,
> from ./CXX/WrapPython.h:43,
> from CXX/cxx_extensions.cxx:37:
> /usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
> re_tests.h:197:1: warning: this is the location of the previous definition
> gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
> _ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
> /32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
> me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
> e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/cxxsupport.cx
> x -o build/temp.solaris-2.10-sun4u-2.6/CXX/cxxsupport.o
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
> bjC but not for C++
> <command-line>: warning: "_XOPEN_SOURCE" redefined
> <built-in>: warning: this is the location of the previous definition
> In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/Python.h:8,
> from ./CXX/WrapPython.h:58,
> from CXX/cxxsupport.cxx:37:
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
> arning: "_FILE_OFFSET_BITS" redefined
> In file included from /usr/include/sys/time.h:24,
> from ./CXX/WrapPython.h:43,
> from CXX/cxxsupport.cxx:37:
> /usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
> re_tests.h:197:1: warning: this is the location of the previous definition
> gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
> _ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
> /32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
> me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
> e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/IndirectPytho
> nInterface.cxx -o build/temp.solaris-2.10-sun4u-2.6/CXX/IndirectPythonInterface.
> o
> cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
> bjC but not for C++
> <command-line>: warning: "_XOPEN_SOURCE" redefined
> <built-in>: warning: this is the location of the previous definition
> In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/Python.h:8,
> from ./CXX/WrapPython.h:58,
> from CXX/IndirectPythonInterface.cxx:37:
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
> arning: "_FILE_OFFSET_BITS" redefined
> In file included from /usr/include/sys/time.h:24,
> from ./CXX/WrapPython.h:43,
> from CXX/IndirectPythonInterface.cxx:37:
> /usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
> re_tests.h:197:1: warning: this is the location of the previous definition
> gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
> _ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
> /32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
> me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
> e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/cxxextensions
> .c -o build/temp.solaris-2.10-sun4u-2.6/CXX/cxxextensions.o
> In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/Python.h:8,
> from ./CXX/WrapPython.h:58,
> from CXX/cxxextensions.c:37:
> /export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
> arning: "_FILE_OFFSET_BITS" redefined
> In file included from /usr/include/sys/time.h:24,
> from ./CXX/WrapPython.h:43,
> from CXX/cxxextensions.c:37:
> /usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
> re_tests.h:197:1: warning: this is the location of the previous definition
> In file included from /usr/include/sys/wait.h:23,
> from /usr/include/stdlib.h:22,
> from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/Python.h:42,
> from ./CXX/WrapPython.h:58,
> from CXX/cxxextensions.c:37:
> /usr/include/sys/resource.h:146: error: field 'ru_utime' has incomplete type
> /usr/include/sys/resource.h:147: error: field 'ru_stime' has incomplete type
> In file included from /usr/include/sys/termio.h:13,
> from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/pyport.h:472,
> from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
> 6/Python.h:58,
> from ./CXX/WrapPython.h:58,
> from CXX/cxxextensions.c:37:
> /usr/include/sys/termios.h:375: error: field 'tv' has incomplete type
> error: command 'gcc' failed with exit status 1
> Error building matplotlib package.
>
> real 0m51.119s
> user 0m47.346s
> sys 0m3.132s
> sage: An error occurred while installing matplotlib-0.99.3-svn8415-with-D_XOPEN_
> SOURCE
> Please email sage-devel http://groups.google.com/group/sage-devel
> explaining the problem and send the relevant part of
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Dr. D. K. <dav...@on...> - 2010年06月12日 01:24:45
On 06/11/10 10:28 PM, Eric Firing wrote:
> On 06/11/2010 10:54 AM, Dr. David Kirkby wrote:
>> The latest stable (0.99.3) matplotlib builds ok on Solaris 10 03/05 on SPARC.
>>
>> However, your latest trunc release has some useful fixes, so it was downloaded
>> by a fellow Sage devloper. However, when I try to build this version on a Sun
>> Blade 1000 running Solaris 10 03/05, it presents a problem:
>>
>> /usr/include/stdlib.h:144: error: declaration of C function 'void swab(const
>> char*, char*, ssize_t)' conflicts with
>> /usr/include/unistd.h:480: error: previous declaration 'void swab(const void*,
>> void*, ssize_t)' here
>> error: command 'gcc' failed with exit status 1
>> Error building matplotlib package.
>>
>>
>> There are two declarations of 'swab' in the Solaris header files, and what one
>> you get depends on the compilation mode. The reasons are explained in the
>> Solaris header files.
>>
>> The issue is traced at
>>
>> http://trac.sagemath.org/sage_trac/ticket/9202
>>
>> where you will see the full error message and attachments of the header files.
>>
>> For this, gcc 4.4.4 was used.
>
> Can you get it to work by adding "-D_XOPEN_SOURCE" to your CFLAGS
> environment variable?
>
> Eric
I did reply, but I think off-list by mistake. So I'll reply to the list.
I think this actually causes the build to break earlier.
Do you have access to Sun SPARC hardware? If not, I can almost certainly arrange 
access to a Sun T5240 (16 core) at the University of Washington for a serious 
matplotlib developer.
Dave
ld/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_image
copying lib/matplotlib/tests/baseline_images/test_image/image_interps.svg -> bui
ld/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_image
creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
mathtext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.pdf -> build
/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.png -> build
/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext.svg -> build
/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.pdf ->
build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.png ->
build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stix.svg ->
build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_mathtext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.pdf
 -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_matht
ext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.png
 -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_matht
ext
copying lib/matplotlib/tests/baseline_images/test_mathtext/mathtext_stixsans.svg
 -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_matht
ext
creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
simplification
copying lib/matplotlib/tests/baseline_images/test_simplification/clipping.pdf ->
 build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
cation
copying lib/matplotlib/tests/baseline_images/test_simplification/clipping.png ->
 build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
cation
copying lib/matplotlib/tests/baseline_images/test_simplification/clipping.svg ->
 build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
cation
copying lib/matplotlib/tests/baseline_images/test_simplification/clipping_diamon
d.pdf -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
simplification
copying lib/matplotlib/tests/baseline_images/test_simplification/clipping_diamon
d.png -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
simplification
copying lib/matplotlib/tests/baseline_images/test_simplification/clipping_diamon
d.svg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
simplification
copying lib/matplotlib/tests/baseline_images/test_simplification/fft_peaks.pdf -
 > build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplif
ication
copying lib/matplotlib/tests/baseline_images/test_simplification/fft_peaks.png -
 > build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplif
ication
copying lib/matplotlib/tests/baseline_images/test_simplification/fft_peaks.svg -
 > build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplif
ication
copying lib/matplotlib/tests/baseline_images/test_simplification/hatch_simplify.
pdf -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
mplification
copying lib/matplotlib/tests/baseline_images/test_simplification/hatch_simplify.
png -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
mplification
copying lib/matplotlib/tests/baseline_images/test_simplification/hatch_simplify.
svg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
mplification
copying lib/matplotlib/tests/baseline_images/test_simplification/overflow.pdf ->
 build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
cation
copying lib/matplotlib/tests/baseline_images/test_simplification/overflow.png ->
 build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
cation
copying lib/matplotlib/tests/baseline_images/test_simplification/overflow.svg ->
 build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_simplifi
cation
copying lib/matplotlib/tests/baseline_images/test_simplification/simplify_curve.
pdf -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
mplification
copying lib/matplotlib/tests/baseline_images/test_simplification/simplify_curve.
png -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
mplification
copying lib/matplotlib/tests/baseline_images/test_simplification/simplify_curve.
svg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_si
mplification
creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
spines
copying lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.p
df -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_spi
nes
copying lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.p
ng -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_spi
nes
copying lib/matplotlib/tests/baseline_images/test_spines/spines_axes_positions.s
vg -> build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_spi
nes
creating build/lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_
text
copying lib/matplotlib/tests/baseline_images/test_text/font_styles.pdf -> build/
lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
copying lib/matplotlib/tests/baseline_images/test_text/font_styles.png -> build/
lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
copying lib/matplotlib/tests/baseline_images/test_text/font_styles.svg -> build/
lib.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
copying lib/matplotlib/tests/baseline_images/test_text/multiline.pdf -> build/li
b.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
copying lib/matplotlib/tests/baseline_images/test_text/multiline.png -> build/li
b.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
copying lib/matplotlib/tests/baseline_images/test_text/multiline.svg -> build/li
b.solaris-2.10-sun4u-2.6/matplotlib/tests/baseline_images/test_text
copying lib/dateutil/zoneinfo/zoneinfo-2010g.tar.gz -> build/lib.solaris-2.10-su
n4u-2.6/dateutil/zoneinfo
running build_ext
building 'matplotlib.ft2font' extension
creating build/temp.solaris-2.10-sun4u-2.6
creating build/temp.solaris-2.10-sun4u-2.6/src
creating build/temp.solaris-2.10-sun4u-2.6/CXX
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
/32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c src/ft2font.cpp -
o build/temp.solaris-2.10-sun4u-2.6/src/ft2font.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
bjC but not for C++
<command-line>: warning: "_XOPEN_SOURCE" redefined
<built-in>: warning: this is the location of the previous definition
In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/Python.h:8,
 from ./CXX/WrapPython.h:58,
 from ./CXX/Extensions.hxx:37,
 from src/ft2font.h:4,
 from src/ft2font.cpp:1:
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
arning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/sys/time.h:24,
 from ./CXX/WrapPython.h:43,
 from ./CXX/Extensions.hxx:37,
 from src/ft2font.h:4,
 from src/ft2font.cpp:1:
/usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
re_tests.h:197:1: warning: this is the location of the previous definition
src/ft2font.cpp: In member function 'Py::Object FT2Font::get_sfnt_table(const Py
::Tuple&)':
src/ft2font.cpp:1569: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
src/ft2font.cpp:1572: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
src/ft2font.cpp:1597: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
src/ft2font.cpp:1661: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
src/ft2font.cpp:1684: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
src/ft2font.cpp:1705: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
src/ft2font.cpp:1708: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
src/ft2font.cpp:1725: warning: dereferencing type-punned pointer will break stri
ct-aliasing rules
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
/32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c src/mplutils.cpp
-o build/temp.solaris-2.10-sun4u-2.6/src/mplutils.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
bjC but not for C++
<command-line>: warning: "_XOPEN_SOURCE" redefined
<built-in>: warning: this is the location of the previous definition
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
/32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/cxx_extension
s.cxx -o build/temp.solaris-2.10-sun4u-2.6/CXX/cxx_extensions.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
bjC but not for C++
<command-line>: warning: "_XOPEN_SOURCE" redefined
<built-in>: warning: this is the location of the previous definition
In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/Python.h:8,
 from ./CXX/WrapPython.h:58,
 from CXX/cxx_extensions.cxx:37:
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
arning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/sys/time.h:24,
 from ./CXX/WrapPython.h:43,
 from CXX/cxx_extensions.cxx:37:
/usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
re_tests.h:197:1: warning: this is the location of the previous definition
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
/32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/cxxsupport.cx
x -o build/temp.solaris-2.10-sun4u-2.6/CXX/cxxsupport.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
bjC but not for C++
<command-line>: warning: "_XOPEN_SOURCE" redefined
<built-in>: warning: this is the location of the previous definition
In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/Python.h:8,
 from ./CXX/WrapPython.h:58,
 from CXX/cxxsupport.cxx:37:
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
arning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/sys/time.h:24,
 from ./CXX/WrapPython.h:43,
 from CXX/cxxsupport.cxx:37:
/usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
re_tests.h:197:1: warning: this is the location of the previous definition
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
/32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/IndirectPytho
nInterface.cxx -o build/temp.solaris-2.10-sun4u-2.6/CXX/IndirectPythonInterface.
o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/O
bjC but not for C++
<command-line>: warning: "_XOPEN_SOURCE" redefined
<built-in>: warning: this is the location of the previous definition
In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/Python.h:8,
 from ./CXX/WrapPython.h:58,
 from CXX/IndirectPythonInterface.cxx:37:
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
arning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/sys/time.h:24,
 from ./CXX/WrapPython.h:43,
 from CXX/IndirectPythonInterface.cxx:37:
/usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
re_tests.h:197:1: warning: this is the location of the previous definition
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -D_XOPEN_SOURCE -fPIC -DPY
_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/export/home/drkirkby
/32/sage-4.4.3/local/lib/python2.6/site-packages/numpy/core/include -I/export/ho
me/drkirkby/32/sage-4.4.3/local/include/freetype2 -I/export/home/drkirkby/32/sag
e-4.4.3/local/include -I/export/home/drkirkby/32/sage-4.4.3/local/include -I. -I
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6 -c CXX/cxxextensions
.c -o build/temp.solaris-2.10-sun4u-2.6/CXX/cxxextensions.o
In file included from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/Python.h:8,
 from ./CXX/WrapPython.h:58,
 from CXX/cxxextensions.c:37:
/export/home/drkirkby/32/sage-4.4.3/local/include/python2.6/pyconfig.h:1013:1: w
arning: "_FILE_OFFSET_BITS" redefined
In file included from /usr/include/sys/time.h:24,
 from ./CXX/WrapPython.h:43,
 from CXX/cxxextensions.c:37:
/usr/local/gcc-4.4.3/lib/gcc/sparc-sun-solaris2.10/4.4.3/include-fixed/sys/featu
re_tests.h:197:1: warning: this is the location of the previous definition
In file included from /usr/include/sys/wait.h:23,
 from /usr/include/stdlib.h:22,
 from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/Python.h:42,
 from ./CXX/WrapPython.h:58,
 from CXX/cxxextensions.c:37:
/usr/include/sys/resource.h:146: error: field 'ru_utime' has incomplete type
/usr/include/sys/resource.h:147: error: field 'ru_stime' has incomplete type
In file included from /usr/include/sys/termio.h:13,
 from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/pyport.h:472,
 from /export/home/drkirkby/32/sage-4.4.3/local/include/python2.
6/Python.h:58,
 from ./CXX/WrapPython.h:58,
 from CXX/cxxextensions.c:37:
/usr/include/sys/termios.h:375: error: field 'tv' has incomplete type
error: command 'gcc' failed with exit status 1
Error building matplotlib package.
real 0m51.119s
user 0m47.346s
sys 0m3.132s
sage: An error occurred while installing matplotlib-0.99.3-svn8415-with-D_XOPEN_
SOURCE
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
From: Eric F. <ef...@ha...> - 2010年06月11日 21:28:14
On 06/11/2010 10:54 AM, Dr. David Kirkby wrote:
> The latest stable (0.99.3) matplotlib builds ok on Solaris 10 03/05 on SPARC.
>
> However, your latest trunc release has some useful fixes, so it was downloaded
> by a fellow Sage devloper. However, when I try to build this version on a Sun
> Blade 1000 running Solaris 10 03/05, it presents a problem:
>
> /usr/include/stdlib.h:144: error: declaration of C function 'void swab(const
> char*, char*, ssize_t)' conflicts with
> /usr/include/unistd.h:480: error: previous declaration 'void swab(const void*,
> void*, ssize_t)' here
> error: command 'gcc' failed with exit status 1
> Error building matplotlib package.
>
>
> There are two declarations of 'swab' in the Solaris header files, and what one
> you get depends on the compilation mode. The reasons are explained in the
> Solaris header files.
>
> The issue is traced at
>
> http://trac.sagemath.org/sage_trac/ticket/9202
>
> where you will see the full error message and attachments of the header files.
>
> For this, gcc 4.4.4 was used.
Can you get it to work by adding "-D_XOPEN_SOURCE" to your CFLAGS 
environment variable?
Eric
>
> Dave
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: MedEng1 <rya...@ms...> - 2010年06月11日 20:58:21
I'm relatively new to matplotlib so I need some help. I'm trying to make a
direction field plot for visualzing solutions to differential eqs. My first
attempt at a simple plot came out all right but I can't figure out why the
plotted lines are not the same length. The block of code that does all of
the work is...
for x in ax1.xaxis.iter_ticks(): #Iterate
over x-ticks
 for y in ax1.yaxis.iter_ticks(): #iterate
over y-ticks 
 
# Solve for local slope at point to be evaluated (dy/dx)
 yp = 9.8 - ((np.float(y[1]))/4) #yp = y` as
in dy/dx
 
 
# Plot line based on slope
 cpx = np.float(x[1]) #cpx = x-coord of line center,
convert x-tick value to float
 cpy = np.float(y[1]) #cpy = y-coord of line center,
covnert y-tick value to float
 
 a = np.arctan(yp) #a = angle between line and
horizontal
 
 
 px = np.cos(a)*(L/2) #px = x offset from line center to
end
 py = np.sin(a)*(L/2) #py = y offset from line center
to end
 tpx = cpx + px #tpx = x-coord of right hand
end of line
 tpy = cpy + py #tpy = y-coord of right hand
end of line
 bpx = cpx - px #bpx = x-coord of left hand end
of line
 bpy = cpy - py #bpy = y-coord of left hand end
of line
 
 Length = np.sqrt(((tpx-bpx)**2)+((tpy-bpy)**2))
 #just a quick check of the line length accoring to the coordinates of
the ends
 ax1.plot([bpx, tpx], [bpy, tpy], color='black', linewidth=0.75)
As you can see in the attached figure (see below), the lines seem to plot in
the right locations and right angles but the lengths are not constant (not
intended - seem to be twice as long near the middle of the chart). Am I
missing something obvious? Why are the lines near the center of the chart
longer? Thanks in advance for any help provided.
-Ryan
http://old.nabble.com/file/p28859981/img1.png 
-- 
View this message in context: http://old.nabble.com/Need-help-with-direction-field-plot-tp28859981p28859981.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Dr. D. K. <dav...@on...> - 2010年06月11日 20:55:32
The latest stable (0.99.3) matplotlib builds ok on Solaris 10 03/05 on SPARC.
However, your latest trunc release has some useful fixes, so it was downloaded 
by a fellow Sage devloper. However, when I try to build this version on a Sun 
Blade 1000 running Solaris 10 03/05, it presents a problem:
/usr/include/stdlib.h:144: error: declaration of C function 'void swab(const 
char*, char*, ssize_t)' conflicts with
/usr/include/unistd.h:480: error: previous declaration 'void swab(const void*, 
void*, ssize_t)' here
error: command 'gcc' failed with exit status 1
Error building matplotlib package.
There are two declarations of 'swab' in the Solaris header files, and what one 
you get depends on the compilation mode. The reasons are explained in the 
Solaris header files.
The issue is traced at
http://trac.sagemath.org/sage_trac/ticket/9202
where you will see the full error message and attachments of the header files.
For this, gcc 4.4.4 was used.
Dave
From: Oz N. <na...@gm...> - 2010年06月11日 20:51:48
Hi Everyone,
I'd like to know, what is the underline mechanism that connects the points
of my gridded data when I use
contour().
Can I control this mechanism ?
Maybe I missed it in the documentation, but it's not clear to me.
Thanks in advance,
-- 
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And no religion too
Imagine all the people
Living life in peace
From: Jeff P. <je...@gm...> - 2010年06月11日 15:53:35
Clearing the font cache works too. Although, judging from the debug output,
it still seems to find the fonts in the system directories. There are no
fonts in the matplotlib site-packed dir:
[jsp@psy86] 1014:$ ls
/usr/lib64/python2.6/site-packages/matplotlib/mpl-data/
example/ images/ lineprops.glade matplotlib.conf matplotlibrc
I installed matplotlib with gnome package kit from the fc12 repos. I
manually installed stix only after seeing this problem (after my font cache
was already hosed).
...
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0
to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
0.100000
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneral.otf) with score of
0.000000
findfont: Matching
:family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize1 (/usr/share/fonts/stix/STIXSiz1Sym.otf) with score of 0.000000
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneralBol.otf) with score of
0.000000
findfont: Matching
:family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize3 (/usr/share/fonts/stix/STIXSiz3Sym.otf) with score of 0.000000
findfont: Matching
:family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize4 (/usr/share/fonts/stix/STIXSiz4Sym.otf) with score of 0.000000
findfont: Matching
:family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize5 (/usr/share/fonts/stix/STIXSiz5Sym.otf) with score of 0.000000
findfont: Matching
:family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXSize2 (/usr/share/fonts/stix/STIXSiz2Sym.otf) with score of 0.000000
findfont: Matching
:family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneralItalic.otf) with score of
0.000000
findfont: Matching
:family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXNonUnicode (/usr/share/fonts/stix/STIXNonUniIta.otf) with score of
0.000000
findfont: Matching
:family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXNonUnicode (/usr/share/fonts/stix/STIXNonUni.otf) with score of
0.000000
findfont: Matching
:family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
to STIXNonUnicode (/usr/share/fonts/stix/STIXNonUniBol.otf) with score of
0.000000
findfont: Could not match
:family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/un-core/UnDotum.ttf
findfont: Could not match
:family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/un-core/UnDotum.ttf
findfont: Matching
:family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmmi10 (/usr/share/fonts/lyx/cmmi10.ttf) with score of 0.000000
findfont: Matching
:family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmex10 (/usr/share/fonts/lyx/cmex10.ttf) with score of 0.000000
findfont: Matching
:family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmsy10 (/usr/share/fonts/lyx/cmsy10.ttf) with score of 0.000000
findfont: Matching
:family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to cmr10 (/usr/share/fonts/lyx/cmr10.ttf) with score of 0.000000
findfont: Could not match
:family=cmss10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/un-core/UnDotum.ttf
> The problem here is that it isn't finding the STIX fonts in the
> matplotlib distribution, but from system locations -- and it's actually
> not finding all of them, only some.
>
> How did you install matplotlib? Did you try John's suggestion of
> clearing the font caches? Do you see any STIX ttf fonts under
>
> /usr/lib64/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf
>
> ?
>
> Mike
>
From: John H. <jd...@gm...> - 2010年06月11日 15:07:53
On Fri, Jun 11, 2010 at 9:38 AM, Jack Liddle <j.l...@fz...> wrote:
> Hello all.
>
> I'm trying to apply a transformation (Affine2D) to a text artist. For
> some reason the artist doesn't show up in the plot. I have a simple
> code here which demonstrates the problem. Any ideas what I'm doing
> wrong?
>
> Thanks
>
> Jack Liddle
>
> from numpy import *
> import matplotlib.pyplot as plt
> from matplotlib.text import Text
>
> fig = plt.figure()
>
> from matplotlib.transforms import Affine2D,Transform
> ax1 = fig.add_subplot(111)
>
> #Something to plot
> xs = linspace(0,1,100)
> ys = xs**2
> ax1.plot(xs,ys)
>
> #The transformation
> mytrans = Affine2D()
> print mytrans
> print isinstance(mytrans,Transform)
>
>
> t = Text(0.5,0.5,"Problems?",transform=mytrans)
> ax1.add_artist(t)
> plt.show()
The transformation must take input in your coordinate system and
output in display coordinate systems. The default Affine2D
transformation is identity, so you are transforming 0.5, 0.5 userland
coordinates to 0.5, 0.5 display. This display coordinate falls
outside the Axes window and so is being clipped. If you turn clipping
off, you will see part of your text in the lower left
t = Text(0.5, 0.5,"Problems?",transform=mytrans, clip_on=False)
If you want to see it in the middle of your plot, you could do something like
t = Text(200, 200,"Problems?",transform=mytrans, clip_on=False)
Note this transformation applies only to the x,y location of the text,
and will not transform the glyphs of the text.
See http://matplotlib.sourceforge.net/users/transforms_tutorial.html
for more details on transformations.
JDH
From: Benjamin R. <ben...@ou...> - 2010年06月11日 14:50:43
Ola,
Just to make sure, have you tried "ax.set_xticks([])"?
Ben Root
On Fri, Jun 11, 2010 at 3:05 AM, Ola Skavhaug <ska...@si...> wrote:
> Hi,
>
> I'm trying to remove the xtickmarks and ytickmarks from a 3d plot,
> without any success.
>
> The example I experiment with is the following:
>
> from mpl_toolkits.mplot3d import axes3d
> import matplotlib.pyplot as plt
>
> fig = plt.figure()
> ax = axes3d.Axes3D(fig)
> X, Y, Z = axes3d.get_test_data(0.05)
> cset = ax.contour(X, Y, Z, 16, extend3d=True)
> ax.clabel(cset, fontsize=9, inline=1)
>
> #One try that didn't work
> ax.set_xticklabels("")
>
> plt.show()
>
> It looks like the final plot ignores all my efforts in turning the
> ticks off. Any help on this matter would be greatly appreciated.
>
> Regards,
> --
> Ola Skavhaug
> Research Programmer
> Simula Research Laboratory
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jack L. <j.l...@fz...> - 2010年06月11日 14:38:21
Hello all.
I'm trying to apply a transformation (Affine2D) to a text artist. For
some reason the artist doesn't show up in the plot. I have a simple
code here which demonstrates the problem. Any ideas what I'm doing
wrong?
Thanks
Jack Liddle
from numpy import *
import matplotlib.pyplot as plt
from matplotlib.text import Text
fig = plt.figure()
from matplotlib.transforms import Affine2D,Transform
ax1 = fig.add_subplot(111)
#Something to plot
xs = linspace(0,1,100)
ys = xs**2
ax1.plot(xs,ys)
#The transformation
mytrans = Affine2D()
print mytrans
print isinstance(mytrans,Transform)
t = Text(0.5,0.5,"Problems?",transform=mytrans)
ax1.add_artist(t)
plt.show()
From: Michael D. <md...@st...> - 2010年06月11日 14:23:35
The problem here is that it isn't finding the STIX fonts in the 
matplotlib distribution, but from system locations -- and it's actually 
not finding all of them, only some.
How did you install matplotlib? Did you try John's suggestion of 
clearing the font caches? Do you see any STIX ttf fonts under
/usr/lib64/python2.6/site-packages/matplotlib/mpl-data/fonts/ttf
?
Mike
On 06/11/2010 10:18 AM, Jeff Perry wrote:
> I found that setting
>
> mathtext.fontset : stix
>
> fixed the problem.
>
> Here is the debug-annoying output when mathtext.fontset is not set:
>
> ./plotlut2.py lut2.txt "figure 1a"
> matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data
> loaded rc file /home/jsp/.matplotlib/matplotlibrc
> matplotlib version 0.99.1.1
> verbose.level debug-annoying
> interactive is False
> units is False
> platform is linux2
> loaded modules: ['numpy.lib._iotools', 'xml.sax.handler',
> 'numpy.core.info', 'distutils', 'matplotlib.errno', 'random',
> 'subprocess', 'gc', 'matplotlib.tempfile', 'numpy.lib.getlimits',
> 'ctypes._endian', 'encodings.encodings', 'matplotlib.colors',
> 'numpy.core.numerictypes', 'numpy.testing.sys',
> 'numpy.lib.__future__', 'xml', 'fnmatch', 'numpy.ma.operator',
> 'numpy.ma.cPickle', 'struct', 'numpy.random.info', 'tempfile',
> 'encodings.codecs', 'base64', 'numpy.linalg', 'matplotlib.threading',
> 'numpy.testing.operator', 'imp', 'numpy.testing', 'collections',
> 'numpy.core.umath', 'distutils.types', 'numpy.core.scalarmath',
> 'functools', 'zipimport', 'string', 'matplotlib.subprocess',
> 'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.arraysetops',
> 'numpy.testing.unittest', 'numpy.lib.math', 'encodings.utf_8',
> 'matplotlib.__future__', 'ssl', 'numpy.testing.re', 'itertools',
> 'numpy.version', 'numpy.lib.re', 'distutils.re', 'ctypes.os',
> 'numpy.core.os', 'numpy.lib.type_check', 'matplotlib.os',
> 'numpy.lib.__builtin__', 'signal', 'numpy.lib.types',
> 'numpy.lib._datasource', 'numpy.lib.io', 'numpy.ma.extras', 'token',
> 'numpy.fft.fftpack_lite', 'matplotlib.cbook', 'numpy.core.multiarray',
> 'numpy.__builtin__', 'dis', 'numpy.lib.itertools', 'cStringIO',
> 'numpy.ma.core', 'numpy.numpy', 'matplotlib.StringIO', 'locale',
> 'numpy.add_newdocs', 'distutils.sysconfig', 'xml.sax.urlparse',
> 'syslog', 'xml.sax.saxutils', 'matplotlib.numpy', 'numpy.lib.sys',
> 'encodings', 'numpy.ma.itertools', 'abc', 'numpy.ctypes',
> 'numpy.testing.decorators', 'matplotlib.warnings',
> 'matplotlib.string', 'numpy.lib.numpy', 'matplotlib.sys', 're',
> 'numpy.lib._compiled_base', 'threading', 'new', 'numpy.random.mtrand',
> 'math', 'numpy.fft.helper', 'fcntl', 'numpy.ma.warnings',
> 'matplotlib.fontconfig_pattern', 'numpy.fft.types', 'UserDict',
> 'inspect', 'distutils.os', '_ctypes', 'numpy.fft.numpy',
> 'xml.sax.codecs', 'numpy.lib.ufunclike', 'numpy.lib.info', 'ctypes',
> 'numpy.lib.warnings', 'ctypes.struct', 'numpy.core.sys',
> 'numpy.core._sort', 'numpy.os', 'paste', '_functools', '_locale',
> 'matplotlib.sre_constants', 'numpy.lib.shutil', 'thread', 'StringIO',
> 'numpy.core.memmap', 'traceback', 'weakref', 'numpy.core._internal',
> 'numpy.fft.fftpack', 'opcode', 'numpy.linalg.lapack_lite',
> 'distutils.sys', 'os', 'marshal', 'distutils.version', '__future__',
> '_collections', 'xml.sax.types', 'matplotlib.traceback', '_sre',
> 'unittest', 'codecs', 'numpy.random', 'numpy.linalg.numpy',
> '__builtin__', 'numpy.lib.twodim_base', 'matplotlib.copy',
> 'matplotlib.re', 'numpy.core.cPickle', 'operator', 'sre_constants',
> 'distutils.string', 'numpy.lib.arrayterator', 'select',
> 'ctypes._ctypes', 'ctypes.sys', 'matplotlib.datetime', 'posixpath',
> 'numpy.lib.financial', 'errno', '_socket', 'binascii',
> 'numpy.core.arrayprint', 'datetime', 'numpy.ma',
> 'matplotlib.matplotlib', 'os.path', 'tokenize',
> 'numpy.lib.stride_tricks', 'numpy.core.numpy', 'numpy', '_warnings',
> 'matplotlib.types', 'numpy.core.defmatrix', 'xml.sax.os', 'cPickle',
> 'encodings.__builtin__', 'matplotlib.xml', '_codecs',
> 'numpy.lib.operator', 'numpy.__config__', 'numpy.testing.utils',
> 'xml.sax.xmlreader', 'numpy.ma.numpy', 'copy', 'numpy.core.re',
> '_struct', 'numpy.core.fromnumeric', 'numpy.ctypeslib', 'keyword',
> 'numpy.lib.scimath', 'numpy.fft', 'numpy.lib', 'numpy.random.numpy',
> 'posix', 'encodings.aliases', 'numpy.lib.function_base', 'exceptions',
> 'sre_parse', 'abrt_exception_handler', 'pickle', 'numpy.core.ctypes',
> 'distutils.distutils', 'copy_reg', 'sre_compile', 'xml.sax',
> '_random', 'site', 'numpy.lib.polynomial', 'urllib',
> 'numpy._import_tools', '__main__', 'numpy.fft.info',
> 'numpy.core.records', 'numpy.core._dotblas', 'numpy.lib.cPickle',
> 'numpy.sys', 'matplotlib.weakref', 'urlparse', 'xml.sax.urllib',
> 'shutil', 'numpy.testing.traceback', 'strop',
> 'numpy.testing.numpytest', 'numpy.core.numeric', 'numpy.linalg.info',
> 'numpy.core.defchararray', '_abcoll', 'numpy.core',
> 'matplotlib.rcsetup', 'matplotlib.time', 'xml.sax._exceptions',
> 'genericpath', 'stat', '_ssl', 'numpy.lib.index_tricks', 'warnings',
> 'numpy.lib.utils', 'numpy.lib.shape_base', 'numpy.core.types',
> 'textwrap', 'sys', 'numpy.core.warnings', 'socket',
> 'numpy.core.__builtin__', 'ctypes.ctypes', 'numpy.lib.format',
> 'numpy.lib.os', 'numpy.testing.nosetester', 'types', 'xml.sax.sys',
> 'matplotlib.distutils', '_weakref', 'numpy.ma.inspect',
> 'distutils.errors', 'matplotlib', 'linecache', 'matplotlib.shutil',
> 'numpy.lib.cStringIO', 'time', 'numpy.lib.machar',
> 'numpy.linalg.linalg', 'matplotlib.pyparsing']
> $HOME=/home/jsp
> CONFIGDIR=/home/jsp/.matplotlib
> Using fontManager instance from /home/jsp/.matplotlib/fontList.cache
> backend GTKAgg version 2.16.0
> FigureCanvasAgg.draw
> RendererAgg.__init__
> RendererAgg.__init__ width=640.0, height=480.0
> RendererAgg.__init__ _RendererAgg done
> RendererAgg.__init__ done
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> findfont: Matching
> :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
> to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
> 0.100000
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> findfont: Matching
> :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0
> to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
> 0.100000
> findfont: Matching
> :family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
> to STIXGeneral (/usr/share/fonts/stix/STIXGeneral.otf) with score of
> 0.000000
> findfont: Could not match
> :family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Matching
> :family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
> to STIXGeneral (/usr/share/fonts/stix/STIXGeneralBol.otf) with score
> of 0.000000
> findfont: Could not match
> :family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Matching
> :family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
> to STIXGeneral (/usr/share/fonts/stix/STIXGeneralItalic.otf) with
> score of 0.000000
> findfont: Could not match
> :family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> findfont: Could not match
> :family=cmss10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
> Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
> RendererAgg.draw_text
> RendererAgg.draw_mathtext
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg.draw_mathtext
> RendererAgg._get_agg_font
> findfont: Matching
> :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large
> to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
> 0.100000
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg.points_to_pixels
> RendererAgg.points_to_pixels
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg._get_agg_font
> RendererAgg._get_agg_font
> RendererAgg.draw_text
> RendererAgg.draw_mathtext
> FigureCanvasAgg.buffer_rgba
> RendererAgg.buffer_rgba
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
From: Jeff P. <je...@gm...> - 2010年06月11日 14:18:40
I found that setting
 mathtext.fontset : stix
fixed the problem.
Here is the debug-annoying output when mathtext.fontset is not set:
./plotlut2.py lut2.txt "figure 1a"
matplotlib data path /usr/lib64/python2.6/site-packages/matplotlib/mpl-data
loaded rc file /home/jsp/.matplotlib/matplotlibrc
matplotlib version 0.99.1.1
verbose.level debug-annoying
interactive is False
units is False
platform is linux2
loaded modules: ['numpy.lib._iotools', 'xml.sax.handler',
'numpy.core.info', 'distutils', 'matplotlib.errno', 'random',
'subprocess', 'gc', 'matplotlib.tempfile', 'numpy.lib.getlimits',
'ctypes._endian', 'encodings.encodings', 'matplotlib.colors',
'numpy.core.numerictypes', 'numpy.testing.sys',
'numpy.lib.__future__', 'xml', 'fnmatch', 'numpy.ma.operator',
'numpy.ma.cPickle', 'struct', 'numpy.random.info', 'tempfile',
'encodings.codecs', 'base64', 'numpy.linalg', 'matplotlib.threading',
'numpy.testing.operator', 'imp', 'numpy.testing', 'collections',
'numpy.core.umath', 'distutils.types', 'numpy.core.scalarmath',
'functools', 'zipimport', 'string', 'matplotlib.subprocess',
'numpy.testing.os', 'matplotlib.locale', 'numpy.lib.arraysetops',
'numpy.testing.unittest', 'numpy.lib.math', 'encodings.utf_8',
'matplotlib.__future__', 'ssl', 'numpy.testing.re', 'itertools',
'numpy.version', 'numpy.lib.re', 'distutils.re', 'ctypes.os',
'numpy.core.os', 'numpy.lib.type_check', 'matplotlib.os',
'numpy.lib.__builtin__', 'signal', 'numpy.lib.types',
'numpy.lib._datasource', 'numpy.lib.io', 'numpy.ma.extras', 'token',
'numpy.fft.fftpack_lite', 'matplotlib.cbook', 'numpy.core.multiarray',
'numpy.__builtin__', 'dis', 'numpy.lib.itertools', 'cStringIO',
'numpy.ma.core', 'numpy.numpy', 'matplotlib.StringIO', 'locale',
'numpy.add_newdocs', 'distutils.sysconfig', 'xml.sax.urlparse',
'syslog', 'xml.sax.saxutils', 'matplotlib.numpy', 'numpy.lib.sys',
'encodings', 'numpy.ma.itertools', 'abc', 'numpy.ctypes',
'numpy.testing.decorators', 'matplotlib.warnings',
'matplotlib.string', 'numpy.lib.numpy', 'matplotlib.sys', 're',
'numpy.lib._compiled_base', 'threading', 'new', 'numpy.random.mtrand',
'math', 'numpy.fft.helper', 'fcntl', 'numpy.ma.warnings',
'matplotlib.fontconfig_pattern', 'numpy.fft.types', 'UserDict',
'inspect', 'distutils.os', '_ctypes', 'numpy.fft.numpy',
'xml.sax.codecs', 'numpy.lib.ufunclike', 'numpy.lib.info', 'ctypes',
'numpy.lib.warnings', 'ctypes.struct', 'numpy.core.sys',
'numpy.core._sort', 'numpy.os', 'paste', '_functools', '_locale',
'matplotlib.sre_constants', 'numpy.lib.shutil', 'thread', 'StringIO',
'numpy.core.memmap', 'traceback', 'weakref', 'numpy.core._internal',
'numpy.fft.fftpack', 'opcode', 'numpy.linalg.lapack_lite',
'distutils.sys', 'os', 'marshal', 'distutils.version', '__future__',
'_collections', 'xml.sax.types', 'matplotlib.traceback', '_sre',
'unittest', 'codecs', 'numpy.random', 'numpy.linalg.numpy',
'__builtin__', 'numpy.lib.twodim_base', 'matplotlib.copy',
'matplotlib.re', 'numpy.core.cPickle', 'operator', 'sre_constants',
'distutils.string', 'numpy.lib.arrayterator', 'select',
'ctypes._ctypes', 'ctypes.sys', 'matplotlib.datetime', 'posixpath',
'numpy.lib.financial', 'errno', '_socket', 'binascii',
'numpy.core.arrayprint', 'datetime', 'numpy.ma',
'matplotlib.matplotlib', 'os.path', 'tokenize',
'numpy.lib.stride_tricks', 'numpy.core.numpy', 'numpy', '_warnings',
'matplotlib.types', 'numpy.core.defmatrix', 'xml.sax.os', 'cPickle',
'encodings.__builtin__', 'matplotlib.xml', '_codecs',
'numpy.lib.operator', 'numpy.__config__', 'numpy.testing.utils',
'xml.sax.xmlreader', 'numpy.ma.numpy', 'copy', 'numpy.core.re',
'_struct', 'numpy.core.fromnumeric', 'numpy.ctypeslib', 'keyword',
'numpy.lib.scimath', 'numpy.fft', 'numpy.lib', 'numpy.random.numpy',
'posix', 'encodings.aliases', 'numpy.lib.function_base', 'exceptions',
'sre_parse', 'abrt_exception_handler', 'pickle', 'numpy.core.ctypes',
'distutils.distutils', 'copy_reg', 'sre_compile', 'xml.sax',
'_random', 'site', 'numpy.lib.polynomial', 'urllib',
'numpy._import_tools', '__main__', 'numpy.fft.info',
'numpy.core.records', 'numpy.core._dotblas', 'numpy.lib.cPickle',
'numpy.sys', 'matplotlib.weakref', 'urlparse', 'xml.sax.urllib',
'shutil', 'numpy.testing.traceback', 'strop',
'numpy.testing.numpytest', 'numpy.core.numeric', 'numpy.linalg.info',
'numpy.core.defchararray', '_abcoll', 'numpy.core',
'matplotlib.rcsetup', 'matplotlib.time', 'xml.sax._exceptions',
'genericpath', 'stat', '_ssl', 'numpy.lib.index_tricks', 'warnings',
'numpy.lib.utils', 'numpy.lib.shape_base', 'numpy.core.types',
'textwrap', 'sys', 'numpy.core.warnings', 'socket',
'numpy.core.__builtin__', 'ctypes.ctypes', 'numpy.lib.format',
'numpy.lib.os', 'numpy.testing.nosetester', 'types', 'xml.sax.sys',
'matplotlib.distutils', '_weakref', 'numpy.ma.inspect',
'distutils.errors', 'matplotlib', 'linecache', 'matplotlib.shutil',
'numpy.lib.cStringIO', 'time', 'numpy.lib.machar',
'numpy.linalg.linalg', 'matplotlib.pyparsing']
$HOME=/home/jsp
CONFIGDIR=/home/jsp/.matplotlib
Using fontManager instance from /home/jsp/.matplotlib/fontList.cache
backend GTKAgg version 2.16.0
FigureCanvasAgg.draw
RendererAgg.__init__
RendererAgg.__init__ width=640.0, height=480.0
RendererAgg.__init__ _RendererAgg done
RendererAgg.__init__ done
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium
to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
0.100000
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=16.0
to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
0.100000
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneral.otf) with score of
0.000000
findfont: Could not match
:family=STIXSize1:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Matching
:family=STIXGeneral:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneralBol.otf) with score
of 0.000000
findfont: Could not match
:family=STIXSize3:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXSize4:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXSize5:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXSize2:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Matching
:family=STIXGeneral:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0
to STIXGeneral (/usr/share/fonts/stix/STIXGeneralItalic.otf) with
score of 0.000000
findfont: Could not match
:family=STIXNonUnicode:style=italic:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXNonUnicode:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=STIXNonUnicode:style=normal:variant=normal:weight=bold:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmb10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmtt10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmmi10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmex10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmsy10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmr10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
findfont: Could not match
:family=cmss10:style=normal:variant=normal:weight=normal:stretch=normal:size=12.0.
Returning /usr/share/fonts/thai-scalable/Waree-Oblique.ttf
RendererAgg.draw_text
RendererAgg.draw_mathtext
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg.draw_mathtext
RendererAgg._get_agg_font
findfont: Matching
:family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=large
to DejaVu Sans (/usr/share/fonts/dejavu/DejaVuSans.ttf) with score of
0.100000
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg.points_to_pixels
RendererAgg.points_to_pixels
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg._get_agg_font
RendererAgg._get_agg_font
RendererAgg.draw_text
RendererAgg.draw_mathtext
FigureCanvasAgg.buffer_rgba
RendererAgg.buffer_rgba
From: John H. <jd...@gm...> - 2010年06月11日 13:12:58
On Fri, Jun 11, 2010 at 7:50 AM, Michael Droettboom <md...@st...> wrote:
> Can you set the rcParam 'verbose.level' to 'debug-annoying' and send us the
> output?
>
> What version of matplotlib? Which backend?
You may also want to clear your fonts and tex cache
 rm -rf ~/.matplotlib/font*.cache
 rm -rf ~/.matplotlib/tex.cache
though this is probably not the source of your problems....
JDH
From: Michael D. <md...@st...> - 2010年06月11日 12:50:47
Can you set the rcParam 'verbose.level' to 'debug-annoying' and send us 
the output?
What version of matplotlib? Which backend?
Mike
On 06/10/2010 04:03 PM, Jeff Perry wrote:
> When I run the following, I get gibberish for the math symbols: ),?,"
> instead of alph's, beta's, ..., etc.
>
> I believe I have all the correct fonts installed: stix, computer
> modern. I have tex and latex installed.
>
> Any suggestions? I am running FC12.
>
> Thanks,
> Jeff
>
> 1 import numpy as np
> 2 import matplotlib.pyplot as plt
> 3 t = np.arange(0.0, 2.0, 0.01)
> 4 s = np.sin(2*np.pi*t)
> 5
> 6 plt.plot(t,s)
> 7 plt.title(r'$\alpha_i> \beta_i$', fontsize=20)
> 8 plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
> 9 plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
> 10 fontsize=20)
> 11 plt.xlabel('time (s)')
> 12 plt.ylabel('volts (mV)')
> 13 plt.show()
> 
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Space Telescope Science Institute
Baltimore, Maryland, USA
From: Pablo A. <pab...@ua...> - 2010年06月11日 11:03:55
 Hello!
 I wonder if there is a way to make 3d plots specifying arbitrary
colors, instead of having the color be a function of the height. I was
able to achieve this making minimal changes to the plot_surface method
of Axes3D, adding as an optional keyword argument a function *cfun*
which specifies the color (it specifies a real number that is mapped
into a color by the color map *cmap*). But is there a standard way?
 Regard
Pablo Angulo
from matplotlib.colors import Normalize, colorConverter
def plot_surface(self, X, Y, Z, *args, **kwargs):
 '''
 Create a surface plot.
 By default it will be colored in shades of a solid color,
 but it also supports color mapping by supplying the *cmap*
 argument.
 ========== ================================================
 Argument Description
 ========== ================================================
 *X*, *Y*, Data values as numpy.arrays
 *Z*
 *rstride* Array row stride (step size)
 *cstride* Array column stride (step size)
 *color* Color of the surface patches
 *cmap* A colormap for the surface patches.
 *cfun* The function giving the color
 ========== ================================================
 '''
 had_data = self.has_data()
 rows, cols = Z.shape
 tX, tY, tZ = np.transpose(X), np.transpose(Y), np.transpose(Z)
 rstride = kwargs.pop('rstride', 10)
 cstride = kwargs.pop('cstride', 10)
 color = kwargs.pop('color', 'b')
 color = np.array(colorConverter.to_rgba(color))
 cmap = kwargs.get('cmap', None)
* cfun = kwargs.pop('cfun', None)*
 polys = []
 normals = []
 avgz = []
* if not cfun:*
* cfun = lambda p:p[2]*
 for rs in np.arange(0, rows-1, rstride):
 for cs in np.arange(0, cols-1, cstride):
 ps = []
 corners = []
 for a, ta in [(X, tX), (Y, tY), (Z, tZ)]:
 ztop = a[rs][cs:min(cols, cs+cstride+1)]
 zleft = ta[min(cols-1, cs+cstride)][rs:min(rows, rs+rstride+1)]
 zbase = a[min(rows-1, rs+rstride)][cs:min(cols, cs+cstride+1):]
 zbase = zbase[::-1]
 zright = ta[cs][rs:min(rows, rs+rstride+1):]
 zright = zright[::-1]
 corners.append([ztop[0], ztop[-1], zbase[0], zbase[-1]])
 z = np.concatenate((ztop, zleft, zbase, zright))
 ps.append(z)
 # The construction leaves the array with duplicate points, which
 # are removed here.
 ps = zip(*ps)
 lastp = np.array([])
 ps2 = []
 avgzsum = 0.0
 for p in ps:
 if p != lastp:
 ps2.append(p)
 lastp = p
 *avgzsum += cfun(p)*
 polys.append(ps2)
 avgz.append(avgzsum / len(ps2))
 v1 = np.array(ps2[0]) - np.array(ps2[1])
 v2 = np.array(ps2[2]) - np.array(ps2[0])
 normals.append(np.cross(v1, v2))
 polyc = art3d.Poly3DCollection(polys, *args, **kwargs)
 if cmap is not None:
 polyc.set_array(np.array(avgz))
 polyc.set_linewidth(0)
 else:
 colors = self._shade_colors(color, normals)
 polyc.set_facecolors(colors)
 self.add_collection(polyc)
 self.auto_scale_xyz(X, Y, Z, had_data)
 return polyc
From: Ola S. <ska...@si...> - 2010年06月11日 08:05:11
Hi,
I'm trying to remove the xtickmarks and ytickmarks from a 3d plot,
without any success.
The example I experiment with is the following:
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
fig = plt.figure()
ax = axes3d.Axes3D(fig)
X, Y, Z = axes3d.get_test_data(0.05)
cset = ax.contour(X, Y, Z, 16, extend3d=True)
ax.clabel(cset, fontsize=9, inline=1)
#One try that didn't work
ax.set_xticklabels("")
plt.show()
It looks like the final plot ignores all my efforts in turning the
ticks off. Any help on this matter would be greatly appreciated.
Regards,
-- 
Ola Skavhaug
Research Programmer
Simula Research Laboratory
From: Jeff W. <js...@fa...> - 2010年06月10日 21:47:47
On 6/10/10 3:28 PM, Benjamin Root wrote:
>
>
> On Thu, Jun 10, 2010 at 1:00 PM, Jae-Joon Lee <lee...@gm... 
> <mailto:lee...@gm...>> wrote:
>
> On Thu, Jun 10, 2010 at 12:47 PM, Benjamin Root <ben...@ou...
> <mailto:ben...@ou...>> wrote:
> > P.S. - I have found a 'bug' of sorts with using 'box-forced' for
> Basemap and
> > AxesGrid. For the displayed plot, if one were to zoom in on one
> of the
> > plots, the other plots will zoom in as well (which I think is
> neat), but
> > they won't update their bbox to completely match the zoomed-in
> axes. I
> > guess this would be an argument against using 'box-forced'?
>
> By default, x-axis is shared along the axes in a same column and
> y-axis is shared along the axes in a same raw. i.e., in your example,
> only the y-axis are shared which I think is the source of your issue.
>
> http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#axesgrid
>
> I think what you want is to use share_all=True.
>
> grid = AxesGrid(fig, 111,
> nrows_ncols=(1, 3),
> axes_pad=0.1,
> share_all=True,
> cbar_mode='single',
> cbar_pad=0.05,
> cbar_size=0.08,
> )
>
> Is this solve your problem?
> Regards,
>
> -JJ
>
>
> Not that it was a "problem" per se, just merely an observation I had. 
> Anyway, I tried that and indeed, zooming on one box zoomed all of the 
> other boxes the same way. Might be good to include in the basemap 
> examples, maybe?
>
> Thanks,
> Ben Root
Ben: I've added a new example (fcstmaps_axesgrid.py) that does this.
-Jeff
-- 
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jef...@no...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg
From: mdekauwe <mde...@gm...> - 2010年06月10日 21:29:04
Hi,
yes as I understand it (happy to be corrected)...
fig = plt.figure(figsize=(8, 4))
fig.subplots_adjust(bottom=0.05)
does nothing unless you also do 
ax = fig.add_subplot(111)
but as I am also doing 
ax = fig.add_axes([0.1, 0.15, 0.7, 0.7]), it means I would just get two
frames.
Benjamin Root-2 wrote:
> 
> Just to make sure, were you calling subplots_adjust() *before* calling
> subplot()? Calling it after subplot() shouldn't have an effect on the
> already created axes (I think...).
> 
> Ben Root
> 
> On Thu, Jun 10, 2010 at 3:41 PM, mdekauwe <mde...@gm...> wrote:
> 
>>
>> Unless I am mistaken subplots_adjust doesn't do anything as I am building
>> an
>> axes instance. Doing...
>>
>> fig = plt.figure(figsize=(8, 4))
>> ax = fig.add_axes([0.1, 0.15, 0.7, 0.7])
>>
>> has shrunk the white space, though I think the font of the legend looks a
>> bit less well defined, but perhaps that is just my eyes!
>>
>> http://old.nabble.com/file/p28848239/diffmap_JULES_DJF_snowFrac.GSWP2_vs_SSMI.jpeg
>>
>>
>>
>>
>> Jae-Joon Lee wrote:
>> >
>> > On Thu, Jun 10, 2010 at 1:55 PM, mdekauwe <mde...@gm...> wrote:
>> >> fig = plt.figure(figsize=(8, 6))
>> >
>> > This.
>> > Also play with subplots_adjust.
>> >
>> > -JJ
>> >
>> >
>> ------------------------------------------------------------------------------
>> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> > lucky parental unit. See the prize list and enter to win:
>> > http://p.sf.net/sfu/thinkgeek-promo
>> > _______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Removing-white-space-surrounding-plots-tp28824528p28848239.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>>
>> ------------------------------------------------------------------------------
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit. See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit. See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://old.nabble.com/Removing-white-space-surrounding-plots-tp28824528p28848795.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Benjamin R. <ben...@ou...> - 2010年06月10日 21:28:58
On Thu, Jun 10, 2010 at 1:00 PM, Jae-Joon Lee <lee...@gm...> wrote:
> On Thu, Jun 10, 2010 at 12:47 PM, Benjamin Root <ben...@ou...> wrote:
> > P.S. - I have found a 'bug' of sorts with using 'box-forced' for Basemap
> and
> > AxesGrid. For the displayed plot, if one were to zoom in on one of the
> > plots, the other plots will zoom in as well (which I think is neat), but
> > they won't update their bbox to completely match the zoomed-in axes. I
> > guess this would be an argument against using 'box-forced'?
>
> By default, x-axis is shared along the axes in a same column and
> y-axis is shared along the axes in a same raw. i.e., in your example,
> only the y-axis are shared which I think is the source of your issue.
>
>
> http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#axesgrid
>
> I think what you want is to use share_all=True.
>
> grid = AxesGrid(fig, 111,
> nrows_ncols=(1, 3),
> axes_pad=0.1,
> share_all=True,
> cbar_mode='single',
> cbar_pad=0.05,
> cbar_size=0.08,
> )
>
> Is this solve your problem?
> Regards,
>
> -JJ
>
Not that it was a "problem" per se, just merely an observation I had.
Anyway, I tried that and indeed, zooming on one box zoomed all of the other
boxes the same way. Might be good to include in the basemap examples,
maybe?
Thanks,
Ben Root
From: Benjamin R. <ben...@ou...> - 2010年06月10日 21:13:52
Just to make sure, were you calling subplots_adjust() *before* calling
subplot()? Calling it after subplot() shouldn't have an effect on the
already created axes (I think...).
Ben Root
On Thu, Jun 10, 2010 at 3:41 PM, mdekauwe <mde...@gm...> wrote:
>
> Unless I am mistaken subplots_adjust doesn't do anything as I am building
> an
> axes instance. Doing...
>
> fig = plt.figure(figsize=(8, 4))
> ax = fig.add_axes([0.1, 0.15, 0.7, 0.7])
>
> has shrunk the white space, though I think the font of the legend looks a
> bit less well defined, but perhaps that is just my eyes!
>
> http://old.nabble.com/file/p28848239/diffmap_JULES_DJF_snowFrac.GSWP2_vs_SSMI.jpeg
>
>
>
>
> Jae-Joon Lee wrote:
> >
> > On Thu, Jun 10, 2010 at 1:55 PM, mdekauwe <mde...@gm...> wrote:
> >> fig = plt.figure(figsize=(8, 6))
> >
> > This.
> > Also play with subplots_adjust.
> >
> > -JJ
> >
> >
> ------------------------------------------------------------------------------
> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> > lucky parental unit. See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Removing-white-space-surrounding-plots-tp28824528p28848239.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: mdekauwe <mde...@gm...> - 2010年06月10日 20:41:32
Unless I am mistaken subplots_adjust doesn't do anything as I am building an
axes instance. Doing...
fig = plt.figure(figsize=(8, 4))
ax = fig.add_axes([0.1, 0.15, 0.7, 0.7])
has shrunk the white space, though I think the font of the legend looks a
bit less well defined, but perhaps that is just my eyes!
http://old.nabble.com/file/p28848239/diffmap_JULES_DJF_snowFrac.GSWP2_vs_SSMI.jpeg 
Jae-Joon Lee wrote:
> 
> On Thu, Jun 10, 2010 at 1:55 PM, mdekauwe <mde...@gm...> wrote:
>> fig = plt.figure(figsize=(8, 6))
> 
> This.
> Also play with subplots_adjust.
> 
> -JJ
> 
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit. See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://old.nabble.com/Removing-white-space-surrounding-plots-tp28824528p28848239.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jeff P. <je...@gm...> - 2010年06月10日 20:03:15
Attachments: image.png
When I run the following, I get gibberish for the math symbols: ),?,"
instead of alph's, beta's, ..., etc.
I believe I have all the correct fonts installed: stix, computer
modern. I have tex and latex installed.
Any suggestions? I am running FC12.
Thanks,
Jeff
 1 import numpy as np
 2 import matplotlib.pyplot as plt
 3 t = np.arange(0.0, 2.0, 0.01)
 4 s = np.sin(2*np.pi*t)
 5
 6 plt.plot(t,s)
 7 plt.title(r'$\alpha_i > \beta_i$', fontsize=20)
 8 plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
 9 plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
 10 fontsize=20)
 11 plt.xlabel('time (s)')
 12 plt.ylabel('volts (mV)')
 13 plt.show()
From: Benjamin R. <ben...@ou...> - 2010年06月10日 19:09:06
Just in case nobody responded to you, yet...
Are you asking how to plot a trend line onto a figure already containing
data, or are you asking how to calculate a trend line from the data? If you
need to calculate a trend line, then you need to use the SciPy module. If
you already have your trend data, then you can call plot(X, Y) after you
call your other command to plot your data.
Ben Root
On Thu, Jun 10, 2010 at 2:34 AM, L1011 <yab...@ho...> wrote:
>
> Hello all!
>
> I was wondering if it's possible to a trend curve (linear, quadratic...) to
> a set of data with matplotlib...
>
> Thanks you!
>
> L1011
> --
> View this message in context:
> http://old.nabble.com/Trend-curve-tp28839772p28839772.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
19 messages has been excluded from this view by a project administrator.

Showing results of 397

<< < 1 .. 6 7 8 9 10 .. 16 > >> (Page 8 of 16)
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 によって変換されたページ (->オリジナル) /