#5553: allow vertical slopes in field plots
----------------------+-----------------------------------------------------
Reporter: kcrisman | Owner: was
Type: defect | Status: new
Priority: minor | Milestone: sage-3.4.2
Component: graphics | Keywords:
----------------------+-----------------------------------------------------
Old description:
> This is a followup to #4104, where the following discussion occurs about
> slope/vector field plots:
>
> joyner: A question for possibly a future patch: it will not plot
> {{{
> plot_slope_field(x/y, (x,-3,3), (y,-3,3)).show(aspect_ratio=1)
> }}}
> because of the problem at y=0. However, should it? A slope of plus or
> minus infinity has a well-defined meaning. Should one try to trap
> singularities like that and just plot them as vertical direction fields
> in the future?
>
> jason: I'm aware of the problem, but decided to post the patch anyway
> when I saw that plot_vector_field had the same problem: the plot is blank
> when an evaluation is undefined. I thought about trapping these things
> and plotting them as vertical lines, but really we ought to do something
> in plot_vector_field to take care of things when a vector has an infinite
> or NaN coordinate. I ran out of time to fix plot_vector_field.
New description:
{{{
plot_slope_field(x/y, (x,-2,2), (y,-2,2)).show(aspect_ratio=1)
}}}
currently won't show the vertical slopes at y=0, x nonzero, but there is
no mathematical reason it shouldn't, so this should be fixed.
--
Comment(by kcrisman):
I see, I thought that there was also a question of allowing infinite
vectors, which I thought was weird. I didn't realize it didn't return a
plot at ''all'' before!
Yes, so I will change the summary and description of this to fixing
plot_slope_field. The problem is that it will be a sort of messy hack,
unless it's dealt with in the plot_vector_field code using a keyword (I
attempted to start this), but then you are trying to catch something that
looks like (1/inf,inf/inf=NaN), which is a little tricky. But doing it in
plot_slope_field means you might as well just do all the stuff in
plot_vector_field there, since you'll have to catch individual vectors
anyway - which is annoying, since it seems redundant.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5553#comment:3>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---