[Matplotlib-users] Ubuntu server package PPA python-matplotlib-nox ?

2011-08-10 Thread Jeff Kowalczyk
Does anyone maintain a PPA with a python-matplotlib-nox suitable for Ubuntu
11.04 amd64 server i.e. built without X or GUI libraries?

On a fresh Ubuntu server install, python-numpy has relatively few dependencies,
but python-matplotlib pulls in everything the full GUI needs.

$ sudo aptitude install python-matplotlib -s
The following NEW packages will be installed:

  blt{a} cpp{a} cpp-4.5{a} defoma{a} fontconfig{a} hicolor-icon-theme{a}
  libatk1.0-0{a} libatk1.0-data{a} libavahi-client3{a}
  libavahi-common-data{a} libavahi-common3{a} libblas3gf{a}
  libcloog-ppl0{a} libcups2{a} libdatrie1{a} libelfg0{a} libfontenc1{a}
  libgdk-pixbuf2.0-0{a} libgfortran3{a} libgl1-mesa-dri{a}
  libgl1-mesa-glx{a} libglade2-0{a} libgmpxx4ldbl{a} libgtk2.0-0{a}
  libgtk2.0-bin{a} libgtk2.0-common{a} libice6{a} libjasper1{a}
  libjpeg62{a} liblapack3gf{a} libmpc2{a} libmpfr4{a} libpango1.0-0{a}
  libppl-c2{a} libppl7{a} libsm6{a} libthai-data{a} libthai0{a}
  libtiff4{a} libutempter0{a} libxaw7{a} libxcb-atom1{a}
  libxcb-shape0{a} libxcomposite1{a} libxcursor1{a} libxdamage1{a}
  libxfixes3{a} libxfont1{a} libxft2{a} libxi6{a} libxinerama1{a}
  libxmu6{a} libxpm4{a} libxrandr2{a} libxss1{a} libxt6{a} libxtst6{a}
  libxv1{a} libxxf86dga1{a} libxxf86vm1{a} python-dateutil{a}
  python-glade2{a} python-gtk2{a} python-matplotlib
  python-matplotlib-data{a} python-numpy{a} python-pyparsing{a}
  python-tk{a} python-tz{a} shared-mime-info{a} tcl8.5{a} tk8.5{a}
  ttf-lyx{a} x-ttcidfont-conf{a} x11-common{a} x11-utils{a} xbitmaps{a}
  xfonts-encodings{a} xfonts-utils{a} xterm{a}

0 packages upgraded, 80 newly installed, 0 to remove and 0 not upgraded.
Need to get 33.4 MB of archives. After unpacking 117 MB will be used.

Jeff


--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Bus error when using logarithmic scale with logaritmic bins

2011-08-10 Thread Marc Magrans de Abril
Dear colleagues,

I'm trying to display an histogram with logarithmic bins using the
logarithmic scale in the x-axis. When I execute the attached python
script it crashes giving a "Bus Error" message (see also the attached
core dump).

If I remove the line "plt.xscale('log')" the script goes up to the end.

I'm running the program on MacOS 10.6.8, Python 2.5, numpy 1.2.1, and
matplotlib 0.98.5.2.

Anyone knows the reason of the crash?

Thanks,
marc
Process: Python [12279]
Path:
/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python
Identifier:  org.python.python
Version: 2.5a0 (2.5alpha0)
Code Type:   X86 (Native)
Parent Process:  bash [11351]

Date/Time:   2011-08-10 19:29:03.082 +0200
OS Version:  Mac OS X 10.6.8 (10K549)
Report Version:  6

