-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
plot in piecewise regression #21618
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
The old |
comment:3
Correct. So it would be nice to emulate that so everyone's code doesn't break - I had a not-so-nice time drawing graphs on the fly in class today because of this. It seems reasonable, since piecewise is an unusual situation. |
comment:5
Oops I just saw the second complaint. This will not be as easy. New commits:
|
Commit: |
comment:7
Note that your command |
Changed branch from u/rws/plot_in_piecewise_regression to u/rws/21618-1 |
New commits:
|
comment:10
I'll see if I can resolve all this in the next hour or so. |
comment:11
Address 1&2 and simplify a bit to get def plot(cls, self, parameters, variable, *args, **kwds):
from sage.plot.all import plot, Graphics
g = Graphics()
for (dom, fun) in self.items():
g += plot(fun, (variable, dom.inf(), dom.sup()), *args, **kwds)
# If it's the first piece, pass all arguments. Otherwise,
# filter out 'legend_label' so that we don't add each
# piece to the legend separately (trac #12651).
kwds.pop('legend_label', None)
return g 3 is tricky, however, because of a variety of ways to pass left and right bounds. I think we should factor out the logic of getting these bounds into a separate function which will say always set There is also |
comment:12
Andrey, please go ahead with your own branch, the plotting code is quite opaque and uninteresting to me, and I'm into other projects right now. |
When fixing this (if ever), we should check whether #11225 is also resolved at the same time (which is likely). |
Before this would have plotted the whole thing, now it defaults to the usual plotting only from -1 to 1 (which of course gives an error).
Moreover pieces are joined and
detect_poles=True
option skips the origin for no good reason:CC: @paulmasson
Component: symbolics
Branch/Commit: u/rws/21618-1 @
c008c29
Issue created by migration from https://trac.sagemath.org/ticket/21618
The text was updated successfully, but these errors were encountered: