On 2/2/11 8:51 AM, Francois Maltey wrote: > Hello, > > I use matplolib by the mathematical system Sage in order to plot a function. > The Sage code calls matplotlib and uses its options : The Sage command is > > plot (sin, x, -5, 5) > > I add labels par axes_labels or remove axes by : > > plot (sin(x), x, -5, 5, axes_label = ['x', 'y']) > plot (sin(x), x, -5, 5, axes=false) > > French users (and maybe others) uses arrows and not lines for axes. > I'm looking for a plot (sin(x), x, -5, 5, axes="arrows") > Is there a pretty way to get these arrows. The result of this code isn't > so fine. > length, width and color don't match. > > plot (sin(x), x, -5, 5, axes=false) + arrow ((-5,0),(5,0)) + arrow > ((0,-1),(0,1)) > > What options do you propose ?
I've made a Sage ticket for this: http://trac.sagemath.org/sage_trac/ticket/10740 As a clumsy workaround, you could use the .matplotlib() method for Sage graphics objects to get the matplotlib figure object for the graphics object. Then you could: 1. figure out which spine was being used as the drawn axes 2. use that spine's transform to place an arrow at the end of the spine (using the example code that was just posted in another message to draw the arrow). 3. Draw the figure Thanks, Jason ------------------------------------------------------------------------------ The modern datacenter depends on network connectivity to access resources and provide services. The best practices for maximizing a physical server's connectivity to a physical network are well understood - see how these rules translate into the virtual world? http://p.sf.net/sfu/oracle-sfdevnlfb _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users