[Python-modules-team] Bug#503148: histogram(x, bin): x-axis range should be based on bin.min() and bin.max() when bin is a sequence

Michael S. Gilbert michael.s.gilbert at gmail.com
Wed Oct 22 21:41:53 UTC 2008


Package: python-matplotlib
Version: 0.98.3-4
Severity: normal

the following python code creates a histogram with an x-axis range of
0.1 min to 0.3 max (based on the mins and maxes of the x rather than bin).
the bins should be used to size the axis since the user specified that
he wanted to see those specific bins (even though they are empty).  note 
that the 'range=' option would be a potential solution, but it is ignored 
when bin is a sequence (presumably because the range would be chosen
based on bin's limits, but this isn't so).

  from pylab import *
  x = [0.18,0.22,0.19]
  bin = [0,0.1,0.2,0.3,0.4,0.5]
  hist(x,bin)
  show()

i believe that the x-axis ranges should instead be based on the mins and
maxes of bin when it is a sequence.

please forward this report upstream or let me know if you believe that it
belongs there.

thank you for your consideration

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (400, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-matplotlib depends on:
ii  libatk1.0-0            1.22.0-1          The ATK accessibility toolkit
ii  libc6                  2.7-14            GNU C Library: Shared libraries
ii  libcairo2              1.6.4-6           The Cairo 2D vector graphics libra
ii  libfreetype6           2.3.7-2           FreeType 2 font engine, shared lib
ii  libgcc1                1:4.3.2-1         GCC support library
ii  libglib2.0-0           2.16.6-1          The GLib library of C routines
ii  libgtk2.0-0            2.12.11-3         The GTK+ graphical user interface 
ii  libpango1.0-0          1.20.5-2          Layout and rendering of internatio
ii  libpng12-0             1.2.27-2          PNG library - runtime
ii  libstdc++6             4.3.2-1           The GNU Standard C++ Library v3
ii  python                 2.5.2-2           An interactive high-level object-o
ii  python-cairo           1.4.12-1.1        Python bindings for the Cairo vect
ii  python-central         0.6.8             register and build utility for Pyt
ii  python-dateutil        1.4-1             powerful extensions to the standar
ii  python-excelerator     0.6.3a-3.1        module for reading/writing Excel s
ii  python-glade2          2.12.1-6          GTK+ bindings: Glade support
ii  python-gobject         2.14.2-1          Python bindings for the GObject li
ii  python-gtk2            2.12.1-6          Python bindings for the GTK+ widge
ii  python-matplotlib-data 0.98.3-4          Python based plotting system (data
ii  python-numpy           1:1.1.0-3         Numerical Python adds a fast array
ii  python-pyparsing       1.5.0-1           Python parsing module
ii  python-qt3             3.17.4-1          Qt3 bindings for Python
ii  python-qt4             4.4.2-4           Python bindings for Qt4
ii  python-tk              2.5.2-1           Tkinter - Writing Tk applications 
ii  python-tz              2008c-2           Python version of the Olson timezo
ii  tcl8.4                 8.4.19-2          Tcl (the Tool Command Language) v8
ii  tk8.4                  8.4.19-2          Tk toolkit for Tcl and X11, v8.4 -
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

Versions of packages python-matplotlib recommends:
ii  dvipng                        1.11-1     convert DVI files to PNG graphics

Versions of packages python-matplotlib suggests:
pn  ipython                       <none>     (no description available)
ii  python-configobj              4.5.2-1    a simple but powerful config file 
ii  python-enthought-traits       2.0.5-1    Manifest typing and reactive progr
pn  python-matplotlib-doc         <none>     (no description available)
pn  python-scipy                  <none>     (no description available)
pn  texlive-extra-utils           <none>     (no description available)
pn  texlive-latex-extra           <none>     (no description available)

-- no debconf information





More information about the Python-modules-team mailing list