Open jasongrout opened 13 years ago
See also this ask.sagemath.org question. It would be nice for someone to implement e.g. axes_arrows=True
or even axes_arrows=[True,False]
for the different directions or something.
See also this ask.sagemath.org question
Here is a feature request from a post to the matplotlib mailing list: http://sourceforge.net/mailarchive/forum.php?thread_name=4D496F84.7070909%40nerim.fr&forum_name=matplotlib-users
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 don't find relevant answers in the archive.
An answer gives some relevant matplotlib code that does this:
Hi Francois,
I'm not sure I understand - but do you want the arrows at the end of the axes spines? I don't think there's a direct way to adjust the spines to become arrows at the moment, but we can remedy that by making annotations in axes coordinates. The important thing to know here is that in axes coordinates, which are always between 0-1, spine endpoints are at these locations: (0,0), (0,1), (1,0), and (1,1). Here's the code, and attached is the resulting image
I'm not familiar with how SAGE exposes matplotlib functionality, though, since the syntax you used differs from how matplotlib is utilized.
best, -- Paul Ivanov
CC: @ppurka
Component: graphics
Issue created by migration from https://trac.sagemath.org/ticket/10740