Interval Since Last Report:  1008 sec
Crashes Since Last Report:   3
Per-App Interval Since Last Report:  33 sec
Per-App Crashes Since Last Report:   3
Anonymous UUID:  22EF-1C96-47F9-BECD-21497E29C337

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   ??? 00 0 + 0
1   libSystem.B.dylib   0x9a9c8f68 
_Unwind_GetLanguageSpecificData + 24
2   libstdc++.6.dylib   0x948fcd86 __gxx_personality_v0 + 120
3   libgcc_s.1.dylib0x01759476 
_Unwind_RaiseException_Phase2 + 102 (unwind.inc:68)
4   libgcc_s.1.dylib0x01759890 _Unwind_Resume + 112 
(unwind.inc:238)
5   _backend_agg.so 0x02a344c0 
py_to_agg_transformation_matrix(Py::Object const&, bool) + 580
6   _backend_agg.so 0x02a3c5a5 
RendererAgg::draw_path(Py::Tuple const&) + 281
7   _backend_agg.so 0x02a4daea 
Py::PythonExtension::method_varargs_call_handler(_object*, 
_object*) + 400
8   org.python.python   0x0009761c PyEval_EvalFrameEx + 18969 
(ceval.c:3566)
9   org.python.python   0x00099482 PyEval_EvalCodeEx + 1819 
(ceval.c:2833)
10  org.python.python   0x00097108 PyEval_EvalFrameEx + 17669 
(ceval.c:3662)
11  org.python.python   0x00099482 PyEval_EvalCodeEx + 1819 
(ceval.c:2833)
12  org.python.python   0x00097108 PyEval_EvalFrameEx + 17669 
(ceval.c:3662)
13  org.python.python   0x00099482 PyEval_EvalCodeEx + 1819 
(ceval.c:2833)
14  org.python.python   0x00097108 PyEval_EvalFrameEx + 17669 
(ceval.c:3662)
15  org.python.python   0x000982e4 PyEval_EvalFrameEx + 22241 
(ceval.c:3652)
16  org.python.python   0x00099482 PyEval_EvalCodeEx + 1819 
(ceval.c:2833)
17  org.python.python   0x0002edfb function_call + 320 
(funcobject.c:517)
18  org.python.python   0xdceb PyObject_Call + 45 
(abstract.c:1860)
19  org.python.python   0x0001580c instancemethod_call + 401 
(classobject.c:2493)
20  org.python.python   0xdceb PyObject_Call + 45 
(abstract.c:1860)
21  org.python.python   0x0009594d PyEval_EvalFrameEx + 11594 
(ceval.c:3777)
22  org.python.python   0x00099482 PyEval_EvalCodeEx + 1819 
(ceval.c:2833)
23  org.python.python   0x00097108 PyEval_EvalFrameEx + 17669 
(ceval.c:3662)
24  org.python.python   0x00099482 PyEval_EvalCodeEx + 1819 
(ceval.c:2833)
25  org.python.python   0x0002edfb function_call + 320 
(funcobject.c:517)
26  org.python.python   0xdceb PyObject_Call + 45 
(abstract.c:1860)
27  org.python.python   0x000965d4 PyEval_EvalFrameEx + 14801 
(ceval.c:3846)
28  org.python.python   0x00099482 PyEval_EvalCodeEx + 1819 
(ceval.c:2833)
29  org.python.python   0x0002edfb function_call + 320 
(funcobject.c:517)
30  org.python.python   0xdceb PyObject_Call + 45 
(abstract.c:1860)
31  org.python.python   0x0001580c instancemethod_call + 401 
(classobject.c:2493)
32  org.python.python   0xdceb PyObject_Call + 45 
(abstract.c:1860)
33  org.python.python   0x00091d7e 
PyEval_CallObjectWithKeywords + 112 (ceval.c:3435)
34  _tkinter.so 0x024dfe57 PythonCmd + 220 
(_tkinter.c:2012)
35  Tcl 0x02663f78 TclInvokeStringCommand + 110
36  Tcl 0x02666182 TclEvalObjvInternal + 984
37  Tcl 0x0268d68f TclExecuteByteCode + 3487
38  Tcl 0x02692f10 Tcl_ExprObj + 1090
39  Tcl 0x02664d35 Tcl_ExprBooleanObj + 46
40  Tcl 0x02672ca7 Tcl_IfObj

[Matplotlib-users] Polygon radar plot instead of circular?

