***Introduction***: > introduction -- who are you, your involvement in SAGE [maybe quick description of experience and how you involved with SAGE.] > motivation -- Q: why write own code when matplotlib already has a good user interface. A: matplotlib is data oriented, [give example like plotting sin curve] where as mathematica is more [function / functionally / mathematical] [deals with expressions as opposed to data] ***Overall purpose*** ... what functionality does it provide? > similarities to Mathematica [give examples] > differences with Mathematica [pythonic ... give examples] > I want to reproduce the intuitive visualizing of mathematical objects that Mathematica provides and the same time do it in a Pythonic way that is general/easy to extend. ***No GUI*** --- instead when have the browser interface which in many ways is like a mathematica notebook. > Mention that when you use "show" the image is rendered into a png by default ***Comparison*** > you could show the difference of SAGE plotting code compared to Mathematica code for the same expressions ***Classes - What - Where - How*** > class Graphics(SageObject) 1) all plots are of type Graphics > p = plot(sin,-2,2) > p sage: p Graphics object consisting of 1 graphics primitive sage: pp = p[0] sage: pp Line defined by 201 points 2) this class has (hidden methods ? ) that use use the functions of other Primitive classes *give one example of this* > 3) this class has also the *show* and *save* methods that deal with the actually generation of the images *when one of these methods is called, only then is most of the /grunt/ work done ... i.e. compute axis and actually write the image file (eps, png, ...) this process takes almost all the time involved > class GraphicsPrimitive(SageObject) 1) this class is inherited by all the specific primitive objects (e.g. GraphicsPrimitive_Line(GraphicsPrimitive) ) 2) the methods, that are useful for any GraphicsPrimitive_* type, are dealing with the /options/ > class GraphicsPrimitive_*(GraphicsPrimitive) 1) these all have an __init__ method that inherit from GraphicsPrimitive.__init__(self, options) **explain** 2) these all use builtin constructors (is this right name ???) to do things like len, getitem, setitem, etc. 3) *Important* these all have a _render_on_subplot(self, subplot) method that takes as input the current *matplotlib* subplot instance and adds the corresponding graphics primitive to the current subplot *important* -> options that pertain to the current primitive are also set with this method -------------------------------------------------------------------- What is Mathematica-like and what is Pythonic? Pythonic: > all names of functions adhere to lower-case name with underscrores seperating different words > make a table giving actual comparisons > arithemtic of Graphics types (addition of plots, etc) > describe builtin methods, give examples of usage ------------------------------------------------------------ TODO: > Add "density_plot" and "contour_plot" > make graphics_array scale correctly when there is only one row of graphics, etc. > Add option to plot to add a frame (without normal axis and tick marks on frame) *Show this give an error?: show(plot(lambda x: sin(x),-30,-100,rgbcolor=hue(0.5)),axes_label=["AX","BY"]) > remove uneccesary functions in plotting documentation (e.g. sin, cos, modf) > are the "Factory" functions public or private ... should they be hidden in the documentation ?? > change disk range from *degrees* to *radians*