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


Showing 20 results of 20

From: Jean-Paul J. <jpj...@or...> - 2009年12月15日 22:55:15
Hi all,
I have recently upgraded matplotlib to 0.99 on debian (Lenny) using the
default options with synaptic. 
After this upgrade, importing pylab results in a seg. fault
Using "python -v" yields the following messages.
What should i do to improve this ? 
Thanks in advance.
J-P J. 
==========================================
output of python -v
.....
>>> import pylab
# /usr/lib/pymodules/python2.5/pylab.pyc
matches /usr/lib/pymodules/python2.5/pylab.py
import pylab # precompiled from /usr/lib/pymodules/python2.5/pylab.pyc
import matplotlib # directory /usr/lib/pymodules/python2.5/matplotlib
# /usr/lib/pymodules/python2.5/matplotlib/__init__.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/__init__.py
import matplotlib # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/__init__.pyc
# /usr/lib/python2.5/__future__.pyc
matches /usr/lib/python2.5/__future__.py
import __future__ # precompiled from /usr/lib/python2.5/__future__.pyc
# /usr/lib/python2.5/re.pyc matches /usr/lib/python2.5/re.py
import re # precompiled from /usr/lib/python2.5/re.pyc
# /usr/lib/python2.5/sre_compile.pyc
matches /usr/lib/python2.5/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.5/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.5/sre_constants.pyc
matches /usr/lib/python2.5/sre_constants.py
import sre_constants # precompiled
from /usr/lib/python2.5/sre_constants.pyc
# /usr/lib/python2.5/sre_parse.pyc
matches /usr/lib/python2.5/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.5/sre_parse.pyc
# /usr/lib/python2.5/shutil.pyc matches /usr/lib/python2.5/shutil.py
import shutil # precompiled from /usr/lib/python2.5/shutil.pyc
# /usr/lib/python2.5/subprocess.pyc
matches /usr/lib/python2.5/subprocess.py
import subprocess # precompiled from /usr/lib/python2.5/subprocess.pyc
# /usr/lib/python2.5/traceback.pyc
matches /usr/lib/python2.5/traceback.py
import traceback # precompiled from /usr/lib/python2.5/traceback.pyc
import gc # builtin
dlopen("/usr/lib/python2.5/lib-dynload/time.so", 2);
import time # dynamically loaded
from /usr/lib/python2.5/lib-dynload/time.so
dlopen("/usr/lib/python2.5/lib-dynload/select.so", 2);
import select # dynamically loaded
from /usr/lib/python2.5/lib-dynload/select.so
dlopen("/usr/lib/python2.5/lib-dynload/fcntl.so", 2);
import fcntl # dynamically loaded
from /usr/lib/python2.5/lib-dynload/fcntl.so
# /usr/lib/python2.5/pickle.pyc matches /usr/lib/python2.5/pickle.py
import pickle # precompiled from /usr/lib/python2.5/pickle.pyc
import marshal # builtin
# /usr/lib/python2.5/struct.pyc matches /usr/lib/python2.5/struct.py
import struct # precompiled from /usr/lib/python2.5/struct.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_struct.so", 2);
import _struct # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_struct.so
dlopen("/usr/lib/python2.5/lib-dynload/binascii.so", 2);
import binascii # dynamically loaded
from /usr/lib/python2.5/lib-dynload/binascii.so
dlopen("/usr/lib/python2.5/lib-dynload/cStringIO.so", 2);
import cStringIO # dynamically loaded
from /usr/lib/python2.5/lib-dynload/cStringIO.so
import distutils # directory /usr/lib/python2.5/distutils
# /usr/lib/python2.5/distutils/__init__.pyc
matches /usr/lib/python2.5/distutils/__init__.py
import distutils # precompiled
from /usr/lib/python2.5/distutils/__init__.pyc
# /usr/lib/python2.5/distutils/sysconfig.pyc
matches /usr/lib/python2.5/distutils/sysconfig.py
import distutils.sysconfig # precompiled
from /usr/lib/python2.5/distutils/sysconfig.pyc
# /usr/lib/python2.5/string.pyc matches /usr/lib/python2.5/string.py
import string # precompiled from /usr/lib/python2.5/string.pyc
dlopen("/usr/lib/python2.5/lib-dynload/strop.so", 2);
import strop # dynamically loaded
from /usr/lib/python2.5/lib-dynload/strop.so
# /usr/lib/python2.5/distutils/errors.pyc
matches /usr/lib/python2.5/distutils/errors.py
import distutils.errors # precompiled
from /usr/lib/python2.5/distutils/errors.pyc
# /usr/lib/python2.5/distutils/version.pyc
matches /usr/lib/python2.5/distutils/version.py
import distutils.version # precompiled
from /usr/lib/python2.5/distutils/version.pyc
# /usr/lib/python2.5/tempfile.pyc matches /usr/lib/python2.5/tempfile.py
import tempfile # precompiled from /usr/lib/python2.5/tempfile.pyc
# /usr/lib/python2.5/random.pyc matches /usr/lib/python2.5/random.py
import random # precompiled from /usr/lib/python2.5/random.pyc
dlopen("/usr/lib/python2.5/lib-dynload/math.so", 2);
import math # dynamically loaded
from /usr/lib/python2.5/lib-dynload/math.so
dlopen("/usr/lib/python2.5/lib-dynload/_random.so", 2);
import _random # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_random.so
import thread # builtin
# /usr/lib/pymodules/python2.5/matplotlib/rcsetup.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/rcsetup.py
import matplotlib.rcsetup # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/rcsetup.pyc
# /usr/lib/pymodules/python2.5/matplotlib/fontconfig_pattern.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/fontconfig_pattern.py
import matplotlib.fontconfig_pattern # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/fontconfig_pattern.pyc
# /usr/lib/pymodules/python2.5/matplotlib/pyparsing.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/pyparsing.py
import matplotlib.pyparsing # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/pyparsing.pyc
# /usr/lib/python2.5/weakref.pyc matches /usr/lib/python2.5/weakref.py
import weakref # precompiled from /usr/lib/python2.5/weakref.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_weakref.so", 2);
import _weakref # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_weakref.so
# /usr/lib/python2.5/copy.pyc matches /usr/lib/python2.5/copy.py
import copy # precompiled from /usr/lib/python2.5/copy.pyc
import xml # directory /usr/lib/python2.5/xml
# /usr/lib/python2.5/xml/__init__.pyc
matches /usr/lib/python2.5/xml/__init__.py
import xml # precompiled from /usr/lib/python2.5/xml/__init__.pyc
import xml.sax # directory /usr/lib/python2.5/xml/sax
# /usr/lib/python2.5/xml/sax/__init__.pyc
matches /usr/lib/python2.5/xml/sax/__init__.py
import xml.sax # precompiled
from /usr/lib/python2.5/xml/sax/__init__.pyc
# /usr/lib/python2.5/xml/sax/xmlreader.pyc
matches /usr/lib/python2.5/xml/sax/xmlreader.py
import xml.sax.xmlreader # precompiled
from /usr/lib/python2.5/xml/sax/xmlreader.pyc
# /usr/lib/python2.5/xml/sax/handler.pyc
matches /usr/lib/python2.5/xml/sax/handler.py
import xml.sax.handler # precompiled
from /usr/lib/python2.5/xml/sax/handler.pyc
# /usr/lib/python2.5/xml/sax/_exceptions.pyc
matches /usr/lib/python2.5/xml/sax/_exceptions.py
import xml.sax._exceptions # precompiled
from /usr/lib/python2.5/xml/sax/_exceptions.pyc
# /usr/lib/python2.5/xml/sax/saxutils.pyc
matches /usr/lib/python2.5/xml/sax/saxutils.py
import xml.sax.saxutils # precompiled
from /usr/lib/python2.5/xml/sax/saxutils.pyc
# /usr/lib/python2.5/urlparse.pyc matches /usr/lib/python2.5/urlparse.py
import urlparse # precompiled from /usr/lib/python2.5/urlparse.pyc
# /usr/lib/python2.5/urllib.pyc matches /usr/lib/python2.5/urllib.py
import urllib # precompiled from /usr/lib/python2.5/urllib.pyc
# /usr/lib/python2.5/socket.pyc matches /usr/lib/python2.5/socket.py
import socket # precompiled from /usr/lib/python2.5/socket.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_socket.so", 2);
import _socket # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_socket.so
dlopen("/usr/lib/python2.5/lib-dynload/_ssl.so", 2);
import _ssl # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_ssl.so
# /usr/lib/pymodules/python2.5/matplotlib/colors.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/colors.py
import matplotlib.colors # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/colors.pyc
import numpy # directory /usr/lib/python2.5/site-packages/numpy
# /usr/lib/python2.5/site-packages/numpy/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/__init__.py
import numpy # precompiled
from /usr/lib/python2.5/site-packages/numpy/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/__config__.pyc
matches /usr/lib/python2.5/site-packages/numpy/__config__.py
import numpy.__config__ # precompiled
from /usr/lib/python2.5/site-packages/numpy/__config__.pyc
# /usr/lib/python2.5/site-packages/numpy/version.pyc
matches /usr/lib/python2.5/site-packages/numpy/version.py
import numpy.version # precompiled
from /usr/lib/python2.5/site-packages/numpy/version.pyc
# /usr/lib/python2.5/site-packages/numpy/_import_tools.pyc
matches /usr/lib/python2.5/site-packages/numpy/_import_tools.py
import numpy._import_tools # precompiled
from /usr/lib/python2.5/site-packages/numpy/_import_tools.pyc
# /usr/lib/python2.5/glob.pyc matches /usr/lib/python2.5/glob.py
import glob # precompiled from /usr/lib/python2.5/glob.pyc
# /usr/lib/python2.5/fnmatch.pyc matches /usr/lib/python2.5/fnmatch.py
import fnmatch # precompiled from /usr/lib/python2.5/fnmatch.pyc
# /usr/lib/python2.5/site-packages/numpy/add_newdocs.pyc
matches /usr/lib/python2.5/site-packages/numpy/add_newdocs.py
import numpy.add_newdocs # precompiled
from /usr/lib/python2.5/site-packages/numpy/add_newdocs.pyc
import numpy.lib # directory /usr/lib/python2.5/site-packages/numpy/lib
# /usr/lib/python2.5/site-packages/numpy/lib/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/__init__.py
import numpy.lib # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/info.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/info.py
import numpy.lib.info # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/info.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/type_check.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/type_check.py
import numpy.lib.type_check # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/type_check.pyc
import numpy.core #
directory /usr/lib/python2.5/site-packages/numpy/core
# /usr/lib/python2.5/site-packages/numpy/core/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/__init__.py
import numpy.core # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/core/info.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/info.py
import numpy.core.info # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/info.pyc
dlopen("/usr/lib/python2.5/site-packages/numpy/core/multiarray.so", 2);
import numpy.core.multiarray # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/core/multiarray.so
dlopen("/usr/lib/python2.5/site-packages/numpy/core/umath.so", 2);
import numpy.core.umath # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/core/umath.so
# /usr/lib/python2.5/site-packages/numpy/core/_internal.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/_internal.py
import numpy.core._internal # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/_internal.pyc
# /usr/lib/python2.5/site-packages/numpy/core/numerictypes.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/numerictypes.py
import numpy.core.numerictypes # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/numerictypes.pyc
dlopen("/usr/lib/python2.5/site-packages/numpy/core/_sort.so", 2);
import numpy.core._sort # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/core/_sort.so
# /usr/lib/python2.5/site-packages/numpy/core/numeric.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/numeric.py
import numpy.core.numeric # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/numeric.pyc
dlopen("/usr/lib/python2.5/site-packages/numpy/core/_dotblas.so", 2);
import numpy.core._dotblas # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/core/_dotblas.so
# /usr/lib/python2.5/site-packages/numpy/core/arrayprint.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/arrayprint.py
import numpy.core.arrayprint # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/arrayprint.pyc
# /usr/lib/python2.5/site-packages/numpy/core/fromnumeric.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/fromnumeric.py
import numpy.core.fromnumeric # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/fromnumeric.pyc
dlopen("/usr/lib/python2.5/lib-dynload/cPickle.so", 2);
import cPickle # dynamically loaded
from /usr/lib/python2.5/lib-dynload/cPickle.so
# /usr/lib/python2.5/site-packages/numpy/core/defmatrix.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/defmatrix.py
import numpy.core.defmatrix # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/defmatrix.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/utils.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/utils.py
import numpy.lib.utils # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/utils.pyc
import compiler # directory /usr/lib/python2.5/compiler
# /usr/lib/python2.5/compiler/__init__.pyc
matches /usr/lib/python2.5/compiler/__init__.py
import compiler # precompiled
from /usr/lib/python2.5/compiler/__init__.pyc
# /usr/lib/python2.5/compiler/transformer.pyc
matches /usr/lib/python2.5/compiler/transformer.py
import compiler.transformer # precompiled
from /usr/lib/python2.5/compiler/transformer.pyc
# /usr/lib/python2.5/compiler/ast.pyc
matches /usr/lib/python2.5/compiler/ast.py
import compiler.ast # precompiled
from /usr/lib/python2.5/compiler/ast.pyc
# /usr/lib/python2.5/compiler/consts.pyc
matches /usr/lib/python2.5/compiler/consts.py
import compiler.consts # precompiled
from /usr/lib/python2.5/compiler/consts.pyc
dlopen("/usr/lib/python2.5/lib-dynload/parser.so", 2);
import parser # dynamically loaded
from /usr/lib/python2.5/lib-dynload/parser.so
# /usr/lib/python2.5/symbol.pyc matches /usr/lib/python2.5/symbol.py
import symbol # precompiled from /usr/lib/python2.5/symbol.pyc
# /usr/lib/python2.5/token.pyc matches /usr/lib/python2.5/token.py
import token # precompiled from /usr/lib/python2.5/token.pyc
# /usr/lib/python2.5/compiler/visitor.pyc
matches /usr/lib/python2.5/compiler/visitor.py
import compiler.visitor # precompiled
from /usr/lib/python2.5/compiler/visitor.pyc
# /usr/lib/python2.5/compiler/pycodegen.pyc
matches /usr/lib/python2.5/compiler/pycodegen.py
import compiler.pycodegen # precompiled
from /usr/lib/python2.5/compiler/pycodegen.pyc
# /usr/lib/python2.5/compiler/syntax.pyc
matches /usr/lib/python2.5/compiler/syntax.py
import compiler.syntax # precompiled
from /usr/lib/python2.5/compiler/syntax.pyc
# /usr/lib/python2.5/compiler/pyassem.pyc
matches /usr/lib/python2.5/compiler/pyassem.py
import compiler.pyassem # precompiled
from /usr/lib/python2.5/compiler/pyassem.pyc
# /usr/lib/python2.5/dis.pyc matches /usr/lib/python2.5/dis.py
import dis # precompiled from /usr/lib/python2.5/dis.pyc
# /usr/lib/python2.5/opcode.pyc matches /usr/lib/python2.5/opcode.py
import opcode # precompiled from /usr/lib/python2.5/opcode.pyc
# /usr/lib/python2.5/compiler/misc.pyc
matches /usr/lib/python2.5/compiler/misc.py
import compiler.misc # precompiled
from /usr/lib/python2.5/compiler/misc.pyc
# /usr/lib/python2.5/compiler/future.pyc
matches /usr/lib/python2.5/compiler/future.py
import compiler.future # precompiled
from /usr/lib/python2.5/compiler/future.pyc
# /usr/lib/python2.5/compiler/symbols.pyc
matches /usr/lib/python2.5/compiler/symbols.py
import compiler.symbols # precompiled
from /usr/lib/python2.5/compiler/symbols.pyc
# /usr/lib/python2.5/inspect.pyc matches /usr/lib/python2.5/inspect.py
import inspect # precompiled from /usr/lib/python2.5/inspect.pyc
# /usr/lib/python2.5/tokenize.pyc matches /usr/lib/python2.5/tokenize.py
import tokenize # precompiled from /usr/lib/python2.5/tokenize.pyc
dlopen("/usr/lib/python2.5/lib-dynload/operator.so", 2);
import operator # dynamically loaded
from /usr/lib/python2.5/lib-dynload/operator.so
# /usr/lib/python2.5/pkgutil.pyc matches /usr/lib/python2.5/pkgutil.py
import pkgutil # precompiled from /usr/lib/python2.5/pkgutil.pyc
# /usr/lib/python2.5/pydoc.pyc matches /usr/lib/python2.5/pydoc.py
import pydoc # precompiled from /usr/lib/python2.5/pydoc.pyc
# /usr/lib/python2.5/repr.pyc matches /usr/lib/python2.5/repr.py
import repr # precompiled from /usr/lib/python2.5/repr.pyc
dlopen("/usr/lib/python2.5/lib-dynload/itertools.so", 2);
import itertools # dynamically loaded
from /usr/lib/python2.5/lib-dynload/itertools.so
dlopen("/usr/lib/python2.5/lib-dynload/collections.so", 2);
import collections # dynamically loaded
from /usr/lib/python2.5/lib-dynload/collections.so
# /usr/lib/python2.5/site-packages/numpy/core/defchararray.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/defchararray.py
import numpy.core.defchararray # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/defchararray.pyc
# /usr/lib/python2.5/site-packages/numpy/core/records.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/records.py
import numpy.core.records # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/records.pyc
# /usr/lib/python2.5/site-packages/numpy/core/memmap.pyc
matches /usr/lib/python2.5/site-packages/numpy/core/memmap.py
import numpy.core.memmap # precompiled
from /usr/lib/python2.5/site-packages/numpy/core/memmap.pyc
dlopen("/usr/lib/python2.5/lib-dynload/mmap.so", 2);
import mmap # dynamically loaded
from /usr/lib/python2.5/lib-dynload/mmap.so
dlopen("/usr/lib/python2.5/site-packages/numpy/core/scalarmath.so", 2);
import numpy.core.scalarmath # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/core/scalarmath.so
# /usr/lib/python2.5/site-packages/numpy/lib/ufunclike.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/ufunclike.py
import numpy.lib.ufunclike # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/ufunclike.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/index_tricks.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/index_tricks.py
import numpy.lib.index_tricks # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/index_tricks.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/function_base.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/function_base.py
import numpy.lib.function_base # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/function_base.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/shape_base.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/shape_base.py
import numpy.lib.shape_base # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/shape_base.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/twodim_base.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/twodim_base.py
import numpy.lib.twodim_base # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/twodim_base.pyc
dlopen("/usr/lib/python2.5/site-packages/numpy/lib/_compiled_base.so",
2);
import numpy.lib._compiled_base # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/lib/_compiled_base.so
# /usr/lib/python2.5/site-packages/numpy/lib/arraysetops.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/arraysetops.py
import numpy.lib.arraysetops # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/arraysetops.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/scimath.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/scimath.py
import numpy.lib.scimath # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/scimath.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/polynomial.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/polynomial.py
import numpy.lib.polynomial # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/polynomial.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/getlimits.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/getlimits.py
import numpy.lib.getlimits # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/getlimits.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/machar.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/machar.py
import numpy.lib.machar # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/machar.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/io.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/io.py
import numpy.lib.io # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/io.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/format.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/format.py
import numpy.lib.format # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/format.pyc
# /usr/lib/python2.5/pprint.pyc matches /usr/lib/python2.5/pprint.py
import pprint # precompiled from /usr/lib/python2.5/pprint.pyc
# /usr/lib/python2.5/site-packages/numpy/lib/_datasource.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/_datasource.py
import numpy.lib._datasource # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/_datasource.pyc
# /usr/lib/python2.5/urllib2.pyc matches /usr/lib/python2.5/urllib2.py
import urllib2 # precompiled from /usr/lib/python2.5/urllib2.pyc
# /usr/lib/python2.5/base64.pyc matches /usr/lib/python2.5/base64.py
import base64 # precompiled from /usr/lib/python2.5/base64.pyc
# /usr/lib/python2.5/hashlib.pyc matches /usr/lib/python2.5/hashlib.py
import hashlib # precompiled from /usr/lib/python2.5/hashlib.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_hashlib.so", 2);
import _hashlib # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_hashlib.so
# /usr/lib/python2.5/httplib.pyc matches /usr/lib/python2.5/httplib.py
import httplib # precompiled from /usr/lib/python2.5/httplib.pyc
# /usr/lib/python2.5/mimetools.pyc
matches /usr/lib/python2.5/mimetools.py
import mimetools # precompiled from /usr/lib/python2.5/mimetools.pyc
# /usr/lib/python2.5/rfc822.pyc matches /usr/lib/python2.5/rfc822.py
import rfc822 # precompiled from /usr/lib/python2.5/rfc822.pyc
# /usr/lib/python2.5/bisect.pyc matches /usr/lib/python2.5/bisect.py
import bisect # precompiled from /usr/lib/python2.5/bisect.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_bisect.so", 2);
import _bisect # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_bisect.so
dlopen("/usr/lib/python2.5/lib-dynload/bz2.so", 2);
import bz2 # dynamically loaded
from /usr/lib/python2.5/lib-dynload/bz2.so
# /usr/lib/python2.5/gzip.pyc matches /usr/lib/python2.5/gzip.py
import gzip # precompiled from /usr/lib/python2.5/gzip.pyc
dlopen("/usr/lib/python2.5/lib-dynload/zlib.so", 2);
import zlib # dynamically loaded
from /usr/lib/python2.5/lib-dynload/zlib.so
# /usr/lib/python2.5/site-packages/numpy/lib/financial.pyc
matches /usr/lib/python2.5/site-packages/numpy/lib/financial.py
import numpy.lib.financial # precompiled
from /usr/lib/python2.5/site-packages/numpy/lib/financial.pyc
import numpy.testing #
directory /usr/lib/python2.5/site-packages/numpy/testing
# /usr/lib/python2.5/site-packages/numpy/testing/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/testing/__init__.py
import numpy.testing # precompiled
from /usr/lib/python2.5/site-packages/numpy/testing/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/testing/info.pyc
matches /usr/lib/python2.5/site-packages/numpy/testing/info.py
import numpy.testing.info # precompiled
from /usr/lib/python2.5/site-packages/numpy/testing/info.pyc
# /usr/lib/python2.5/site-packages/numpy/testing/numpytest.pyc
matches /usr/lib/python2.5/site-packages/numpy/testing/numpytest.py
import numpy.testing.numpytest # precompiled
from /usr/lib/python2.5/site-packages/numpy/testing/numpytest.pyc
# /usr/lib/python2.5/shlex.pyc matches /usr/lib/python2.5/shlex.py
import shlex # precompiled from /usr/lib/python2.5/shlex.pyc
# /usr/lib/python2.5/unittest.pyc matches /usr/lib/python2.5/unittest.py
import unittest # precompiled from /usr/lib/python2.5/unittest.pyc
# /usr/lib/python2.5/site-packages/numpy/testing/utils.pyc
matches /usr/lib/python2.5/site-packages/numpy/testing/utils.py
import numpy.testing.utils # precompiled
from /usr/lib/python2.5/site-packages/numpy/testing/utils.pyc
# /usr/lib/python2.5/difflib.pyc matches /usr/lib/python2.5/difflib.py
import difflib # precompiled from /usr/lib/python2.5/difflib.pyc
# /usr/lib/python2.5/heapq.pyc matches /usr/lib/python2.5/heapq.py
import heapq # precompiled from /usr/lib/python2.5/heapq.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_heapq.so", 2);
import _heapq # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_heapq.so
# /usr/lib/python2.5/site-packages/numpy/testing/parametric.pyc
matches /usr/lib/python2.5/site-packages/numpy/testing/parametric.py
import numpy.testing.parametric # precompiled
from /usr/lib/python2.5/site-packages/numpy/testing/parametric.pyc
import numpy.linalg #
directory /usr/lib/python2.5/site-packages/numpy/linalg
# /usr/lib/python2.5/site-packages/numpy/linalg/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/linalg/__init__.py
import numpy.linalg # precompiled
from /usr/lib/python2.5/site-packages/numpy/linalg/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/linalg/info.pyc
matches /usr/lib/python2.5/site-packages/numpy/linalg/info.py
import numpy.linalg.info # precompiled
from /usr/lib/python2.5/site-packages/numpy/linalg/info.pyc
# /usr/lib/python2.5/site-packages/numpy/linalg/linalg.pyc
matches /usr/lib/python2.5/site-packages/numpy/linalg/linalg.py
import numpy.linalg.linalg # precompiled
from /usr/lib/python2.5/site-packages/numpy/linalg/linalg.pyc
dlopen("/usr/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so",
2);
import numpy.linalg.lapack_lite # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/linalg/lapack_lite.so
import numpy.fft # directory /usr/lib/python2.5/site-packages/numpy/fft
# /usr/lib/python2.5/site-packages/numpy/fft/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/fft/__init__.py
import numpy.fft # precompiled
from /usr/lib/python2.5/site-packages/numpy/fft/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/fft/info.pyc
matches /usr/lib/python2.5/site-packages/numpy/fft/info.py
import numpy.fft.info # precompiled
from /usr/lib/python2.5/site-packages/numpy/fft/info.pyc
# /usr/lib/python2.5/site-packages/numpy/fft/fftpack.pyc
matches /usr/lib/python2.5/site-packages/numpy/fft/fftpack.py
import numpy.fft.fftpack # precompiled
from /usr/lib/python2.5/site-packages/numpy/fft/fftpack.pyc
dlopen("/usr/lib/python2.5/site-packages/numpy/fft/fftpack_lite.so", 2);
import numpy.fft.fftpack_lite # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/fft/fftpack_lite.so
# /usr/lib/python2.5/site-packages/numpy/fft/helper.pyc
matches /usr/lib/python2.5/site-packages/numpy/fft/helper.py
import numpy.fft.helper # precompiled
from /usr/lib/python2.5/site-packages/numpy/fft/helper.pyc
import numpy.random #
directory /usr/lib/python2.5/site-packages/numpy/random
# /usr/lib/python2.5/site-packages/numpy/random/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/random/__init__.py
import numpy.random # precompiled
from /usr/lib/python2.5/site-packages/numpy/random/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/random/info.pyc
matches /usr/lib/python2.5/site-packages/numpy/random/info.py
import numpy.random.info # precompiled
from /usr/lib/python2.5/site-packages/numpy/random/info.pyc
dlopen("/usr/lib/python2.5/site-packages/numpy/random/mtrand.so", 2);
import numpy.random.mtrand # dynamically loaded
from /usr/lib/python2.5/site-packages/numpy/random/mtrand.so
# /usr/lib/python2.5/site-packages/numpy/ctypeslib.pyc
matches /usr/lib/python2.5/site-packages/numpy/ctypeslib.py
import numpy.ctypeslib # precompiled
from /usr/lib/python2.5/site-packages/numpy/ctypeslib.pyc
import ctypes # directory /usr/lib/python2.5/ctypes
# /usr/lib/python2.5/ctypes/__init__.pyc
matches /usr/lib/python2.5/ctypes/__init__.py
import ctypes # precompiled from /usr/lib/python2.5/ctypes/__init__.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_ctypes.so", 2);
import _ctypes # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_ctypes.so
# /usr/lib/python2.5/ctypes/_endian.pyc
matches /usr/lib/python2.5/ctypes/_endian.py
import ctypes._endian # precompiled
from /usr/lib/python2.5/ctypes/_endian.pyc
import numpy.ma # directory /usr/lib/python2.5/site-packages/numpy/ma
# /usr/lib/python2.5/site-packages/numpy/ma/__init__.pyc
matches /usr/lib/python2.5/site-packages/numpy/ma/__init__.py
import numpy.ma # precompiled
from /usr/lib/python2.5/site-packages/numpy/ma/__init__.pyc
# /usr/lib/python2.5/site-packages/numpy/ma/core.pyc
matches /usr/lib/python2.5/site-packages/numpy/ma/core.py
import numpy.ma.core # precompiled
from /usr/lib/python2.5/site-packages/numpy/ma/core.pyc
# /usr/lib/python2.5/site-packages/numpy/ma/extras.pyc
matches /usr/lib/python2.5/site-packages/numpy/ma/extras.py
import numpy.ma.extras # precompiled
from /usr/lib/python2.5/site-packages/numpy/ma/extras.pyc
# /usr/lib/pymodules/python2.5/matplotlib/cbook.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/cbook.py
import matplotlib.cbook # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/cbook.pyc
# /usr/lib/python2.5/StringIO.pyc matches /usr/lib/python2.5/StringIO.py
import StringIO # precompiled from /usr/lib/python2.5/StringIO.pyc
# /usr/lib/python2.5/locale.pyc matches /usr/lib/python2.5/locale.py
import locale # precompiled from /usr/lib/python2.5/locale.pyc
dlopen("/usr/lib/python2.5/lib-dynload/_locale.so", 2);
import _locale # dynamically loaded
from /usr/lib/python2.5/lib-dynload/_locale.so
# /usr/lib/python2.5/threading.pyc
matches /usr/lib/python2.5/threading.py
import threading # precompiled from /usr/lib/python2.5/threading.pyc
dlopen("/usr/lib/python2.5/lib-dynload/datetime.so", 2);
import datetime # dynamically loaded
from /usr/lib/python2.5/lib-dynload/datetime.so
# /usr/lib/pymodules/python2.5/matplotlib/pylab.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/pylab.py
import matplotlib.pylab # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/pylab.pyc
# /usr/lib/pymodules/python2.5/matplotlib/mpl.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/mpl.py
import matplotlib.mpl # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/mpl.pyc
# /usr/lib/pymodules/python2.5/matplotlib/artist.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/artist.py
import matplotlib.artist # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/artist.pyc
# /usr/lib/pymodules/python2.5/matplotlib/transforms.pyc
matches /usr/lib/pymodules/python2.5/matplotlib/transforms.py
import matplotlib.transforms # precompiled
from /usr/lib/pymodules/python2.5/matplotlib/transforms.pyc
dlopen("/usr/lib/pymodules/python2.5/matplotlib/_path.so", 2);
Erreur de segmentation
jp@evans:~$ 
From: Christoph G. <cg...@uc...> - 2009年12月15日 21:17:16
Hello,
switching to 64-bit Python and OS might help. I can display 8bit images 
up to 8459x8459 with imshow on Windows 7 64-bit with 8GB RAM. Python 
then uses about 5.5 GB RAM according to task manager. A 8460x8460 or 
larger 8bit images crash Python (definitely a bug). The 32-bit 
interpreter starts throwing MemoryErrors around 4350x4350 pixels. The 
exact limits will depend on the application, OS, and free RAM.
Christoph
On 12/15/2009 9:15 AM, Wellenreuther, Gerd wrote:
> Well, I am trying to create an overlay, *one* picture showing all 34
> images. So I am only trying to create a single figure.
>
> I just attached an example so you can get an idea (it was downsampled
> for mailing, the original picture has ca. 5500 x 6500 pixels). In the
> end, I just want to save the image to the disk, so I am using 'Agg' as
> the backend - hope this also saves me some memory.
>
> And about "old" images: I am always starting a completely new
> python-process for each stitching (one at a time).
>
> Cheers, Gerd
>
> Perry Greenfield wrote:
>> Are you clearing the figure after each image display? The figure
>> retains references to the image if you don't do a clf() and thus you
>> will eventually run out of memory, even if you delete the images (they
>> don't go away while matplotlib is using them).
>>
>> Perry
>>
>> On Dec 15, 2009, at 10:32 AM, Wellenreuther, Gerd wrote:
>>
>>> Dear all,
>>>
>>> I am trying to write a script to be used with our microscope, stitching
>>> images of various magnifications together to yield a big picture of a
>>> sample. The preprocessing involves operations like rotating the picture
>>> etc., and finally those pictures are being plotted using imshow.
>>>
>>> Unfortunately, I am running into memory problems, e.g.:
>>>
>>>> C:\Python26\lib\site-packages\PIL\Image.py:1264: DeprecationWarning:
>>>> integer argument expected, got float
>>>> im = self.im.stretch(size, resample)
>>>> Traceback (most recent call last):
>>>> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
>>>> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=600)
>>>>
>>>> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
>>>> scale,aspect_ratio,dpi,left,right,bottom,top)
>>>> File "F:\Procs\Find_dendrites.py", line 145, in stitch_images
>>>> pylab.draw()
>>>> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 352,
>>>> in draw
>>>> get_current_fig_manager().canvas.draw()
>>>> File
>>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
>>>> line 313, in draw
>>>> self.renderer = self.get_renderer()
>>>> File
>>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
>>>> line 324, in get_renderer
>>>> self.renderer = RendererAgg(w, h, self.figure.dpi)
>>>> File
>>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py",
>>>> line 59, in __init__
>>>> self._renderer = _RendererAgg(int(width), int(height), dpi,
>>>> debug=False)
>>>> RuntimeError: Could not allocate memory for image
>>>
>>> or
>>>
>>>> Traceback (most recent call last):
>>>> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
>>>> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=75)
>>>>
>>>> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
>>>> scale,aspect_ratio,dpi,left,right,bottom,top)
>>>> File "F:\Procs\Find_dendrites.py", line 142, in stitch_images
>>>> pylab.imshow(rotated_images[i],aspect='auto')
>>>> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line
>>>> 2046, in imshow
>>>> ret = ax.imshow(X, cmap, norm, aspect, interpolation, alpha, vmin,
>>>> vmax, origin, extent, shape, filternorm, filterrad, imlim, resample,
>>>> url, **kwargs)
>>>> File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 6275,
>>>> in imshow
>>>> im.set_data(X)
>>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 291,
>>>> in set_data
>>>> self._A = pil_to_array(A)
>>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 856,
>>>> in pil_to_array
>>>> x = toarray(im)
>>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 831,
>>>> in toarray
>>>> x = np.fromstring(x_str,np.uint8)
>>>> MemoryError
>>>
>>>
>>> I already implemented some downscaling of the original images (ca. 3200
>>> x 2400 pixels), to roughly match the figures dpi-setting. But this does
>>> not seem to be the only issue. The script does work for dpi of 600 or
>>> 150 for 11 individual images, yielding e.g. a 23 MB file with 600 dpi
>>> and 36 Megapixels. But it fails for e.g. 35 images even for 75 dpi.
>>>
>>> I was trying to throw away any unneccessary data using del + triggering
>>> the garbage collection, but this did not help beyond a certain point.
>>> Maybe somebody could tell me what kind of limitations there are using
>>> imshow to plot a lot of images together, and how to improve?
>>>
>>> Some more info: I am using Windows. Just by judging from the
>>> task-manager, the preprocessing is not the problem. But *plotting* the
>>> images using imshow seems to cause an increase of memory consumption of
>>> the task of 32-33 MB *each* time. Somewhere around a total of 1.3 - 1.5
>>> Gigs the process dies ...
>>>
>>> Thanks in advance,
>>>
>>> Gerd
>>> --
>>> Dr. Gerd Wellenreuther
>>> beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
>>> Petra III project
>>> HASYLAB at DESY
>>> Notkestr. 85
>>> 22603 Hamburg
>>>
>>> Tel.: + 49 40 8998 5701
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> Return on Information:
>>> Google Enterprise Search pays you back
>>> Get the facts.
>>> http://p.sf.net/sfu/google-dev2dev
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> ------------------------------------------------------------------------------
> This SF.Net email is sponsored by the Verizon Developer Community
> Take advantage of Verizon's best-in-class app development support
> A streamlined, 14 day to market process makes app distribution fast and easy
> Join now and get one step closer to millions of Verizon customers
> http://p.sf.net/sfu/verizon-dev2dev
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Perry G. <sts...@gm...> - 2009年12月15日 19:53:48
On Dec 15, 2009, at 1:09 PM, Gerd Wellenreuther wrote:
>
>
> Perry Greenfield schrieb:
>> if the above code is in a loop, and there is no figure clearing in 
>> the loop, then
>>
>> rotated_images[i] = []
>> gc.collect(2)
>>
>> will have no effect since matplotlib will still have references to 
>> the array (and generally, you never need to call gc.collect by the 
>> way).
> I do / did not know whether matplotlib is actually refering to my 
> array (in that context dereferencing it will not free memory), or 
> actually copying the data at one instance (in that case it should 
> help). So, as you can see I am lacking the inside-knowledge of 
> matplotlib, and was just trying some things which were not doing any 
> harm (at least this is what I suppose).
>
To give an idea, when you ask matplotlib to render an image, it 
processes it (resamples, rescales, maps to colors, etc) in order to 
actually display it. Since it may redo all that if you resize or 
otherwise re-render the figure, it needs to keep a reference to the 
original image. Even if you delete your reference to it, it still has 
it, and thus it won't be deleted until the figure is cleared. So if 
the input to the imshow call is the full size array, you will have 
that around. You may want to downsample that image to lower resolution 
(and make sure that the downsampled version is a copy, not a view of 
the original array). Then you can get rid of the original image, and 
instead display the smaller version. Keeping that around won't impact 
memory.
> But I would expect that figure clearing would not only free memory, 
> but also erase the formerly inserted images, right? *That* would 
> harm ;).
Yes, it would erase it :-)
Perry
From: william r. <wil...@gm...> - 2009年12月15日 19:11:12
I have two quick questions about colorbars in matplotlib. The first is
related to the size of the colorbar. I would like to have square axes for a
plot, so I use:
ax=fig.add_subplot(1,2,1)
pc=ax.pcolor(X,Z,P2)
ax.set_aspect(1./ax.get_data_ratio())
cb=pylab.colorbar(pc,orientation='vertical')
However, here I find that the colorbar is as long as the original image
rather than the scaled image. Is there a good way around this?
pylab.axis('equal')
and
pylab.axis('scaled')
have not helped.
The second question is related to the choice of tickmarks for the colorbar.
 If I would like to have only say 4 ticks on colorbar, I tried:
