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

Showing 24 results of 24

From: William C. <wcc...@lb...> - 2009年10月14日 22:35:47
Ok, after a little more digging I'm really confused. Libfreetype.6.dylib is
actually an OS X alias to libfreetype.6.3.2.dylib. Not sure why the error
report gave the path to the alias rather than the target file.
Bill
On 10/14/09 1:37 PM, "William Carithers" <WCC...@lb...> wrote:
> I was trying what I thought was a simple import from matplotlib, when I got
> a "Bus error" Here's the terminal ouptput.
> 
> Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
> [GCC 4.2.1 (Apple Inc. build 5646)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from matplotlib import pyplot as p
> Bus error
> 
> I'm running matplotlib-0.99.1.1 on Mac OS X 10.6. From the Apple-generated
> error report (below), it looks like the issue is with one of the freetype
> libraries. I'm using freetype2 2.1.3-22, installed by fink. If I look in
> /sw/lib, I find two similar-looking libs:
> libfreetype.6.3.2.dylib
> libfreetype.6.dylib [this is the one causing the issue]
> 
> Is it possible that these two are causing a bus collision? Is one an
> outdated version that should be deleted? Or one should be a soft link to
> the other?
> 
> Thanks for any insight,
> Bill Carithers
> 
> Process: Python [5809]
> Path: 
> /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.ap
> p/Contents/MacOS/Python
> Identifier: Python
> Version: ??? (???)
> Code Type: X86 (Native)
> Parent Process: bash [852]
> 
> PlugIn Path: /sw/lib/libfreetype.6.dylib
> PlugIn Identifier: libfreetype.6.dylib
> PlugIn Version: ??? (???)
> 
> Date/Time: 2009年10月14日 12:50:53.187 -0700
> OS Version: Mac OS X 10.6 (10A432)
> Report Version: 6
> 
> Interval Since Last Report: 81103 sec
> Crashes Since Last Report: 1
> Per-App Crashes Since Last Report: 1
> Anonymous UUID: C74B6D04-FEE7-4110-94BE-1523DD4483CF
> 
> Exception Type: EXC_BAD_ACCESS (SIGBUS)
> Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
> Crashed Thread: 0 Dispatch queue: com.apple.main-thread
> 
> Thread 0 Crashed: Dispatch queue: com.apple.main-thread
> 0 libfreetype.6.dylib 0x01279c0c tt_face_load_sbit_strikes +
> 1148
> 1 libfreetype.6.dylib 0x01278c78 sfnt_load_face + 152
> 2 libfreetype.6.dylib 0x0127e82f tt_face_init + 207
> 3 libfreetype.6.dylib 0x0124b7dc open_face + 252
> 4 libfreetype.6.dylib 0x0124bc21 FT_Open_Face + 561
> 5 libfreetype.6.dylib 0x0124bcfc FT_New_Face + 60
> 6 ft2font.so 0x011ebb2d
> FT2Font::FT2Font(std::string) + 367 (ft2font.cpp:687)
> 7 ft2font.so 0x011f17f3
> ft2font_module::new_ft2font(Py::Tuple const&) + 283 (ft2font.cpp:778)
> 8 ft2font.so 0x011fbc58
> Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string
> const&, Py::Tuple const&) + 242 (Extensions.hxx:422)
> 9 ft2font.so 0x01200bfa method_varargs_call_handler
> + 303 (cxx_extensions.cxx:1403)
> 10 org.python.python 0x0008b372 PyEval_EvalFrameEx + 16375
> 11 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 12 org.python.python 0x0008b591 PyEval_EvalFrameEx + 16918
> 13 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 14 org.python.python 0x0002ee2c PyClassMethod_New + 1823
> 15 org.python.python 0x0000c700 PyObject_Call + 101
> 16 org.python.python 0x0001c12e PyClass_New + 1603
> 17 org.python.python 0x0000c700 PyObject_Call + 101
> 18 org.python.python 0x0008677a
> PyEval_CallObjectWithKeywords + 171
> 19 org.python.python 0x0001ba58 PyInstance_New + 290
> 20 org.python.python 0x0000c700 PyObject_Call + 101
> 21 org.python.python 0x0008c802 PyEval_EvalFrameEx + 21639
> 22 org.python.python 0x0008b4d5 PyEval_EvalFrameEx + 16730
> 23 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 24 org.python.python 0x0008d009 PyEval_EvalCode + 87
> 25 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
> 240
> 26 org.python.python 0x0009af2a PyImport_AppendInittab +
> 1164
> 27 org.python.python 0x0009c87f PyImport_ReloadModule +
> 1392
> 28 org.python.python 0x0009ccd7 PyImport_ReloadModule +
> 2504
> 29 org.python.python 0x0009d2bb PyImport_ImportModuleLevel
> + 1221
> 30 org.python.python 0x0008577f _PyBuiltin_Init + 14665
> 31 org.python.python 0x0000c700 PyObject_Call + 101
> 32 org.python.python 0x0008677a
> PyEval_CallObjectWithKeywords + 171
> 33 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
> 34 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 35 org.python.python 0x0008d009 PyEval_EvalCode + 87
> 36 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
> 240
> 37 org.python.python 0x0009af2a PyImport_AppendInittab +
> 1164
> 38 org.python.python 0x0009c87f PyImport_ReloadModule +
> 1392
> 39 org.python.python 0x0009ccd7 PyImport_ReloadModule +
> 2504
> 40 org.python.python 0x0009d2bb PyImport_ImportModuleLevel
> + 1221
> 41 org.python.python 0x0008577f _PyBuiltin_Init + 14665
> 42 org.python.python 0x0000c700 PyObject_Call + 101
> 43 org.python.python 0x0008677a
> PyEval_CallObjectWithKeywords + 171
> 44 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
> 45 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 46 org.python.python 0x0008d009 PyEval_EvalCode + 87
> 47 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
> 240
> 48 org.python.python 0x0009af2a PyImport_AppendInittab +
> 1164
> 49 org.python.python 0x0009c87f PyImport_ReloadModule +
> 1392
> 50 org.python.python 0x0009ccd7 PyImport_ReloadModule +
> 2504
> 51 org.python.python 0x0009d285 PyImport_ImportModuleLevel
> + 1167
> 52 org.python.python 0x0008577f _PyBuiltin_Init + 14665
> 53 org.python.python 0x0000c700 PyObject_Call + 101
> 54 org.python.python 0x0008677a
> PyEval_CallObjectWithKeywords + 171
> 55 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
> 56 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 57 org.python.python 0x0008d009 PyEval_EvalCode + 87
> 58 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
> 240
> 59 org.python.python 0x0009af2a PyImport_AppendInittab +
> 1164
> 60 org.python.python 0x0009c87f PyImport_ReloadModule +
> 1392
> 61 org.python.python 0x0009ccd7 PyImport_ReloadModule +
> 2504
> 62 org.python.python 0x0009d2bb PyImport_ImportModuleLevel
> + 1221
> 63 org.python.python 0x0008577f _PyBuiltin_Init + 14665
> 64 org.python.python 0x0000c700 PyObject_Call + 101
> 65 org.python.python 0x0008677a
> PyEval_CallObjectWithKeywords + 171
> 66 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
> 67 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 68 org.python.python 0x0008d009 PyEval_EvalCode + 87
> 69 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
> 240
> 70 org.python.python 0x0009af2a PyImport_AppendInittab +
> 1164
> 71 org.python.python 0x0009c87f PyImport_ReloadModule +
> 1392
> 72 org.python.python 0x0009cb92 PyImport_ReloadModule +
> 2179
> 73 org.python.python 0x0009d3ae PyImport_ImportModuleLevel
> + 1464
> 74 org.python.python 0x0008577f _PyBuiltin_Init + 14665
> 75 org.python.python 0x0000c700 PyObject_Call + 101
> 76 org.python.python 0x0008677a
> PyEval_CallObjectWithKeywords + 171
> 77 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
> 78 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
> 79 org.python.python 0x0008d009 PyEval_EvalCode + 87
> 80 org.python.python 0x000a40bb Py_CompileString + 111
> 81 org.python.python 0x000a6140 PyRun_InteractiveOneFlags +
> 483
> 82 org.python.python 0x000a628e PyRun_InteractiveLoopFlags
> + 216
> 83 org.python.python 0x000a6317 PyRun_AnyFileExFlags + 85
> 84 org.python.python 0x000b3168 Py_Main + 3074
> 85 org.python.python.app 0x00001eb5 start + 53
> 
> 
> 
From: <PH...@Ge...> - 2009年10月14日 20:40:45
> -----Original Message-----
> From: Donovan Parks [mailto:don...@gm...]
> Sent: Wednesday, October 14, 2009 1:31 PM
> To: mat...@li...
> Subject: [Matplotlib-users] Log scale for horizontal bar chart (2
> bugs)
> 
> Hello,
> 
> I've encountered two bugs recently in matplotlib. I am hoping someone
> can tell me if these are known issues and if any workarounds have been
> proposed. The bug occurs for horizontal bar chart where the x-axis has
> a log scale:
> 
> from pylab import *
> 
> val = 3+10*rand(5) # the bar lengths
> pos = arange(5)+.5 # the bar centers on the y axis
> 
> axes = subplot(111)
> axes.barh(pos,val, align='center')
> axes.set_xscale('log')
> 
> for a in axes.yaxis.majorTicks:
> a.tick1On=False
> a.tick2On=False
> 
> for a in axes.xaxis.majorTicks:
> a.tick1On=True
> a.tick2On=False
> 
> for loc, spine in axes.spines.iteritems():
> if loc in ['left','right','top']:
> spine.set_color('none')
> 
> show()
> 
> If you run this code, you will see that only the end caps of the
> horizontal bars are drawn. Furthermore, tick marks appear at the top
> of the plot (despite explicitly turning them off). If a linear scale
> is used the plot is generated as expected. The issue with tick marks
> appearing incorrectly with log axes appears to occur with many types
> of graphs (well, at least the three I tried).
Just wanted to chime in here and note that a similar issue can occur with boxplots and log-scales. I think the issue here is that the rectangle patch is told to draw at the patch length at *zero*. Since there is no zero on a log scale, the rectangle patch is not fully rendered. That's just my observation/hypothesis.
Good luck,
-paul
From: William C. <wcc...@lb...> - 2009年10月14日 20:37:30
I was trying what I thought was a simple import from matplotlib, when I got
a "Bus error" Here's the terminal ouptput.
Python 2.6.1 (r261:67515, Jul 7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib import pyplot as p
Bus error
I'm running matplotlib-0.99.1.1 on Mac OS X 10.6. From the Apple-generated
error report (below), it looks like the issue is with one of the freetype
libraries. I'm using freetype2 2.1.3-22, installed by fink. If I look in
/sw/lib, I find two similar-looking libs:
libfreetype.6.3.2.dylib
libfreetype.6.dylib [this is the one causing the issue]
Is it possible that these two are causing a bus collision? Is one an
outdated version that should be deleted? Or one should be a soft link to
the other?
Thanks for any insight,
Bill Carithers
Process: Python [5809]
Path: 
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.ap
p/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: bash [852]
PlugIn Path: /sw/lib/libfreetype.6.dylib
PlugIn Identifier: libfreetype.6.dylib
PlugIn Version: ??? (???)
Date/Time: 2009年10月14日 12:50:53.187 -0700
OS Version: Mac OS X 10.6 (10A432)
Report Version: 6
Interval Since Last Report: 81103 sec
Crashes Since Last Report: 1
Per-App Crashes Since Last Report: 1
Anonymous UUID: C74B6D04-FEE7-4110-94BE-1523DD4483CF
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libfreetype.6.dylib 0x01279c0c tt_face_load_sbit_strikes +
1148
1 libfreetype.6.dylib 0x01278c78 sfnt_load_face + 152
2 libfreetype.6.dylib 0x0127e82f tt_face_init + 207
3 libfreetype.6.dylib 0x0124b7dc open_face + 252
4 libfreetype.6.dylib 0x0124bc21 FT_Open_Face + 561
5 libfreetype.6.dylib 0x0124bcfc FT_New_Face + 60
6 ft2font.so 0x011ebb2d
FT2Font::FT2Font(std::string) + 367 (ft2font.cpp:687)
7 ft2font.so 0x011f17f3
ft2font_module::new_ft2font(Py::Tuple const&) + 283 (ft2font.cpp:778)
8 ft2font.so 0x011fbc58
Py::ExtensionModule<ft2font_module>::invoke_method_varargs(std::string
const&, Py::Tuple const&) + 242 (Extensions.hxx:422)
9 ft2font.so 0x01200bfa method_varargs_call_handler
+ 303 (cxx_extensions.cxx:1403)
10 org.python.python 0x0008b372 PyEval_EvalFrameEx + 16375
11 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
12 org.python.python 0x0008b591 PyEval_EvalFrameEx + 16918
13 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
14 org.python.python 0x0002ee2c PyClassMethod_New + 1823
15 org.python.python 0x0000c700 PyObject_Call + 101
16 org.python.python 0x0001c12e PyClass_New + 1603
17 org.python.python 0x0000c700 PyObject_Call + 101
18 org.python.python 0x0008677a
PyEval_CallObjectWithKeywords + 171
19 org.python.python 0x0001ba58 PyInstance_New + 290
20 org.python.python 0x0000c700 PyObject_Call + 101
21 org.python.python 0x0008c802 PyEval_EvalFrameEx + 21639
22 org.python.python 0x0008b4d5 PyEval_EvalFrameEx + 16730
23 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
24 org.python.python 0x0008d009 PyEval_EvalCode + 87
25 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
240
26 org.python.python 0x0009af2a PyImport_AppendInittab +
1164
27 org.python.python 0x0009c87f PyImport_ReloadModule +
1392
28 org.python.python 0x0009ccd7 PyImport_ReloadModule +
2504
29 org.python.python 0x0009d2bb PyImport_ImportModuleLevel
+ 1221
30 org.python.python 0x0008577f _PyBuiltin_Init + 14665
31 org.python.python 0x0000c700 PyObject_Call + 101
32 org.python.python 0x0008677a
PyEval_CallObjectWithKeywords + 171
33 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
34 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
35 org.python.python 0x0008d009 PyEval_EvalCode + 87
36 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
240
37 org.python.python 0x0009af2a PyImport_AppendInittab +
1164
38 org.python.python 0x0009c87f PyImport_ReloadModule +
1392
39 org.python.python 0x0009ccd7 PyImport_ReloadModule +
2504
40 org.python.python 0x0009d2bb PyImport_ImportModuleLevel
+ 1221
41 org.python.python 0x0008577f _PyBuiltin_Init + 14665
42 org.python.python 0x0000c700 PyObject_Call + 101
43 org.python.python 0x0008677a
PyEval_CallObjectWithKeywords + 171
44 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
45 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
46 org.python.python 0x0008d009 PyEval_EvalCode + 87
47 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
240
48 org.python.python 0x0009af2a PyImport_AppendInittab +
1164
49 org.python.python 0x0009c87f PyImport_ReloadModule +
1392
50 org.python.python 0x0009ccd7 PyImport_ReloadModule +
2504
51 org.python.python 0x0009d285 PyImport_ImportModuleLevel
+ 1167
52 org.python.python 0x0008577f _PyBuiltin_Init + 14665
53 org.python.python 0x0000c700 PyObject_Call + 101
54 org.python.python 0x0008677a
PyEval_CallObjectWithKeywords + 171
55 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
56 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
57 org.python.python 0x0008d009 PyEval_EvalCode + 87
58 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
240
59 org.python.python 0x0009af2a PyImport_AppendInittab +
1164
60 org.python.python 0x0009c87f PyImport_ReloadModule +
1392
61 org.python.python 0x0009ccd7 PyImport_ReloadModule +
2504
62 org.python.python 0x0009d2bb PyImport_ImportModuleLevel
+ 1221
63 org.python.python 0x0008577f _PyBuiltin_Init + 14665
64 org.python.python 0x0000c700 PyObject_Call + 101
65 org.python.python 0x0008677a
PyEval_CallObjectWithKeywords + 171
66 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
67 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
68 org.python.python 0x0008d009 PyEval_EvalCode + 87
69 org.python.python 0x0009a532 PyImport_ExecCodeModuleEx +
240
70 org.python.python 0x0009af2a PyImport_AppendInittab +
1164
71 org.python.python 0x0009c87f PyImport_ReloadModule +
1392
72 org.python.python 0x0009cb92 PyImport_ReloadModule +
2179
73 org.python.python 0x0009d3ae PyImport_ImportModuleLevel
+ 1464
74 org.python.python 0x0008577f _PyBuiltin_Init + 14665
75 org.python.python 0x0000c700 PyObject_Call + 101
76 org.python.python 0x0008677a
PyEval_CallObjectWithKeywords + 171
77 org.python.python 0x0008a748 PyEval_EvalFrameEx + 13261
78 org.python.python 0x0008cf64 PyEval_EvalCodeEx + 1720
79 org.python.python 0x0008d009 PyEval_EvalCode + 87
80 org.python.python 0x000a40bb Py_CompileString + 111
81 org.python.python 0x000a6140 PyRun_InteractiveOneFlags +
483
82 org.python.python 0x000a628e PyRun_InteractiveLoopFlags
+ 216
83 org.python.python 0x000a6317 PyRun_AnyFileExFlags + 85
84 org.python.python 0x000b3168 Py_Main + 3074
85 org.python.python.app 0x00001eb5 start + 53
From: Donovan P. <don...@gm...> - 2009年10月14日 20:31:23
Hello,
I've encountered two bugs recently in matplotlib. I am hoping someone
can tell me if these are known issues and if any workarounds have been
proposed. The bug occurs for horizontal bar chart where the x-axis has
a log scale:
from pylab import *
val = 3+10*rand(5) # the bar lengths
pos = arange(5)+.5 # the bar centers on the y axis
axes = subplot(111)
axes.barh(pos,val, align='center')
axes.set_xscale('log')
for a in axes.yaxis.majorTicks:
 a.tick1On=False
 a.tick2On=False
for a in axes.xaxis.majorTicks:
 a.tick1On=True
 a.tick2On=False
for loc, spine in axes.spines.iteritems():
 if loc in ['left','right','top']:
 spine.set_color('none')
show()
If you run this code, you will see that only the end caps of the
horizontal bars are drawn. Furthermore, tick marks appear at the top
of the plot (despite explicitly turning them off). If a linear scale
is used the plot is generated as expected. The issue with tick marks
appearing incorrectly with log axes appears to occur with many types
of graphs (well, at least the three I tried).
Can anyone suggest how I might plot a bar chart with a log scale? Is
there any other way I might force the tick marks at the top to not be
drawn?
Thanks for any and all help.
Cheers,
Donovan
From: Uri L. <las...@mi...> - 2009年10月14日 19:36:47
It would be very useful to be able to use letters (or text in general) as
markers in lines and scatter plots. To be clear, I mean something like
this:
plot(x,y,marker='G') would produce a bunch of letter Gs as the marker.
Is this already possible? If not, what would be the easiest way to
implement this? Thanks!
Uri
-- 
Uri Laserson
PhD Candidate, Biomedical Engineering
Harvard Medical School (Genetics)
Massachusetts Institute of Technology (Mathematics)
phone +1 917 742 8019
las...@mi...
From: Chloe L. <ch...@be...> - 2009年10月14日 17:49:17
I use a scatterplot with enough points to overlap into a line. Works 
best with alpha=0.5 or thereabouts; I generally overplot with a dashed 
B&W line to make the legend understandable.
Probability that there is a more elegant way: high.
&C
On Oct 14, 2009, at 9:23 AM, Devin Silvia wrote:
>
> Does anyone know if its possible to vary the line color according to 
> some
> pre-defined array in a standard line plot (either linear or 
> loglog)? As an
> example, I would like to color the line so that it indicates 
> progression of
> time.
> -- 
> View this message in context: http://www.nabble.com/variable-line-color-in-plots-tp25894279p25894279.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart 
> your
> developing skills, take BlackBerry mobile applications to market and 
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Whenever I use matplotlib, I will perform something like the following in an
ipython shell (no special flags):
import matplotlib.pyplot as plt
fig = plt.figure()
<do things, like adding axes to the figure and plotting>
fig.show() # this will cause the window to pop up, and give me back a
prompt for ipython
<do more things, like modifying the axes and updating using plt.draw()>
fig.savefig(...) # if you want to save a copy
<do more things>
As far as I have seen, this is not one of the recommended methods in the
documentation, and considering my cursory understanding of the internals,
I'm not sure if this is technically correct or a hack, but it works
perfectly well for me. I discovered this function in Figure objects when I
was trying to get around exactly the same problem.
Uri
---------- Forwarded message ----------
From: qu...@gm...
To: Jeff Whitaker <js...@fa...>
Date: 2009年10月14日 02:09:21 +0200
Subject: Re: [Matplotlib-users] plotting from within ipython, and then go on
in the shell calculations
but i want to:
 1) plot something
 2) go on in ipython (with the figure/plot staying on)
