Update:

Uh, so I just did

rm -rf ~/.matplotlib

and then restarted Sage and now the plotting is working.

So I don't know what to say about that except ahhhhh
... but I guess all is well now?

There still exists the hard-coding of "/Users/was" in the Mac OSX 10.5
binary, but I'm now wondering if that just popped-up because matplotlib
was searching for its ".matplotlib" directory.

Thanks,
Alex

On Jan 29, 2008 3:15 PM, Jason Grout <[EMAIL PROTECTED]> wrote:

>
> alex clemesha wrote:
> > Hi,
> > Update on my last post ...
> > I just finished compiling sage from source (on the same machine)
> > which completely succeeded and overall seems to be working fine but
> > it looks like there are still plotting errors.
> >
> > (The final error is almost identical to the one I got when I
> > tried to install stand-alone matplotlib, so it's looking like
> > the problem is coming from that side)
> >
> > Any thoughts on this one?
> > I've already began looking into this problem,
> > but I have no good leads yet.
> >
> > Thanks,
> > -Alex
> >
> >
> > Here is the full traceback:
> >
> >
> > sage: plot(sin(1/x), (-1, 1), plot_points=1000)
> >
> ---------------------------------------------------------------------------
> > <type 'exceptions.TypeError'>             Traceback (most recent call
> last)
> >
> > /Users/agc/sage-2.10/<ipython console> in <module>()
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/IPython/Prompts.py
> > in __call__(self, arg)
> >     521
> >     522             # and now call a possibly user-defined print
> mechanism
> > --> 523             manipulated_val = self.display(arg)
> >     524
> >     525             # user display hooks can change the variable to be
> > stored in
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/IPython/Prompts.py
> > in _display(self, arg)
> >     545         """
> >     546
> > --> 547         return self.shell.hooks.result_display(arg)
> >     548
> >     549     # Assign the default display method:
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/site-packages/IPython/hooks.py
> > in __call__(self, *args, **kw)
> >     132             #print "prio",prio,"cmd",cmd #dbg
> >     133             try:
> > --> 134                 ret = cmd(*args, **kw)
> >     135                 return ret
> >     136             except ipapi.TryNext, exc:
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/site-packages/IPython/hooks.py
> > in result_display(self, arg)
> >     160
> >     161     if self.rc.pprint:
> > --> 162         out = pformat(arg)
> >     163         if '\n' in out:
> >     164             # So that multi-line strings line up with the left
> > column of
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/pprint.py in pformat(self,
> object)
> >     109     def pformat(self, object):
> >     110         sio = _StringIO()
> > --> 111         self._format(object, sio, 0, 0, {}, 0)
> >     112         return sio.getvalue()
> >     113
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/pprint.py in _format(self,
> > object, stream, indent, allowance, context, level)
> >     127             self._readable = False
> >     128             return
> > --> 129         rep = self._repr(object, context, level - 1)
> >     130         typ = _type(object)
> >     131         sepLines = _len(rep) > (self._width - 1 - indent -
> > allowance)
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/pprint.py in _repr(self,
> > object, context, level)
> >     193     def _repr(self, object, context, level):
> >     194         repr, readable, recursive = self.format(object,
> > context.copy(),
> > --> 195                                                 self._depth,
> level)
> >     196         if not readable:
> >     197             self._readable = False
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/pprint.py in format(self,
> > object, context, maxlevels, level)
> >     205         and whether the object represents a recursive construct.
> >     206         """
> > --> 207         return _safe_repr(object, context, maxlevels, level)
> >     208
> >     209
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/pprint.py in _safe_repr(object,
> > context, maxlevels, level)
> >     290         return format % _commajoin(components), readable,
> recursive
> >     291
> > --> 292     rep = repr(object)
> >     293     return rep, (rep and not rep.startswith('<')), False
> >     294
> >
> > /Users/agc/sage-2.10/sage_object.pyx in
> > sage.structure.sage_object.SageObject.__repr__()
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/site-packages/sage/plot/plot.py
> > in _repr_(self)
> >     474     def _repr_(self):
> >     475         if SHOW_DEFAULT:
> > --> 476             self.show()
> >     477             return ''
> >     478         else:
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/site-packages/sage/plot/plot.py
> > in show(self, xmin, xmax, ymin, ymax, figsize, filename, dpi, axes,
> > axes_label, frame, fontsize, **args)
> >     723         if filename is None:
> >     724             filename = sage.misc.misc.tmp_filename() + '.png'
> > --> 725         self.save(filename, xmin, xmax, ymin, ymax, figsize,
> > dpi=dpi, axes=axes,frame=frame, fontsize=fontsize)
> >     726         os.system('%s %s 2>/dev/null 1>/dev/null
> > &'%(sage.misc.viewer.browser(), filename))
> >     727
> >
> > /Users/agc/sage-2.10/local/lib/python2.5/site-packages/sage/plot/plot.py
> > in save(self, filename, xmin, xmax, ymin, ymax, figsize, figure, sub,
> > savenow, dpi, axes, axes_label, fontsize, frame, verify)
> >     790             axes = self.__show_axes
> >     791
> > --> 792         from matplotlib.figure import Figure
> >     793         if filename is None:
> >     794             filename = sage.misc.misc.graphics_filename()
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/matplotlib/figure.py
> > in <module>()
> >       8 import artist
> >       9 from artist import Artist
> > ---> 10 from axes import Axes, Subplot, PolarSubplot, PolarAxes
> >      11 from cbook import flatten, allequal, Stack, iterable, dedent
> >      12 import _image
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/matplotlib/axes.py
> > in <module>()
> >      11 from matplotlib import artist as martist
> >      12 from matplotlib import agg
> > ---> 13 from matplotlib import axis as maxis
> >      14 from matplotlib import cbook
> >      15 from matplotlib import collections as mcoll
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/matplotlib/axis.py
> > in <module>()
> >      18 from transforms import Value, blend_xy_sep_transform,\
> >      19      translation_transform, bbox_all, identity_transform
> > ---> 20 from font_manager import FontProperties
> >      21 from text import Text, TextWithDash, _process_text_args
> >      22 from patches import bbox_artist
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/matplotlib/font_manager.py
> > in <module>()
> >    1112
> >    1113 else:
> > -> 1114     _fmcache = os.path.join(get_configdir(), 'fontManager.cache
> ')
> >    1115
> >    1116     fontManager = None
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/matplotlib/__init__.py
> > in wrapper(*args, **kwargs)
> >     205         assert(callable, func)
> >     206         def wrapper(*args, **kwargs):
> > --> 207             ret = func(*args, **kwargs)
> >     208
> >     209             if (always or not wrapper._spoke):
> >
> > /Users/agc/sage-2.10
> /local/lib/python2.5/site-packages/matplotlib/__init__.py
> > in _get_configdir()
> >     398     if os.path.exists(p):
> >     399         if not _is_writable_dir(p):
> > --> 400             raise RuntimeError("'%s' is not a writable dir; you
> > must set %s/.matplotlib to be a writable dir.  You can also set
> > environment variable MPLCONFIGDIR to any writable directory where you
> > want matplotlib data stored "%h)
> >     401     else:
> >     402         if not _is_writable_dir(h):
> >
> > <type 'exceptions.TypeError'>: not enough arguments for format string
>
> This might be a too-obvious suggestion that you've already looked at,
> but that last "RuntimeError" string has two %s substition place-holders,
> but only one %h argument.  Did the
> /sage-2.10/local/lib/python2.5/site-packages/matplotlib/__init__.py file
> get modified?
>
>
> Jason
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to