cb.ax.xaxis.set_major_locator(MaxNLocator(4)), however, the range for the
colorbar is now incorrect. Suggestions? I am using
version 0.99.0
Thanks,
William
From: Gerd W. <Ger...@de...> - 2009年12月15日 18:21:58
Perry Greenfield schrieb:
> if the above code is in a loop, and there is no figure clearing in the 
> loop, then
>
> rotated_images[i] = []
> gc.collect(2)
>
> will have no effect since matplotlib will still have references to the 
> array (and generally, you never need to call gc.collect by the way).
I do / did not know whether matplotlib is actually refering to my array 
(in that context dereferencing it will not free memory), or actually 
copying the data at one instance (in that case it should help). So, as 
you can see I am lacking the inside-knowledge of matplotlib, and was 
just trying some things which were not doing any harm (at least this is 
what I suppose).
 But I would expect that figure clearing would not only free memory, but 
also erase the formerly inserted images, right? *That* would harm ;).
> What isn't clear to me in this is how you handle the offsetting and 
> combining of images. Normally imshow will just display one image right 
> over the other. Can you just insert the appropriate subsampled image 
> into one output image, and then display that. After the insertion, you 
> can delete the input image inside the loop.
I am doing the offsetting by calculating and setting proper axes in my 
coordinate-system, so each imshow is done in a new, tiny axes inside the 
same figure, all of them without any kind of border around them. The big 
axes giving the box with the x- and y-ticks and the labels is create 
before that, and not filled directly (it is empty so to say). In this 
fashion I can overlay pictures precisely (or that is what I am trying). 
Of course, I am completely open to any suggestions on how to achieve 
this goal with different methods ...
Cheers, Gerd
From: Stefan S. <sch...@ph...> - 2009年12月15日 18:17:46
Thank you.
O.k. a little bit more:
I just installed 0.99.1.1. 
Without path.simplify to False the problem is still there. So the "bug" might 
be still there. 
Thanks a lot again.
Stefan
P.S.: just in case someone wants to confirm an example:
from scipy.special import sph_jn,sph_yn
import numpy as np
import pylab as py
a_s = 2.5e-6
nsph = 1.59
mrel = 1.59
l = 30.0 
m = 30.0
k=l
jnx= lambda t: (sph_jn(k,t)[0][-1])
xjnx= lambda t: (t*sph_jn(k,t)[1][-1]+sph_jn(k,t)[0][-1])
hnx= lambda t: (sph_jn(k,t)[0][-1]+1j*sph_yn(k,t)[0][-1])
xhnx= lambda t: (t*sph_jn(k,t)[1][-1]+sph_jn(k,t)[0][-1]+1j*(t*sph_yn(k,t)[1]
[-1]+sph_yn(k,t)[0][-1]))
F= lambda rho:
(((1*mrel**2*jnx(mrel*rho)*xjnx(rho)-1*jnx(rho)*xjnx(mrel*rho))/(1*mrel**2*jnx(mrel*rho)*xhnx(rho)- 
1*hnx(rho)*xjnx(mrel*rho))))
datax=[(x0)for x0 in np.arange(22,22.8,.0001)]
datay=[(F(x0))for x0 in datax]
py.figure()
py.plot(datax,datay,'-',lw=1)
py.show()
On Tuesday 15 December 2009 04:43:03 pm Jouni K. Seppänen wrote:
> stefan <wa...@we...> writes:
> > I want to plot a line with very sharp features and many data points.
> > [...] Is the '-' style doing some averaging before plotting or is it a
> > rendering problem?
> 
> What version of matplotlib do you have? There have been some path
> simplification bugs fixed recently. Try setting path.simplify to False
> in the matplotlibrc file.
> 
From: Perry G. <sts...@gm...> - 2009年12月15日 17:42:40
On Dec 15, 2009, at 12:30 PM, Wellenreuther, Gerd wrote:
> Hi Perry,
>
> to clarify what I am doing - maybe the error lies in here:
>
> * First I am building up a list of the corrected+rotated images
>
> * After that is done I am creating the figure
>
> * Then looping over every image, creating proper axes for each
> individual image and finally:
>
>> pylab.imshow(rotated_images[i],aspect='auto')
>> rotated_images[i]=[]
>> gc.collect(2)
>
> So I am trying to immediately delete the now obsolete image-data, by
> removing the reference and forcing garbage collection. No idea whether
> this is the proper/best way to do it ... but at least I hope my
> intention is clear :).
>
> Anyone an idea how to improve?
if the above code is in a loop, and there is no figure clearing in the 
loop, then
rotated_images[i] = []
gc.collect(2)
will have no effect since matplotlib will still have references to the 
array (and generally, you never need to call gc.collect by the way).
What isn't clear to me in this is how you handle the offsetting and 
combining of images. Normally imshow will just display one image right 
over the other. Can you just insert the appropriate subsampled image 
into one output image, and then display that. After the insertion, you 
can delete the input image inside the loop.
Perry
From: Michael D. <md...@st...> - 2009年12月15日 17:39:44
jenya56 wrote:
> I get this error:
> "Matplotlib backend_wx and backened_wxagg require wxPython>=2.8"
> I have Python 26 and the most current versions of Matplotlib, basemap, and
> numpy. 
> Anybody? Thanks
> PS On educational note: what do you really need backend for? thanks
> 
Do you have wxpython installed?
The matplotlib backends are what display windows with plots on your 
screen or know how to write various file formats. In order to display a 
plot window, you will need to install the Python bindings for at least 
one of the supported GUI frameworks, (Gtk+, Qt, Tk, wxPython, or Fltk) 
and tell matplotlib which one to use. See here:
http://matplotlib.sourceforge.net/faq/installing_faq.html#backends
Mike
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Wellenreuther, G. <ger...@de...> - 2009年12月15日 17:31:01
Hi Perry,
to clarify what I am doing - maybe the error lies in here:
* First I am building up a list of the corrected+rotated images
* After that is done I am creating the figure
* Then looping over every image, creating proper axes for each 
individual image and finally:
> pylab.imshow(rotated_images[i],aspect='auto')
> rotated_images[i]=[]
> gc.collect(2)
So I am trying to immediately delete the now obsolete image-data, by 
removing the reference and forcing garbage collection. No idea whether 
this is the proper/best way to do it ... but at least I hope my 
intention is clear :).
Anyone an idea how to improve?
Cheers, Gerd
Perry Greenfield wrote:
> Hi Gerd,
> 
> It still hinges on how these are stitched together. E.g. if you created 
> the composite by using sliced and strided arrays, and keep those strided 
> arrays around, then the original images are still there. But it's hard 
> to know what's going on without the details. It sure sounds like the 
> original arrays are still around somewhere.
> 
> Thanks, Perry
> 
> On Dec 15, 2009, at 11:54 AM, Wellenreuther, Gerd wrote:
> 
>> Well, I am trying to create an overlay, *one* picture showing all 34 
>> images. So I am only trying to create a single figure.
>>
>> I just attached an example so you can get an idea (it was downsampled 
>> for mailing, the original picture has ca. 5500 x 6500 pixels). In the 
>> end, I just want to save the image to the disk, so I am using 'Agg' as 
>> the backend - hope this also saves me some memory.
>>
>> And about "old" images: I am always starting a completely new 
>> python-process for each stitching (one at a time).
>>
>> Cheers, Gerd
>>
>> Perry Greenfield wrote:
>>> Are you clearing the figure after each image display? The figure 
>>> retains references to the image if you don't do a clf() and thus you 
>>> will eventually run out of memory, even if you delete the images 
>>> (they don't go away while matplotlib is using them).
>>> Perry
>>> On Dec 15, 2009, at 10:32 AM, Wellenreuther, Gerd wrote:
>>>> Dear all,
>>>>
>>>> I am trying to write a script to be used with our microscope, stitching
>>>> images of various magnifications together to yield a big picture of a
>>>> sample. The preprocessing involves operations like rotating the picture
>>>> etc., and finally those pictures are being plotted using imshow.
>>>>
>>>> Unfortunately, I am running into memory problems, e.g.:
>>>>
>>>>> C:\Python26\lib\site-packages\PIL\Image.py:1264: 
>>>>> DeprecationWarning: integer argument expected, got float
>>>>> im = self.im.stretch(size, resample)
>>>>> Traceback (most recent call last):
>>>>> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
>>>>> 
>>>>> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=600) 
>>>>>
>>>>> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
>>>>> scale,aspect_ratio,dpi,left,right,bottom,top)
>>>>> File "F:\Procs\Find_dendrites.py", line 145, in stitch_images
>>>>> pylab.draw()
>>>>> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 
>>>>> 352, in draw
>>>>> get_current_fig_manager().canvas.draw()
>>>>> File 
>>>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>>>> line 313, in draw
>>>>> self.renderer = self.get_renderer()
>>>>> File 
>>>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>>>> line 324, in get_renderer
>>>>> self.renderer = RendererAgg(w, h, self.figure.dpi)
>>>>> File 
>>>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>>>> line 59, in __init__
>>>>> self._renderer = _RendererAgg(int(width), int(height), dpi, 
>>>>> debug=False)
>>>>> RuntimeError: Could not allocate memory for image
>>>>
>>>> or
>>>>
>>>>> Traceback (most recent call last):
>>>>> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
>>>>> 
>>>>> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=75) 
>>>>>
>>>>> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
>>>>> scale,aspect_ratio,dpi,left,right,bottom,top)
>>>>> File "F:\Procs\Find_dendrites.py", line 142, in stitch_images
>>>>> pylab.imshow(rotated_images[i],aspect='auto')
>>>>> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 
>>>>> 2046, in imshow
>>>>> ret = ax.imshow(X, cmap, norm, aspect, interpolation, alpha, 
>>>>> vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, 
>>>>> resample, url, **kwargs)
>>>>> File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 6275, 
>>>>> in imshow
>>>>> im.set_data(X)
>>>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 291, 
>>>>> in set_data
>>>>> self._A = pil_to_array(A)
>>>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 856, 
>>>>> in pil_to_array
>>>>> x = toarray(im)
>>>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 831, 
>>>>> in toarray
>>>>> x = np.fromstring(x_str,np.uint8)
>>>>> MemoryError
>>>>
>>>>
>>>> I already implemented some downscaling of the original images (ca. 3200
>>>> x 2400 pixels), to roughly match the figures dpi-setting. But this does
>>>> not seem to be the only issue. The script does work for dpi of 600 or
>>>> 150 for 11 individual images, yielding e.g. a 23 MB file with 600 dpi
>>>> and 36 Megapixels. But it fails for e.g. 35 images even for 75 dpi.
>>>>
>>>> I was trying to throw away any unneccessary data using del + triggering
>>>> the garbage collection, but this did not help beyond a certain point.
>>>> Maybe somebody could tell me what kind of limitations there are using
>>>> imshow to plot a lot of images together, and how to improve?
>>>>
>>>> Some more info: I am using Windows. Just by judging from the
>>>> task-manager, the preprocessing is not the problem. But *plotting* the
>>>> images using imshow seems to cause an increase of memory consumption of
>>>> the task of 32-33 MB *each* time. Somewhere around a total of 1.3 - 1.5
>>>> Gigs the process dies ...
>>>>
>>>> Thanks in advance,
>>>>
>>>> Gerd
>>>> -- 
>>>> Dr. Gerd Wellenreuther
>>>> beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
>>>> Petra III project
>>>> HASYLAB at DESY
>>>> Notkestr. 85
>>>> 22603 Hamburg
>>>>
>>>> Tel.: + 49 40 8998 5701
>>>>
>>>> ------------------------------------------------------------------------------ 
>>>>
>>>> Return on Information:
>>>> Google Enterprise Search pays you back
>>>> Get the facts.
>>>> http://p.sf.net/sfu/google-dev2dev
>>>> _______________________________________________
>>>> Matplotlib-users mailing list
>>>> Mat...@li...
>>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>> -- 
>> Dr. Gerd Wellenreuther
>> beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
>> Petra III project
>> HASYLAB at DESY
>> Notkestr. 85
>> 22603 Hamburg
>>
>> Tel.: + 49 40 8998 5701
>> <Example_Microscope_Stitching.png>
> 
-- 
Dr. Gerd Wellenreuther
beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
Petra III project
HASYLAB at DESY
Notkestr. 85
22603 Hamburg
Tel.: + 49 40 8998 5701
From: jenya56 <je...@ya...> - 2009年12月15日 17:26:13
I get this error:
"Matplotlib backend_wx and backened_wxagg require wxPython>=2.8"
I have Python 26 and the most current versions of Matplotlib, basemap, and
numpy. 
Anybody? Thanks
PS On educational note: what do you really need backend for? thanks
-- 
View this message in context: http://old.nabble.com/exception-error-for-matplotlib.use%28%22WXAgg%22%29-tp26798475p26798475.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Wellenreuther, G. <ger...@de...> - 2009年12月15日 17:15:56
Well, I am trying to create an overlay, *one* picture showing all 34
images. So I am only trying to create a single figure.
I just attached an example so you can get an idea (it was downsampled
for mailing, the original picture has ca. 5500 x 6500 pixels). In the
end, I just want to save the image to the disk, so I am using 'Agg' as
the backend - hope this also saves me some memory.
And about "old" images: I am always starting a completely new
python-process for each stitching (one at a time).
Cheers, Gerd
Perry Greenfield wrote:
> Are you clearing the figure after each image display? The figure retains 
> references to the image if you don't do a clf() and thus you will 
> eventually run out of memory, even if you delete the images (they don't 
> go away while matplotlib is using them).
> 
> Perry
> 
> On Dec 15, 2009, at 10:32 AM, Wellenreuther, Gerd wrote:
> 
>> Dear all,
>>
>> I am trying to write a script to be used with our microscope, stitching
>> images of various magnifications together to yield a big picture of a
>> sample. The preprocessing involves operations like rotating the picture
>> etc., and finally those pictures are being plotted using imshow.
>>
>> Unfortunately, I am running into memory problems, e.g.:
>>
>>> C:\Python26\lib\site-packages\PIL\Image.py:1264: DeprecationWarning: 
>>> integer argument expected, got float
>>> im = self.im.stretch(size, resample)
>>> Traceback (most recent call last):
>>> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
>>> 
>>> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=600) 
>>>
>>> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
>>> scale,aspect_ratio,dpi,left,right,bottom,top)
>>> File "F:\Procs\Find_dendrites.py", line 145, in stitch_images
>>> pylab.draw()
>>> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 352, 
>>> in draw
>>> get_current_fig_manager().canvas.draw()
>>> File 
>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>> line 313, in draw
>>> self.renderer = self.get_renderer()
>>> File 
>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>> line 324, in get_renderer
>>> self.renderer = RendererAgg(w, h, self.figure.dpi)
>>> File 
>>> "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", 
>>> line 59, in __init__
>>> self._renderer = _RendererAgg(int(width), int(height), dpi, 
>>> debug=False)
>>> RuntimeError: Could not allocate memory for image
>>
>> or
>>
>>> Traceback (most recent call last):
>>> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
>>> 
>>> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=75) 
>>>
>>> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
>>> scale,aspect_ratio,dpi,left,right,bottom,top)
>>> File "F:\Procs\Find_dendrites.py", line 142, in stitch_images
>>> pylab.imshow(rotated_images[i],aspect='auto')
>>> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 
>>> 2046, in imshow
>>> ret = ax.imshow(X, cmap, norm, aspect, interpolation, alpha, vmin, 
>>> vmax, origin, extent, shape, filternorm, filterrad, imlim, resample, 
>>> url, **kwargs)
>>> File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 6275, 
>>> in imshow
>>> im.set_data(X)
>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 291, 
>>> in set_data
>>> self._A = pil_to_array(A)
>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 856, 
>>> in pil_to_array
>>> x = toarray(im)
>>> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 831, 
>>> in toarray
>>> x = np.fromstring(x_str,np.uint8)
>>> MemoryError
>>
>>
>> I already implemented some downscaling of the original images (ca. 3200
>> x 2400 pixels), to roughly match the figures dpi-setting. But this does
>> not seem to be the only issue. The script does work for dpi of 600 or
>> 150 for 11 individual images, yielding e.g. a 23 MB file with 600 dpi
>> and 36 Megapixels. But it fails for e.g. 35 images even for 75 dpi.
>>
>> I was trying to throw away any unneccessary data using del + triggering
>> the garbage collection, but this did not help beyond a certain point.
>> Maybe somebody could tell me what kind of limitations there are using
>> imshow to plot a lot of images together, and how to improve?
>>
>> Some more info: I am using Windows. Just by judging from the
>> task-manager, the preprocessing is not the problem. But *plotting* the
>> images using imshow seems to cause an increase of memory consumption of
>> the task of 32-33 MB *each* time. Somewhere around a total of 1.3 - 1.5
>> Gigs the process dies ...
>>
>> Thanks in advance,
>>
>> Gerd
>> -- 
>> Dr. Gerd Wellenreuther
>> beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
>> Petra III project
>> HASYLAB at DESY
>> Notkestr. 85
>> 22603 Hamburg
>>
>> Tel.: + 49 40 8998 5701
>>
>> ------------------------------------------------------------------------------ 
>>
>> Return on Information:
>> Google Enterprise Search pays you back
>> Get the facts.
>> http://p.sf.net/sfu/google-dev2dev
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Dr. Gerd Wellenreuther
beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
Petra III project
HASYLAB at DESY
Notkestr. 85
22603 Hamburg
Tel.: + 49 40 8998 5701
From: Jouni K. S. <jk...@ik...> - 2009年12月15日 15:44:05
stefan <wa...@we...> writes:
> I want to plot a line with very sharp features and many data points.
> [...] Is the '-' style doing some averaging before plotting or is it a
> rendering problem?
What version of matplotlib do you have? There have been some path
simplification bugs fixed recently. Try setting path.simplify to False
in the matplotlibrc file.
-- 
Jouni K. Seppänen
http://www.iki.fi/jks
From: Wellenreuther, G. <ger...@de...> - 2009年12月15日 15:33:01
Dear all,
I am trying to write a script to be used with our microscope, stitching 
images of various magnifications together to yield a big picture of a 
sample. The preprocessing involves operations like rotating the picture 
etc., and finally those pictures are being plotted using imshow.
Unfortunately, I am running into memory problems, e.g.:
> C:\Python26\lib\site-packages\PIL\Image.py:1264: DeprecationWarning: integer argument expected, got float
> im = self.im.stretch(size, resample)
> Traceback (most recent call last):
> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=600)
> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
> scale,aspect_ratio,dpi,left,right,bottom,top)
> File "F:\Procs\Find_dendrites.py", line 145, in stitch_images
> pylab.draw()
> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 352, in draw
> get_current_fig_manager().canvas.draw()
> File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line 313, in draw
> self.renderer = self.get_renderer()
> File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line 324, in get_renderer
> self.renderer = RendererAgg(w, h, self.figure.dpi)
> File "C:\Python26\lib\site-packages\matplotlib\backends\backend_agg.py", line 59, in __init__
> self._renderer = _RendererAgg(int(width), int(height), dpi, debug=False)
> RuntimeError: Could not allocate memory for image
or
> Traceback (most recent call last):
> File "F:\Procs\Find_dendrites.py", line 1093, in <module>
> file_type="PNG",do_stitching=do_stitching,do_dendrite_finding=do_dendrite_finding,down_sizing_factor=48,dpi=75)
> File "F:\Procs\Find_dendrites.py", line 1052, in process_images
> scale,aspect_ratio,dpi,left,right,bottom,top)
> File "F:\Procs\Find_dendrites.py", line 142, in stitch_images
> pylab.imshow(rotated_images[i],aspect='auto')
> File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 2046, in imshow
> ret = ax.imshow(X, cmap, norm, aspect, interpolation, alpha, vmin, vmax, origin, extent, shape, filternorm, filterrad, imlim, resample, url, **kwargs)
> File "C:\Python26\lib\site-packages\matplotlib\axes.py", line 6275, in imshow
> im.set_data(X)
> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 291, in set_data
> self._A = pil_to_array(A)
> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 856, in pil_to_array
> x = toarray(im)
> File "C:\Python26\lib\site-packages\matplotlib\image.py", line 831, in toarray
> x = np.fromstring(x_str,np.uint8)
> MemoryError
I already implemented some downscaling of the original images (ca. 3200 
x 2400 pixels), to roughly match the figures dpi-setting. But this does 
not seem to be the only issue. The script does work for dpi of 600 or 
150 for 11 individual images, yielding e.g. a 23 MB file with 600 dpi 
and 36 Megapixels. But it fails for e.g. 35 images even for 75 dpi.
I was trying to throw away any unneccessary data using del + triggering 
the garbage collection, but this did not help beyond a certain point. 
Maybe somebody could tell me what kind of limitations there are using 
imshow to plot a lot of images together, and how to improve?
Some more info: I am using Windows. Just by judging from the 
task-manager, the preprocessing is not the problem. But *plotting* the 
images using imshow seems to cause an increase of memory consumption of 
the task of 32-33 MB *each* time. Somewhere around a total of 1.3 - 1.5 
Gigs the process dies ...
Thanks in advance,
Gerd
-- 
Dr. Gerd Wellenreuther
beamline scientist P06 "Hard X-Ray Micro/Nano-Probe"
Petra III project
HASYLAB at DESY
Notkestr. 85
22603 Hamburg
Tel.: + 49 40 8998 5701
From: Michael D. <md...@st...> - 2009年12月15日 15:17:08
Which version of matplotlib are you using? This is (I suspect) the 
result of a known bug in matplotlib that has been fixed since the latest 
release. In plots with large numbers of points, invisible points are 
automatically removed to increase performance and reduce file sizes, but 
this behavior was not fully correct.
You can either install the 0.99.x branch from SVN, or, as a workaround, 
set "path.simplify" to False in your matplotlibrc, at the expense of 
performance and file size.
Mike
stefan wrote:
> Hi,
>
> I want to plot a line with very sharp features and many data points. If I plot 
> the data with markers, the features can be seen perfectly. But if I choose the 
> line style just to be '-' (which is also default), the peaks are not shown 
> anymore. If I use something like '-o', the peaks are there, but the line does 
> not fully join the individual markers at the peak. Is the '-' style doing some 
> averaging before plotting or is it a rendering problem? And any suggestions 
> how to get rid of it?
>
> Thanks a lot!
>
> Stefan
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
From: Antonino I. <tri...@gm...> - 2009年12月15日 14:12:44
Hi to all,
I'm doing a simple animation like this:
--
ion()
x = arange(0,2,0.01)
y = zeros_like(x)
y[45:55]=1
l, = plot(x,y)
D = 0.1
h = x[1]-x[0]
dt = 0.0001;
def nabla(v,h):
 na = zeros_like(v)
 na[1:-1] = (v[2:]-2*v[1:-1]+v[:-2])
 na[0],na[-1] = 0,0
 return na/(h**2)