is that really not possible?
thanks,
q
From: Devin S. <dev...@gm...> - 2009年10月14日 16:23:29
Does anyone know if its possible to vary the line color according to some
pre-defined array in a standard line plot (either linear or loglog)? As an
example, I would like to color the line so that it indicates progression of
time.
-- 
View this message in context: http://www.nabble.com/variable-line-color-in-plots-tp25894279p25894279.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jae-Joon L. <lee...@gm...> - 2009年10月14日 15:57:51
If what you want is just to hide some axis, I (as a developer of
axes_grid toolkit) strongly recommend you to stick with the mainline
matplotlib. You can easily do it with spines.
http://matplotlib.sourceforge.net/examples/pylab_examples/spine_placement_demo.html
axes_grid toolkit uses different kind of artist to draw ticks and
ticklabels, therefore it is not fully compatible with the mainlin
matplotlib. Please take a look at the axes_grid documentation.
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/overview.html#axisline
http://matplotlib.sourceforge.net/mpl_toolkits/axes_grid/users/axislines.html
Instead of yaxis.get_major_ticks() and setting their attribute, you need to use
ax.axis["right"].major_ticklabels.set_visible(True)
ax.axis["right"].major_ticklabels.set_color("red")
or
ax.axis["right"].major_ticklabels.set(visible=True, color="red")
Regards,
-JJ
On Mon, Oct 12, 2009 at 10:58 AM, reyungoo <rey...@ic...> wrote:
>
> Hi everyone,
>
> I try to make a simple subplot with yticklabels on the left and
> right side. Everthing is allright, if I use the subplot command,
> but I need the Subplot command from the mpl toolkits in order to hide
> some axis. The code below doesn't work for me. Setting label2On=True
> or False has no effekt.
>
> Any hint?
>
> Regards, Niko
>
>
>
> ...
> ...
> from mpl_toolkits.axes_grid.axislines import Subplot
>
>
> fig = plt.figure()
> ax = Subplot(fig, 311)
> fig.add_subplot(ax)
>
>
>
> for tick in ax.yaxis.get_major_ticks():
>  tick.label1On = True
>  tick.label2On = True
>  tick.label2.set_color('r')
>
> ...
> --
> View this message in context: http://www.nabble.com/Problems-with-yticklabels-in-combination-with-the-mpl-toolkits-tp25857213p25857213.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Ryan M. <rm...@gm...> - 2009年10月14日 15:50:39
On Mon, Oct 12, 2009 at 8:09 AM, bas pigmans <mrn...@gm...> wrote:
> hi
>
> i am trying to use mathplot in a script that has to produce and store about
> 3000 graps a time, the problem i have is that something inside mathplot
> keeps stroring in the memmory, (eigther the graph or the file to write to i
> guess...) so once it reached 1.5GB of ram it crashes
>
> i hope you can help me find a way to flush this memory usage
>
> already tryed the .clf and .close options
In order to help you, we'll need to see a complete, minimal script
that shows the problem you're having. Memory issues usually depend on
the specifics of how you're doing something,
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: thkoe002 <thk...@gm...> - 2009年10月14日 14:15:23
Hi JJ,
thanks a lot for your help. I think that
http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html
has everything I need, I'll try it out. The coordinates given by the mouse
are off, but that seems to be the case even for the far more elaborate
"custom scale/projection" example ( examples/api/custom_scale_example.py ),
and it's not that important.
Thanks, cheers 
Thomas
>It depends on how far you want to go.
>
>* Manually setting ticks is a easiest solution, I guess.
>
>* The next step would be to create your custom tick locator & formatter
>
>http://matplotlib.sourceforge.net/api/ticker_api.html
>
>While this is not that difficult, you will need to spend some time.
>
>* axes_grid toolkit has limited support for arbitrary coordinate system.
>
>http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html
>
>* create your own projection.
>
>http://matplotlib.sourceforge.net/devel/add_new_projection.html
>
>Unless you're familiar with matplotlib and some of it internals, the
>last two options is not recommended.
>Regards,
>
>-JJ
-- 
View this message in context: http://www.nabble.com/nonlinear-axes-for-imshow-tp25853828p25891899.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: thkoe002 <thk...@gm...> - 2009年10月14日 13:50:53
Ok, I'll answer my own question. I got the answer from
http://groups.google.com/group/de.comp.lang.python/browse_thread/thread/5d9a315c3d3ac0f5
, already 2 months old, but I wasn't aware. Code snippet below.
----------------
import Image
from pylab import *
#generate intensity map
a=meshgrid(arange(256),arange(256))[0]
f=figure()
for map in [eval("cm."+t) for t in dir(cm) if "N" in dir(eval("cm."+t))]:
 #generate false color map
 color_image=(map(a)*255.).astype(uint8)
 
 #rasterize colormap
 gray_to_color=(map(linspace(0,1,256))[:,:3]*255).astype(uint8)
 
 #create reverse LUT
 color_to_gray = zeros((256, 256, 256), dtype=uint8)
 color_to_gray [gray_to_color[:,0], gray_to_color[:,1],
gray_to_color[:,2]] = arange (0, 256, dtype=uint8)
 
 # use reverse LUT
 new_gray_image = color_to_gray[color_image[:,:,0], color_image[:,:,1],
color_image[:,:,2]] 
 
 gray()
 subplot(131)
 imshow(a)
 title("intensity")
 subplot(132)
 imshow(color_image)
 title("intensity->%s"%map.name)
 subplot(133)
 imshow(new_gray_image)
 title("intensity->%s->intensity"%map.name) 
 f.savefig("c:/temp/%s.png"%map.name)
