William's suggestion worked for me. Now, the other question is - is it possible to turn off default plotting when using savefig('fig1.png')? This will allow me to have just 1 figure shown with <img src="fig1.png">.
thanks! gani -- On Sep 25, 10:21 am, Marshall Hampton <[EMAIL PROTECTED]> wrote: > I was looking at your example and it seems that there is now a bug in > plot - the array of function values is spit out as well as the plot > itself. I took a look but I don't know where the problem is exactly. > > -Marshall > > On Sep 24, 11:22 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > > > On 9/24/07, gani <[EMAIL PROTECTED]> wrote > > > > Is there an easy way to access a figure, say 'sage.png' created as a > > > result of a plot command, in say, cell 7 of a worksheet to be called/ > > > rendered in another cell? A related question is how to render this in > > > html format <img src = "sage.png"> in between cells. > > > If you use a name for the file that is global to the worksheet, then > > it will magically be found. E.g., this worksheet below > > will show a.png in the second cell. > > > {{{id=36| > > plot(sin).save('a.png') > > > }}} > > > {{{id=40| > > print '<html><img src="a.png"></html>' > > /// > > <html><img src="a.png"></html> > > > }}} > > > > thanks, > > > If you put > > > <img src="a.png"> it'll see the image. > > > I.e., the answer to your questions are that the obvious thing that > > you would want to work actually does, so long as the image > > filename is unique. The reason this works is that when the server > > receives a request for an image, e.g., a.png it searches through > > a search path for it, and finds the one that was saved for a given > > cell. > > > -- William --~--~---------~--~----~------------~-------~--~----~ 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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---