Ask Your Question
1

Saving 3d image as svg or pdf

asked 4 years ago

alexh gravatar image

The 3-dimensional plots in SageMath are quite good, and easy to use. In particular moving the camera angle interactively in the sage worksheet is very helpful. But I can't figure out how to output the image as .svg or .pdf...

The journal requires .svg or .pdf. I can re-compute all the figures in SageMath, but I can't figure out how to output an .svg or .pdf. Is there a way?

Preview: (hide)

Comments

lb gravatar imagelb ( 4 years ago )

1 Answer

Sort by » oldest newest most voted
3

answered 4 years ago

cav_rt gravatar image

The docstring of the save method says:

Save the graphic in a file.

The file type depends on the file extension you give in the filename. This can be either:

  • an image file (of type: PNG, BMP, GIF, PPM, or TIFF) rendered using Jmol (default) or Tachyon,

  • a Sage object file (of type ".sobj") that you can load back later (a pickle),

  • an HTML file depicting the graphic using the Three.js viewer,

  • a data file (of type: X3D, STL, AMF, PLY) for export and use in other software.

    For data files, the support is only partial. For instance STL and AMF only works for triangulated surfaces. The prefered format is X3D.

A workaround, possible not the best, could be save in one of these formats and convert to the one you want.

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 4 years ago

Seen: 1,546 times

Last updated: Mar 16 '21