-----------------
By the way, the resulting plots show that all the colormaps except cm.prism
are bijective (even for example mc.flag):
http://www.nabble.com/file/p25891118/jet.png 
http://www.nabble.com/file/p25891118/flag.png 
http://www.nabble.com/file/p25891118/prism.png 
cheers
Thomas
thkoe002 wrote:
> 
> Hi,
> 
> following problem: Let's say I have a couple of .png images that were
> produced with imshow() and the jet() (==default) colormap. The original
> data was 8 bit intensity data, now the images are 24 bit with false colors
> / pseudocolors.
> Now, is there a (simple?) way to calculate back from those 24 bit images
> to the 8 bit intensity information? Of course this can only work with
> bijective colormaps and if the colormap is well known; both is the case
> here.
> 
> Any ideas?
> 
> Thanks in advance, cheers
> 
> Thomas
> 
-- 
View this message in context: http://www.nabble.com/Reverse-colormapping-LUT--tp25858855p25891118.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Jouni K. S. <jk...@ik...> - 2009年10月14日 12:29:31
David Cournapeau <da...@ar...> writes:
> This would always build the mac os x extension if
> options['build_macosx'] is True, which is the case for me (it is set-up
> in setup.cfg, which I did not touch).
The setup.cfg file is included in the distribution by mistake. Just
delete it before building.
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Tinne De L. <tin...@me...> - 2009年10月14日 12:02:27
Hi Thomas,.
> I'm playing around with mpl_toolkits.mplot3d to represent a 3D scatter, but
> I need the axis' aspect to be 'equal'. I tried to :
>
> ax = Axes3D(fig)
> ax.set_aspect('equal')
axis("scaled")
worked for me.
Tinne
From: John [H2O] <was...@gm...> - 2009年10月14日 11:46:18
Bas,
Send an example of how you're handling the plotting. I have had similar
issues, but I've finally figured out how to work around it. Basically, look
at the Object Oriented examples, rather than using pyplot. 
What I found to be most efficient was to reuse figures as much as possible,
but delete the axes or just collections therein.
-john
bas pigmans wrote:
> 
> hi
> 
> i am trying to use mathplot in a script that has to produce and store
> about 3000 graphs a time, the problem i have is that something inside
> mathplot keeps storing in the memory, (eigther the graph or the file
> to write to i guess...) so once it reached 1.5GB of ram it crashes
> 
> i hope you can help me find a way to flush this memory usage
> 
> already tried the .clf and .close options as well as the hold option
> 
> regards Bas
> 
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/graphs-in-memory-tp25887905p25889534.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: David C. <da...@ar...> - 2009年10月14日 11:45:37
Hi,
 I updated matplotlib to 0.99.1, and got a weird build failure:
