- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 684
Closed
Milestone
Description
As reported on this ask question, the following does not work:
sage: f1(a, b) = 1 - b / a
sage: f2(a, b) = 1 - a / b
sage: def f12(a, b):
....:         if a - b < 0:
....:                 return f1(a, b)
....:         else:
....:                 return f2(a, b)
sage: density_plot(f,(1,2),(1,2))
KeyError: 'text/plain'
While the following works:
sage: f1(a, b) = 1 - b / a
sage: f2(a, b) = 1 - a / b
sage: def f12(a, b):
....:     if a - b < 0:
....:         return RDF(f1(a, b))
....:     else:
....:         return RDF(f2(a, b))
sage: density_plot(f12,(1,2),(1,2))
CC: @kcrisman
Component: graphics
Author: Dave Morris
Branch: bb5a812
Reviewer: Karl-Dieter Crisman
Issue created by migration from https://trac.sagemath.org/ticket/17684