On Sun, May 18, 2008 at 4:05 AM, Adam Webb <[EMAIL PROTECTED]> wrote:
>
> I have recently had a problem plotting with matplotlib in sage 3.0 and
> now also in sage 3.0.1.
> Even if I try the simplest plot from the matplotlib tutorial, I don't
> get a plot.
>
> sage: from pylab import *
> sage: plot([1,2,3,4])
> [<matplotlib.lines.Line2D instance at 0xc12176c>]
> sage: show()
> sage:
>
> I have tried this in both the notebook and from the command line. I
> have also tried using sage -python and ipython. In all cases no plot
> appears. In fact nothing seems to happen. There is no window or plot
> and unfortunately, no error message.
>
> I have installed sage 3.0.1 from source on two machines. One is
> running Ubuntu 8.10 on AMD 64 and the other is a 32 bit machine
> running Scientific Linux 5.0. I also tried the binary: sage-3.0.1-
> rhel32bit-intel-sse2-i686-Linux.tar.gz.
>
> I have tried removing .matplotlib and .ipython from my home directory
> but this had no effect.
>

Here is how to use matplotlib in the notebook (from the Sage reference manual),
The main point is that to make the plot appear in the notebook you just save
it to a file.

NUMERICAL PLOTTING:

Sage also provides 2D plotting with an interface that is a likely very
familiar to people doing numerical computation.  For example,

    sage: from pylab import *
    sage: t = arange(0.0, 2.0, 0.01)
    sage: s = sin(2*pi*t)
    sage: P = plot(t, s, linewidth=1.0)
    sage: xl = xlabel('time (s)')
    sage: yl = ylabel('voltage (mV)')
    sage: t = title('About as simple as it gets, folks')
    sage: grid(True)
    sage: savefig('sage.png')

Since the above overwrites many Sage plotting functions, we
reset the state of Sage, so that the examples below work!
    sage: reset()

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

Reply via email to