Hi, > > Along similar lines is something I've been thinking about, which is > > support for producing TikZ code from Sage objects so that we can easily > > produce lovely TeX graphics. TikZ is a bit like PSTricks, but with > > much wider support and better syntax; see [1] and [2] for examples of > > what TikZ can do. > > > I've been wanting this for a long time too. Also, it would be great if > matplotlib had a pgf/tikz backend, for example. I did some playing > around with writing one based on the ps backend, but only got a little > ways along. There have been posts on the matplotlib mailing list about > this too.
Right now to be sure to rely on less feature in my experiment on trees, I used plain tex picture... Clearly this is not an acceptable backend. pgf/tikz seems to be much better. I should have switched to it long ago but I still use xy whose syntax is worse that any machine language. > For the notebook, it would be nice to output some sort of html5/canvas > code or some svg code inside of a div. I think that might be enough to > have nice graphics in output in the notebook. I'm sorry but I don't know anything about the internal of the notebook. What is a "div" ? Are you telling that for the notebook, we should use a completely different way to print-out things ? Or can tikz output svg graphics ? > > It would be nice to be able to output combinatorial objects as in > > Florent's message above, and also plots and other graphical objects. > > I've had these ideas for a while, but have never really done anything > > with them, and they seem to be related to implementing ASCII graphics > > for the command line. I'd like to emphasize on the fact that the main difficulty here is not to print out ascii graphic but to include them properly inside printed out formulas. I don't thing sage has any support for that. What was very nice in MuPAD is that for the following picture: >> 3*x^tableaux([[3],[1,2]])+2*y(trees([a, [b], [b, [2*x]]])) +---+ | 3 | +---+---+ | 1 | 2 | +---+---+ 2 y/ a \ + 3 x | / \ | | b b | | | | \ 2*x / we only had to say that the print of tableaux([[3],[1,2]]) or trees([a, [b], [b, [2*x]]]) returns a particular string with newline in it. The remaining of the typesetting (exponent, surrounding parentheses) was taken care of automatically by the pretty printer: >> t a / \ b b | 2*x >> (t::print())::print() " a \b/ \\ \nb b \n | \n 2*x\n" Correct me if I'm wrong but I don't think it can be easily done in sage. Cheers, Florent --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---