Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-20 Thread Niranjana K M
@Vincent > I think it is desirable to use the same argument conventions as the > method VectorField.plot(). In particular use `scale` and not `scaled`. > I don't know whether VectorField.plot() supports a default rescaling > as you proposed. > Ok let us change into `scale`. Also I have a new ver

Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-20 Thread Vincent Delecroix
On Mon, 20 Jun 2022 at 18:01, Niranjana K M wrote: > > @Vincent > > On Sun, Jun 19, 2022 at 5:52 PM Vincent Delecroix <20100.delecr...@gmail.com> > wrote: >> >> Nice catch indeed. I am not sure that "scaled=True/False" is the most >> flexible design. You might just want to apply *some* scale, not

Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-20 Thread Niranjana K M
@Vincent On Sun, Jun 19, 2022 at 5:52 PM Vincent Delecroix <20100.delecr...@gmail.com> wrote: > Nice catch indeed. I am not sure that "scaled=True/False" is the most > flexible design. You might just want to apply *some* scale, not > necessarily the one making the max length being one. I imagine

[sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Eric Gourgoulhon
Le dimanche 19 juin 2022 à 19:11:24 UTC+2, niran...@gmail.com a écrit : > > For plot() in sage manifold Reference says: > **extra_options – extra options for the arrow plot, like linestyle, width > or arrowsize (see arrow2d() >

[sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Niranjana K M
@Eric That's very nice. Thanks for pointing towards sage manifold. I am also on 9.6. It seems E.vector_field().plot() method is much slower than plot_vector_field3d(). Check once with time(). Internally plot_vector_field3d() uses a plot() function, may be different from this from sage manif

Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Niranjana K M
@Vincent On Sunday, June 19, 2022 at 5:52:28 PM UTC+5:30 vdelecroix wrote: > Nice catch indeed. I am not sure that "scaled=True/False" is the most > flexible design. You might just want to apply *some* scale, not > necessarily the one making the max length being one. I imagine that it > would

[sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Eric Gourgoulhon
Hi, There is no such length issue if you use vector fields on the Euclidean 3-space, instead of plot_vector_field3d with a tuple of components. For instance: sage: E. = EuclideanSpace() sage: v1 = E.vector_field(1, 0, 0) sage: v2 = E.vector_field(2, 0, 0) sage: v1.plot() sage: v2.plot() yield

Re: [sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Vincent Delecroix
Nice catch indeed. I am not sure that "scaled=True/False" is the most flexible design. You might just want to apply *some* scale, not necessarily the one making the max length being one. I imagine that it would be nice to allow "scaled" to be a positive floating point number. In other words if sca

[sage-devel] Re: Length of vectors in `plot_vector_field3d()`

2022-06-19 Thread Niranjana K M
Dear all, I figured it out. It has to do with scaled_vectors = [v/max_len for v in vectors] line 141 of $SAGE_ROOT/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/plot/plot3d/plot_field3d.py Can we have scaling optional in sage? I just propose it, with a new keyword argum