2011-08-10 Thread Jay Wineinger
Hi everyone,

I'm trying to construct a radar plot for 5 variables.  I've found the
example code (radar_chart.py) for doing this with matplotlib but I'm having
trouble adjusting one aspect of the rendering.  That sample file produces
radar plots with  circular frames and ticks (see
http://wineinger.me/plotting/radar_chart1.png).  That sample code does seem
to have an option to use a polygon frame rather than a circle (the default),
but this doesn't seem to do much except erase part of the outer tick lines (
http://wineinger.me/plotting/polygon.png vs
http://wineinger.me/plotting/circle.png).  Plus, I'm looking for the tick
lines to parallel the frame, so having a polygon frame with circular ticks
would not be useful to me.

Here is an example of what I'd like to produce:
http://www.corda.com/docsource/doc7/Manuals/project_graphics/design_graphs_radar_transparency.gif.
 Can anyone provide some sample code to get me started or at least some
direction on how to accomplish this?  I'm new to matplotlib though I do have
a fair bit of python experience.

thanks!
Jay
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bus error when using logarithmic scale with logaritmic bins

2011-08-10 Thread Benjamin Root
On Wed, Aug 10, 2011 at 12:32 PM, Marc Magrans de Abril <
marcmagransdeab...@gmail.com> wrote:

> Dear colleagues,
>
> I'm trying to display an histogram with logarithmic bins using the
> logarithmic scale in the x-axis. When I execute the attached python
> script it crashes giving a "Bus Error" message (see also the attached
> core dump).
>
> If I remove the line "plt.xscale('log')" the script goes up to the end.
>
> I'm running the program on MacOS 10.6.8, Python 2.5, numpy 1.2.1, and
> matplotlib 0.98.5.2.
>
> Anyone knows the reason of the crash?
>
> Thanks,
> marc
>
>
If I remember correctly, there was a log-scale bug in plt.hist() that got
fixed a little while back.  Your version of numpy and matplotlib is a little
old.  Is it possible to update those two packages on your system?

Ben Root
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bus error when using logarithmic scale with logaritmic bins

2011-08-10 Thread Marc Magrans de Abril
Hi Ben,

I will try to do it. Once it is done I let you know.

Cheers,
marc

On Wed, Aug 10, 2011 at 7:41 PM, Benjamin Root  wrote:
>
>
> On Wed, Aug 10, 2011 at 12:32 PM, Marc Magrans de Abril
>  wrote:
>>
>> Dear colleagues,
>>
>> I'm trying to display an histogram with logarithmic bins using the
>> logarithmic scale in the x-axis. When I execute the attached python
>> script it crashes giving a "Bus Error" message (see also the attached
>> core dump).
>>
>> If I remove the line "plt.xscale('log')" the script goes up to the end.
>>
>> I'm running the program on MacOS 10.6.8, Python 2.5, numpy 1.2.1, and
>> matplotlib 0.98.5.2.
>>
>> Anyone knows the reason of the crash?
>>
>> Thanks,
>> marc
>>
>
> If I remember correctly, there was a log-scale bug in plt.hist() that got
> fixed a little while back.  Your version of numpy and matplotlib is a little
> old.  Is it possible to update those two packages on your system?
>
> Ben Root
>
>

--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Polygon radar plot instead of circular?

2011-08-10 Thread Tony Yu
On Wed, Aug 10, 2011 at 1:36 PM, Jay Wineinger wrote:

> Hi everyone,
>
> I'm trying to construct a radar plot for 5 variables.  I've found the
> example code (radar_chart.py) for doing this with matplotlib but I'm having
> trouble adjusting one aspect of the rendering.  That sample file produces
> radar plots with  circular frames and ticks (see
> http://wineinger.me/plotting/radar_chart1.png).  That sample code does
> seem to have an option to use a polygon frame rather than a circle (the
> default), but this doesn't seem to do much except erase part of the outer
> tick lines (http://wineinger.me/plotting/polygon.png vs
> http://wineinger.me/plotting/circle.png).
>

Originally, this example did produce the polygon frame correctly.
Improvements to matplotlib have, however, broken this example. If you plot
this on a non-white background, you'll see that there is indeed a polygon
patch for the axes. Nevertheless the border (i.e. "spine") of the plot is
circular because of improvements that separated the spine from the patch.
The example code only overrides PolarAxes._gen_axes_patch, but should also
override PolarAxes._gen_axes_spines to fix this issue. Unfortunately, I
don't have time to work on this.


> Plus, I'm looking for the tick lines to parallel the frame, so having a
> polygon frame with circular ticks would not be useful to me.
>

I thought the grid was correctly rendered as polygons instead of circles
(when choosing a polygon frame). I don't, however, see anything in the
example code to change the grid lines, so my memory might be wrong.

Sorry I couldn't be more help.
-Tony
--
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] NavigationToolbar2QT change height

2011-08-10 Thread RICHARD Georges-Emmanuel
First of all congratulation for the release 1.1.0 of matplotlib it's a 
wonderfull.
since the version 0.90 I started to use it, I keep enjoy it everyday. I 
work with PyQT4 and PySide.

I try to modify the height of the NavigationToolbar2QT, but no matter I 
use "resize" the Qt4 method nothing happen.

code available: http://pastebin.com/8KW2dWG2
#...# all Qt imports
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as 
FigureCanvas
from matplotlib.backends.backend_qt4 import NavigationToolbar2QT as 
NavigationToolbar
class MPL_widget(QWidget):
 def __init__(self,parent):
 QWidget.__init__(self,parent)
 self.canvas = FigureCanvas()
 self.toolbar = NavigationToolbar(self.canvas,self.canvas)
 self.toolbar.resize(100,10) #
 self.vbox = QVBoxLayout()
 vbox = self.vbox
 vbox.addWidget(self.canvas)
 vbox.addWidget(self.toolbar)
 self.setLayout(vbox)

I tryed to modify directly in matplotlib module 
'matplotlib.backends.backed_qt4' in the constructor of 
NavigationToolbar2QT just after the call of QToolBar.__init__(), nothing 
happen either.

finaly I added a QSplitter, which let me hide the bar during runtime, 
but my first goal was rather to reduce the size and all icon inside.
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import PyQt4.QtGui as QtGui

import matplotlib
if matplotlib.get_backend() != "Qt4Agg":
 matplotlib.use("Qt4Agg")

from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as 
FigureCanvas
from matplotlib.backends.backend_qt4 import NavigationToolbar2QT as 
NavigationToolbar

from matplotlib.figure import Figure

class MPL_Widget(QWidget):
 def __init__(self, parent = None):
 QWidget.__init__(self, parent)
 self.fig = Figure(figsize = (10, 12), dpi=100, facecolor = 
'#FF')
 self.ax = self.fig.add_subplot(111, sharex = None, sharey = None)
 self.canvas = FigureCanvas(self.fig)
 self.toolbar = NavigationToolbar(self.canvas, self.canvas)
 self.toolbar.resize(10,10) 
 # this line does nothing
 self.vbox = QVBoxLayout()
 tmp = self.vbox
 tmp = QSplitter()
 tmp.setOrientation(Qt.Vertical)
 tmp.setContentsMargins(0,0,0,0)
 tmp.addWidget(self.canvas)
 tmp.addWidget(self.toolbar)
 self.vbox.addWidget(tmp)
 self.setLayout(self.vbox)
 self.layout().setContentsMargins(0,0,0,0)

import sys
app = QApplication(sys.argv)
w = MPL_Widget()
import numpy as N
x = N.linspace(-10, 10)
y = N.sin(x)
ax = w.ax
ax.plot(x, y, 'o-', mew=0)
w.show()
sys.exit(app.exec_())



Any hint would be appreciate.

Cheers.
 Joe

-- 
RICHARD Georges-Emmanuel
Electronic and Computer Engineer
perspective.electro...@gmail.com



--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. 
http://p.sf.net/sfu/wandisco-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users