-
-
Notifications
You must be signed in to change notification settings - Fork 489
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
improve piecewise plotting #11225
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:5
Regarding the first item (can't plot two of them), It probably wouldn't even be that hard to fix. The problem is that |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:7
From DSM on this ask.sagemath.org question:
Nice protopatch, perhaps? |
This comment has been minimized.
This comment has been minimized.
comment:8
I removed the last bullet point and created #12651 where I'll post a patch with dsm's fix. |
Dependencies: #14801 |
This comment has been minimized.
This comment has been minimized.
comment:11
Updated description for new This can probably be closed when the old |
Changed keywords from none to piecewise |
It's not clear whether these things work given that #21618 is quite unresolved, so I recommend keeping it open, but I'll make a cross-link to this. |
Until we actually totally rewrite piecewise functions (done in #14801), we should improve some things.
For concreteness, here is one thing that should work but doesn't. I'm sure there are more - add to this list, and then whatever isn't fixed in this ticket can be moved to another ticket. I just want to make sure they're listed in one place, not ten tickets.
List:
A very similar example was at this ask.sagemath.org post:
Both examples work in the new
piecewise
(#14801):plotting a product of a piecewise with a symbolic (well, the problem is multiplying the two, but still worth putting here - see this sage-support thread)
fixed in new
piecewise
Maybe unify with
plot_step_function
, which currently is sort of its own thing?In this example:
You can use oo (infinity) for endpoints, but then the plot code for Piecewise gets screwed up.
You can try putting in zero instead of defining this new zero function, but then g(1) and g(-1) etc. won't work.
You can try using extend_by_zero to make the zero part, but it gives the same problem.
You can plot without xmin and xmax, but that gives the whole function.
You can plot without ymax, but that gives the range further out than you want.
You can try plot(g), but that turns out to uncover a very strange error that may or may not be a bug.
In new
piecewise
(Piecewise functions done right #14801) 0 is no longer in the domain (open intervals?); and there is now support for unbounded intervals.See also #1773.
Depends on #14801
CC: @wdjoyner @jasongrout @jondo @kcrisman @vbraun @slel @mkoeppe @eviatarbach @rwst
Component: graphics
Keywords: piecewise
Issue created by migration from https://trac.sagemath.org/ticket/11225
The text was updated successfully, but these errors were encountered: