Opened 6 years ago

#17684 new defect

density_plot() is broken with functions involving symbolic expressions

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-6.5
Component: graphics Keywords:
Cc: kcrisman Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

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))

Change History (0)

Note: See TracTickets for help on using tickets.