Jason, thank you for your quick response. Actually, I can't check for any spkg existence, since there isn't any (still...). What I want, is to plugin another javascript (flot) in my notebook basically, and then make it load from the notebook itself, passing some data (vectors of point, for 2d plotting) without having to use intemediate html() function (I think that would make too much overhead, isn't it?)
Could you please be a little bit more precise to show me where to look at for an example? I would be very grateful for that! Once I get a readable example, I think I could go along by myself. thanks Maurizio On Feb 23, 12:31 pm, Jason Grout <jason-s...@creativetrax.com> wrote: > Maurizio wrote: > > Hi all, > > sorry for kind of flooding this group, but I'm very eager to learn. > > > I'd like to understand how to add another javascript script to the > > notebook. In particular, I'd like to test FLOT for interactive > > plotting. > > > The problem is that I am unable to call another script from the > > notebook, because I cannot find a suitable version of the source to > > work with. > > > My intention is doing something similar to what jsMath (as far as I > > understood the code) does: launch a function which returns even a > > simple text string, that should become the argument of the script > > launcher. > > > I'd like to avoid passing through file saving and html() command (that > > was the first try, but doesn't seem so polite). > > > Is there another way to do it? I mean, a way that could allow us to > > make an spkg at the end, so something that doesn't need to modify the > > notebook code? > > You could do something like the tinymce plugin, or the jsmath_imagefonts > spkg. Basically, test for the existence of the spkg, and then do the > FLOT plotting if the spkg exists. You can see an example in the code > for jsmath_imagefonts, I believe, in the top of notebook.py. > > Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---