gcc: error trying to exec 'cc1obj': execvp: No such file or directory
I realized that cc1obj stands for the objective C compiler, and that it
is trying to build the macosx extension, but I am on Ubuntu with python
2.6, so it does not make much sense. The following lines in setup.py are
a bit suspicious:
if options['build_macosx']:
 if check_for_macosx() or (options['build_macosx'] is True):
 build_macosx(ext_modules, packages)
 rc['backend'] = 'MacOSX'
This would always build the mac os x extension if
options['build_macosx'] is True, which is the case for me (it is set-up
in setup.cfg, which I did not touch).
I am a bit surprised to see this, as I am sure I am far from being the
first one to build this version of matplotlib on Ubuntu,
cheers,
David
From: Thomas L. <thl...@ms...> - 2009年10月14日 11:24:09
Dear All,
I'm playing around with mpl_toolkits.mplot3d to represent a 3D scatter, but I need the axis' aspect to be 'equal'. I tried to :
ax = Axes3D(fig)
ax.set_aspect('equal')
but it doesn't change anything...
Any tips ?
Thanks a lot in advance,
Thomas
**********************
Thomas Lecocq
Geologist
Ph.D.Student (Seismology)
Royal Observatory of Belgium
**********************
 		 	 		 
From: bas p. <mrn...@gm...> - 2009年10月14日 09:26:44
hi
i am trying to use mathplot in a script that has to produce and store
about 3000 graphs a time, the problem i have is that something inside
mathplot keeps storing in the memory, (eigther the graph or the file
to write to i guess...) so once it reached 1.5GB of ram it crashes
i hope you can help me find a way to flush this memory usage
already tried the .clf and .close options as well as the hold option
regards Bas
From: John [H2O] <was...@gm...> - 2009年10月14日 09:21:20
UPDATE: I've got something to work (see below). I would appreciate comments
on whether it is 'pythonic' and the most efficient. Also, what would I have
to do to have a more OO approach? I would prefer to not use 'pyplot' in
general.
#!/usr/bin/env python 
import matplotlib as mpl
import numpy as np
import matplotlib.pyplot as plt
def plot_fill_between(array=None):
 """ plot with fill_between for a cumsum vector """
 # Set up plotting environment
 fig = plt.figure()
 ax = fig.gca()
 nx = 40
 ny = 20
 if array is None:
 X = range(nx)
 array = np.random.rand(nx,ny)
 
 array = np.cumsum(array,axis=1)
 
 Nc = np.array([float(i)/ny for i in range(ny)])
 norm = mpl.colors.normalize(Nc.min(),Nc.max())
 jet = plt.cm.get_cmap('jet')
 facecolors=[]
 for i in range(ny-1):
 if i == 0:
 facecolors.append(jet(norm(Nc[i])))
 plt.fill_between(X,np.zeros(len(array[:,i])),array[:,i],
 color=facecolors[-1],label='%s' % i)
 facecolors.append(jet(norm(Nc[i+1])))
 plt.fill_between(X,array[:,i],array[:,i+1],
 color=facecolors[-1],label='%s' % i)
 fig.autofmt_xdate()
 
 plt.title('Fill Between Demo')
 ## ListedColormap
 pos = ax.get_position()
 l, b, w, h = getattr(pos, 'bounds', pos)
 ax2 = fig.add_axes([l,.09,w,0.03])
 cmap = mpl.colors.ListedColormap(facecolors)
 bounds = range(len(facecolors)+1)
 cb2 = mpl.colorbar.ColorbarBase(ax2,
 cmap=cmap,
 boundaries=bounds,
 ticks=bounds, # optional
 spacing='proportional',
 orientation='horizontal')
 cb2.set_label('(units)',size='x-small')
 return fig
