On Wed, 03 Mar 2010 at 08:21PM -0600, Jason Grout wrote:
> On 03/03/2010 08:14 PM, Dan Drake wrote:
> >On Wed, 03 Mar 2010 at 01:34PM +0000, Colombel Bruno wrote:
> >>I'm trying to use sagetex to put 3d-surfaces in latex document :
> >>
> >>\begin{sageblock}
> >>    var('u,v')
> >>    h= lambda u,v: u^2 + 2*v^2
> >>    f=plot3d(h, (u,-1,1), (v,-1,1))
> >>    f.show()
> >>\end{sageblock}
> >>
> >>\sageplot[][png]{f}
> >>The \sageplot function doesn't work here ...
> >>The file plot-0.png and plot-0.eps are not created ...
> >
> >This also works for me with Sage 4.3.3. Actually, I'm a bit surprised
> >that this works, since before the 3d plotting stuff did not cooperate
> >well with saving as png files and so on.
> >
> 
> Bill Cauchois fixed a bug in saving 3d graphics which was merged
> into 4.3.3:  http://trac.sagemath.org/sage_trac/ticket/2872

Wow, that's great. Thanks Bill! That makes SageTeX stuff so much easier.

> I actually thought this patch would make it possible to not have to
> put the [png], but I still have to put the [png] part in my test
> file.

The [png] is because of the way SageTeX works; it defaults to saving to
eps and pdf formats. Maybe I should do things in a try/except; something
like

    try:
        foo.save('filename.eps')
        foo.save('filename.pdf')
    except ValueError:
        foo.save('filename.png')

So it looks like the OP should try an upgrade to Sage 4.3.3.

Dan

-- 
---  Dan Drake
-----  http://mathsci.kaist.ac.kr/~drake
-------

Attachment: signature.asc
Description: Digital signature

Reply via email to