Opened 13 years ago

Closed 12 years ago

Last modified 5 years ago

#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: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

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

comment:1 Changed 13 years ago by mhansen

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)

comment:2 Changed 12 years ago by mhansen

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed by #5916.

comment:3 Changed 12 years ago by mhansen

  • Authors set to 5916

comment:4 Changed 5 years ago by chapoton

  • Authors 5916 deleted
  • Report Upstream set to N/A
Note: See TracTickets for help on using tickets.