Changes between Version 4 and Version 5 of Ticket #11225


Ignore:
Timestamp:
11/03/11 15:52:38 (10 years ago)
Author:
kcrisman
Comment:

Regarding the first item (can't plot two of them), It probably wouldn't even be that hard to fix. The problem is that setup_for_eval_on_grid wants to use fast_float but Piecewise guys don't have that, or more precisely don't have __float__.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11225 – Description

    v4 v5  
    88sage: f = Piecewise([[(0,1),x^3], [(1,2),x^2]], x)
    99sage: plot([f,x^3],(x,0,2))
     10}}}
     11   A very similar example was at [http://ask.sagemath.org/question/868/two-piecewise-defined-functions-in-one-plot this ask.sagemath.org post]:
     12{{{
     13sage: f = Piecewise([[(-2,1),1],[(1,4),x]])
     14sage: g =  Piecewise([[(-2,1),1],[(1,4),2*x]])
     15sage: plot([f,g])
     16AttributeError: PiecewisePolynomial instance has no attribute '__float__'
    1017}}}
    1118 * plotting a product of a piecewise with a symbolic (well, the problem is multiplying the two, but still worth putting here - see [http://groups.google.com/group/sage-support/browse_thread/thread/7357d08529de32dd this sage-support thread])