for i in range(1000):
 y = y + D*nabla(y,h)*dt
 if i%10 == 0:
 l.set_ydata(y)
 draw()
--
however, changing the line
 y = y + D*nabla(y,h)*dt with
in
 y += D*nabla(y,h)*dt
the plot is not updated anymore. I have to replace l.set_ydata(y) with
y.recache() to make the the animation work again.
I think this is a bug since the line should be updated even using the
+= operator.
Regards,
Antonio
From: stefan <wa...@we...> - 2009年12月15日 12:38:47
Hi,
I want to plot a line with very sharp features and many data points. If I plot 
the data with markers, the features can be seen perfectly. But if I choose the 
line style just to be '-' (which is also default), the peaks are not shown 
anymore. If I use something like '-o', the peaks are there, but the line does 
not fully join the individual markers at the peak. Is the '-' style doing some 
averaging before plotting or is it a rendering problem? And any suggestions 
how to get rid of it?
Thanks a lot!
Stefan
From: Jae-Joon L. <lee...@gm...> - 2009年12月15日 03:44:05
Yes, axes location in mpl, by design, is specified in normalized
figure coordinate.
And, for the colorbar axes to match the height (or width) of the
parent axes always , you need to manually update the location of the
colorbar axes.
There are a few ways to do this. You may use event callbacks, use
custom axes class, or use Axes._axes_locator attribute (which is a
callable object that returns the new axes postion).
The axes_grid toolkit has some helper functions for this, and you may
take a look if interested.
http://matplotlib.sourceforge.net/examples/axes_grid/demo_axes_divider.html
-JJ
On Mon, Dec 14, 2009 at 2:18 PM, Thomas Robitaille
<tho...@gm...> wrote:
> Hi,
>
> I would like to plot a colorbar which automatically gets resized when
> I change the view limits and the aspect ratio of the main axes. So for
> example:
>
> import matplotlib.pyplot as mpl
> import numpy as np
>
> fig = mpl.figure()
> ax = fig.add_axes([0.1,0.1,0.7,0.8])
> cax = fig.add_axes([0.81,0.1,0.02,0.8])
>
> image = ax.imshow(np.random.random((100,100)))
>
> fig.colorbar(image, cax=cax)
>
> Is fine, but then if I interactively select a sub-region to zoom in
> with a different aspect ratio, which I can also emulate by doing
>
> ax.set_ylim(40.,60.)
>
> The colorbar is then too high. If I then do
>
> ax.set_xlim(50.,55.)
>
> The height is fine but the position would need changing.
>
> Is there an easy way to get around this issue and have the colorbar
> always at a fixed distance from the main axes, and also have it
> resize? Or is the only way to write this all explicitly using event
> callbacks?
>
> Thanks for any help,
>
> Thomas
>
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Eric F. <ef...@ha...> - 2009年12月15日 02:37:07
nbv4 wrote:
> The histogram example in the matpolotlib gallery is just what I want, except
> instead of "probility" shown on the Y-axis, I want the number of items that
> fall into each bin to be plotted. How do I do this? Here is my code:
> 
> import numpy as np
> import matplotlib
> matplotlib.use('Agg')
> import matplotlib.pyplot as plt
> 
> fig = plt.figure()
> ax = fig.add_subplot(111)
> 
> x = self.data ## a list, such as [12.43, 34.24, 35.56, 465.3547, ]
> ax.hist(x, 60, normed=1, facecolor='green', alpha=0.75)
Leave out the "normed" kwarg, or set it to False (the default).
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.hist
> 
> ax.set_xlabel('Totals')
> ax.set_ylabel('Number of Users'))
> ax.set_xlim(0, 2000)
> ax.set_ylim(0, 0.003)
> ax.grid(True)
From: Ryan M. <rm...@gm...> - 2009年12月15日 02:05:50
On Mon, Dec 14, 2009 at 7:22 PM, nbv4 <cp3...@oh...> wrote:
>
> The histogram example in the matpolotlib gallery is just what I want, except
> instead of "probility" shown on the Y-axis, I want the number of items that
> fall into each bin to be plotted. How do I do this? Here is my code:
>
>    import numpy as np
>    import matplotlib
>    matplotlib.use('Agg')
>    import matplotlib.pyplot as plt
>
>    fig = plt.figure()
>    ax = fig.add_subplot(111)
>
>    x = self.data ## a list, such as [12.43, 34.24, 35.56, 465.3547, ]
>    ax.hist(x, 60, normed=1, facecolor='green', alpha=0.75)
>From the docstring for ax.hist:
 *normed*:
 If *True*, the first element of the return tuple will
 be the counts normalized to form a probability density, i.e.,
 ``n/(len(x)*dbin)``. In a probability density, the integral of
 the histogram should be 1; you can verify that with a
 trapezoidal integration of the probability density function::
 pdf, bins, patches = ax.hist(...)
 print np.sum(pdf * np.diff(bins))
So instead, pass normed=False (instead of normed=1) to the call to ax.hist.
Ryan
-- 
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
From: nbv4 <cp3...@oh...> - 2009年12月15日 01:22:48
The histogram example in the matpolotlib gallery is just what I want, except
instead of "probility" shown on the Y-axis, I want the number of items that
fall into each bin to be plotted. How do I do this? Here is my code:
 import numpy as np
 import matplotlib
 matplotlib.use('Agg')
 import matplotlib.pyplot as plt
 fig = plt.figure()
 ax = fig.add_subplot(111)
 x = self.data ## a list, such as [12.43, 34.24, 35.56, 465.3547, ]
 ax.hist(x, 60, normed=1, facecolor='green', alpha=0.75)
 ax.set_xlabel('Totals')
 ax.set_ylabel('Number of Users'))
 ax.set_xlim(0, 2000)
 ax.set_ylim(0, 0.003)
 ax.grid(True)
-- 
View this message in context: http://old.nabble.com/Histogram-without-probability-tp26781968p26781968.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
1 message has been excluded from this view by a project administrator.

Showing 20 results of 20

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