if __name__ == "__main__":
 fig = plot_fill_between()
 plt.show()
-- 
View this message in context: http://www.nabble.com/help-with-fill_between-and-a-colorbar-tp25882693p25887843.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Pierre de B. <pd...@ul...> - 2009年10月14日 08:38:51
Hello,
First, make sure that you have installed the Apple Developer Tools, 
and the "BSD components" from the DVDs OS X.
Then, please indicate your version of python, and of numpy, and give 
the installation log.
Pierre
Le 13 oct. 09 à 19:14, William Carithers a écrit :
> I've not been able to find a successful way to install matplotlib 
> since
> upgrading to OS 10.6. There doesn't seem to be an egg for it. 
> Easy_install
> matplotlib finds an old version (0.91) that is not compatible with 
> the new
> numpy supplied by Apple. Easy_install matplotlib-0.99.1 can't find it.
> Likewise, easy_install
> http://sourceforge.net/projects/matplotlib/matplotlib-0.99.1/ 
> matplotlib-0.99
> .1.1.tar.gz doesn't find it.
>
> I tried downloading the gzipped tar file, then python setup 
> install , but I
> got a compile error. I'm now stumped. Any ideas?
>
> Thanks,
> Bill Carithers
On Wednesday 14 October 2009, Ernest Adrogué wrote:
> 13/10/09 @ 14:35 (-1000), thus spake Eric Firing:
> > Ernest Adrogué wrote:
> > No, you have to call ipython with a threading option:
> > -gthread, -qthread, -q4thread, -wthread, -pylab
>
> Ah, I didn't know that. In my Debian machine, it works without need
> to specify any of these options, though.
For the TkAgg backend, you don't have to call ipython with a threading 
option, it works "as is".
Johann
From: Ernest A. <ead...@gm...> - 2009年10月14日 08:10:14
13/10/09 @ 14:35 (-1000), thus spake Eric Firing:
> Ernest Adrogué wrote:
> >14/10/09 @ 02:38 (+0200), thus spake qu...@gm...:
> >>okay. don't shoot me
> >>
> >>you need to start ipython with:
> >>
> >> ipython -pylab
> >>
> >
> >or alternatively, start ipython normally, import matplotlib.pyplot
> >and then call matplotlib.pylot.ion() which turns the 'interactive
> >mode' on.
> >
> >then when you create a figure, a window will pop up, but the shell
> >will still be operative.
> >
> 
> No, you have to call ipython with a threading option:
> -gthread, -qthread, -q4thread, -wthread, -pylab
Ah, I didn't know that. In my Debian machine, it works without need to
specify any of these options, though.
-- 
Ernest
Ernest Adrogué wrote:
> 14/10/09 @ 02:38 (+0200), thus spake qu...@gm...:
>> okay. don't shoot me
>>
>> you need to start ipython with:
>>
>> ipython -pylab
>>
> 
> or alternatively, start ipython normally, import matplotlib.pyplot
> and then call matplotlib.pylot.ion() which turns the 'interactive
> mode' on.
> 
> then when you create a figure, a window will pop up, but the shell
> will still be operative.
> 
No, you have to call ipython with a threading option:
 -gthread, -qthread, -q4thread, -wthread, -pylab
Eric
From: Ernest A. <ead...@gm...> - 2009年10月14日 00:08:27
14/10/09 @ 02:38 (+0200), thus spake qu...@gm...:
> okay. don't shoot me
> 
> you need to start ipython with:
> 
> ipython -pylab
> 
or alternatively, start ipython normally, import matplotlib.pyplot
and then call matplotlib.pylot.ion() which turns the 'interactive
mode' on.
then when you create a figure, a window will pop up, but the shell
will still be operative.
-- 
Ernest

Showing 24 results of 24

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 によって変換されたページ (->オリジナル) /