ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 22 Mar 2021 22:38:40 +0100Saving 3d image as svg or pdfhttps://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/ 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?Tue, 16 Mar 2021 22:45:15 +0100https://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/Comment by slelievre for <p>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...</p>
<p>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?</p>
https://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/?comment=56320#post-id-56320Related (including present question):
- [Ask Sage question 56193: Saving 3d image as svg or pdf](https://ask.sagemath.org/question/56193)
- [Ask Sage question 9057: Save 3d plot as vector format](https://ask.sagemath.org/question/9057)
- [Sage Trac ticket 31149: Camera position in 3d graphics](https://trac.sagemath.org/ticket/31149)
- [Sage Trac ticket 28672: Three.js: Camera viewpoint for scene](https://trac.sagemath.org/ticket/28672)
- [Sage Trac ticket 13111: variable camera position, light, etc. for tachyon ray tracer](https://trac.sagemath.org/ticket/13111)Mon, 22 Mar 2021 22:38:40 +0100https://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/?comment=56320#post-id-56320Comment by lb for <p>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...</p>
<p>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?</p>
https://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/?comment=56292#post-id-56292Have you seen this related question and answer?
[https://ask.sagemath.org/question/9057/save-3d-plot-as-vector-format/#13689](https://ask.sagemath.org/question/9057/save-3d-plot-as-vector-format/#13689)Sun, 21 Mar 2021 00:39:17 +0100https://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/?comment=56292#post-id-56292Answer by cav_rt for <p>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...</p>
<p>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?</p>
https://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/?answer=56196#post-id-56196The 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.Tue, 16 Mar 2021 23:52:04 +0100https://ask.sagemath.org/question/56193/saving-3d-image-as-svg-or-pdf/?answer=56196#post-id-56196