Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow vertical slopes in slope field plots #5553

Open
kcrisman opened this issue Mar 17, 2009 · 4 comments
Open

allow vertical slopes in slope field plots #5553

kcrisman opened this issue Mar 17, 2009 · 4 comments

Comments

@kcrisman
Copy link
Member

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.

Component: graphics

Issue created by migration from https://trac.sagemath.org/ticket/5553

@jasongrout
Copy link
Member

comment:1

plot_vector_field is already fixed. See #5259.

@jasongrout
Copy link
Member

comment:2

That said, it'd be great to fix plot_slope_field to detect when you have a vertical slope and have it change things accordingly. I think this should be easy: just see what vectors have finite X, infinite Y, and set them to be zero X, one Y.

@kcrisman

This comment has been minimized.

@kcrisman
Copy link
Member Author

comment:3

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.

@kcrisman kcrisman changed the title allow vertical vectors in vector field plots allow vertical slopes in field plots Mar 18, 2009
@kcrisman kcrisman changed the title allow vertical slopes in field plots allow vertical slopes in slope field plots Mar 18, 2009
@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe mkoeppe removed this from the sage-6.4 milestone Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants