I have never been a fan of the "arrow" view of vectors, as (to my mind) it causes a lot of confusion when the students move on to "real" multidimensional linear algebra. What I would expect to see if I asked for a plot of the (real) vector (2,1) would be a big fat dot at the appropriate position in the plane.
Aren't arrow-type vectors another type of object altogether? Since they have a start and an end point, where you are taking the start point to be the origin? Personally I think those should be given another name altogether! John On 20/12/2007, William Stein <[EMAIL PROTECTED]> wrote: > > On Dec 19, 2007 12:24 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > > I'm teaching linear algebra next semester and plan to use Sage. In > > trying the "obvious" way to plot a vector: > > > > sage: v=vector([1,2]) > > sage: v.plot().show() > > > > I get what looks like a step function of the coordinates. > > Yes, that's what it is. This is very useful, e.g., when using > vectors of data, computing Fourier transforms of them, etc. > And it works in arbitrary dimensions. > > > Instead, I > > have to do: > > > > sage: v=vector([1,2]) > > sage: arrow((0,0),v).show() > > > > which doesn't seem quite so natural to an undergraduate linear algebra > > student. First, is there an easier way to plot a vector (yes, I know I > > don't have to define v above and could just give the coordinates to > > arrow, but usually I'll be doing something with v as a vector)? Is it > > reasonable to redefine v.plot() to return the arrow for a vector with 3 > > or fewer dimensions, or is there some bigger reason to have things the > > way they are now? > > I think that would be bad, because it's potentially confusing and > unsystematic. However, the following -- which you will like -- > would be acceptable to me: > > Redefine v.plot() so for dimensions <= 3 it does what you describe above, > i.e., draws an arrow, but for dimensions >= 4 it gives an error message. > Then add an option to plot called "step", which if set to True restores > the current behavior. > > In fact, this was my intention all along, and somehow I screwed up. > The current plot signature for vectors is: > > def plot(self, xmin=0, xmax=1, eps=None, res=None, > connect=True, step=False, **kwds): > > Notice that step=False is already there! > > Anyway, this is now > http://trac.sagemath.org/sage_trac/ticket/1575 > > > -- William > > > > -- John Cremona --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---