Ticket #5049 (closed defect: fixed)
show(mathematica('2/3')) doesn't work
| Reported by: | was | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.0.1 |
| Component: | interfaces | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | 5916 | Merged in: | |
| Dependencies: | Stopgaps: |
Description
If you do
show(mathematica('2/3'))
in the notebook, you get no output. Since latex(mathematica(...)) works great, this is stupid.
Change History
Note: See
TracTickets for help on using
tickets.

This is because the show method is written to deal only with images:
def show(self, filename=None, ImageSize=600): """ Show a mathematica plot in the Sage notebook. EXAMPLES: sage: P = mathematica('Plot[Sin[x],{x,-2Pi,4Pi}]') # optional - mathematica sage: show(P) # optional - mathematica sage: P.show(ImageSize=800) # optional - mathematica """ P = self._check_valid() if filename is None: filename = graphics_filename() orig_dir = P.eval('Directory[]').strip() P.chdir(os.path.abspath(".")) s = 'Export["%s", %s, ImageSize->%s]'%(filename, self.name(), ImageSize) P.eval(s) P.chdir(orig_dir)