On Mon, 09 Jun 2008 07:41:05 -1000
Eric Firing <[EMAIL PROTECTED]> wrote:
> Nils Wagner wrote:
>> Hi Eric,
>>
>> I have still some trouble with the following example
>>taken from openopt
>>
>>
>> /usr/bin/python -i nlp_3.py
>> starting solver ipopt (license: CPL) with problem nlp3
>> [PyIPOPT] Ipopt will use Hessian approximation.
>> [PyIPOPT] nele_hess is 0
>> iter objFunVal log10(maxResidual)
>> 0 -1.640e+02 0.81
>> Traceback (most recent call last):
>> File "nlp_3.py", line 65, in ?
>> r = p.solve(solver)
>> File
>> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py",
>> line 236, in solve
>> return runProbSolver(self, solvers, *args, **kwargs)
>> File
>> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/runProbSolver.py",
>> line 219, in runProbSolver
>> solver(p)
>> File
>> "/usr/lib/python2.4/site-packages/scikits/openopt/solvers/CoinOr/ipopt_oo.py",
>>
>> line 70, in __solver__
>> p.iterfcn(p.x0)
>> File
>> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/BaseProblem.py",
>> line 57, in <lambda>
>> self.iterfcn = lambda *args: ooIter(self, *args)#
>>this parameter is
>> only for OpenOpt developers, not common users
>> File
>> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/ooIter.py",
>> line 78, in ooIter
>> for df in p.graphics.drawFuncs: df(p)
>> File
>> "/usr/lib/python2.4/site-packages/scikits/openopt/Kernel/ooGraphics.py",
>> line 127, in oodraw
>> if self.nSubPlots>1: pylab.subplot(self.nSubPlots,
>>1, 1)
>> File
>>"/usr/lib/python2.4/site-packages/matplotlib/pyplot.py",
>>line
>> 519, in subplot
>> fig = gcf()
>> File
>>"/usr/lib/python2.4/site-packages/matplotlib/pyplot.py",
>>line
>> 210, in gcf
>> return figure()
>> File
>>"/usr/lib/python2.4/site-packages/matplotlib/pyplot.py",
>>line
>> 195, in figure
>> FigureClass=FigureClass,
>> File
>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wxagg.py",
>> line 119, in new_figure_manager
>> frame = FigureFrameWxAgg(num, fig)
>> File
>> "/usr/lib/python2.4/site-packages/matplotlib/backends/backend_wx.py",
>> line 1237, in __init__
>> self.canvas.SetInitialSize(wx.Size(fig.bbox.width,
>>fig.bbox.height))
>> AttributeError: 'FigureCanvasWxAgg' object has no
>>attribute
>> 'SetInitialSize'
>>
>> Any idea ?
>
> No clue. When did it stop working?
>
> [EMAIL PROTECTED]:~/programs/py/mpl/mpl_trunk/lib/matplotlib$
>rgrep SetInitialSize --include '*.py' .
> ./backends/backend_wx.py:
>self.canvas.SetInitialSize(wx.Size(fig.bbox.width,
>fig.bbox.height))
> ./backends/backend_wx.py:
>self.canvas.SetInitialSize(wx.Size(width, height))
>
> I can't find anything in the code that defines
>SetInitialSize.
>
I didn't check the example nlp_3.py (from openopt)
regularly. So I can't tell you when it stopped.
As a workaround I have used another backend in my
matplotlibrc
#### CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo FltkAgg
QtAgg TkAgg
# Agg Cairo GD GDK Paint PS PDF SVG Template
#backend : WXAgg
backend : TkAgg
Cheers,
Nils
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel