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.Tue, 16 Mar 2021 22:45:15 +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?alexhTue, 16 Mar 2021 22:45:15 +0100https://ask.sagemath.org/question/56193/Save 3d plot as vector formathttps://ask.sagemath.org/question/9057/save-3d-plot-as-vector-format/Is there a way to export a 3d plot as a pdf file?
I know you can't do `p.save('filename.extension')` because 3dplot doesn't create a graphics item. But is there a way to do this?daniel.e2718Sun, 10 Jun 2012 15:19:24 +0200https://ask.sagemath.org/question/9057/What is the difference between .sage and .sagesw?https://ask.sagemath.org/question/38574/what-is-the-difference-between-sage-and-sagesw/What is the difference between .sage and .sagesw?
I've found that load does not work well with .sagesw why is that?standardtrickynessSat, 19 Aug 2017 01:01:05 +0200https://ask.sagemath.org/question/38574/3d plot in vector format: still using matplotlib?https://ask.sagemath.org/question/38350/3d-plot-in-vector-format-still-using-matplotlib/In 2012, the best way to create a vector image in Sage from a three-dimensional plot was to call matplotlib, as the [answers to Question 9057 show](https://ask.sagemath.org/question/9057/save-3d-plot-as-vector-format/)
Is this still the case? Or are there other work-arounds now?UrsulaFri, 21 Jul 2017 22:34:13 +0200https://ask.sagemath.org/question/38350/load a graph from a dot filehttps://ask.sagemath.org/question/29477/load-a-graph-from-a-dot-file/ Sage allows me to get the representation of a Graph, G, in the [dot language](https://en.wikipedia.org/wiki/DOT_(graph_description_language)) by using the method
> [G.graphviz_string()](http://doc.sagemath.org/html/en/reference/graphs/sage/graphs/generic_graph.html#sage.graphs.generic_graph.GenericGraph.graphviz_string)
I can even have this string written directly to a file by using:
> [G.graphviz_to_file_named('my_graph_file.dot')](http://doc.sagemath.org/html/en/reference/graphs/sage/graphs/generic_graph.html#sage.graphs.generic_graph.GenericGraph.graphviz_to_file_named)
Is there a way of reloading G from such a file? I tried doing
> G = Graph('my_graph_file.dot')
> G = Graph(open('my_graph_file.dot'))
> G = Graph(open('my_graph_file.dot').read())
Where the contents of 'my_graph_file.dot' are:
> graph MyGraph{
> foo -- {bar}
> bar -- {foo; bas}
> bas -- {bar}
> }
But none of these worked.
Mark BellWed, 16 Sep 2015 21:47:01 +0200https://ask.sagemath.org/question/29477/How good is Sage for videos?https://ask.sagemath.org/question/10670/how-good-is-sage-for-videos/Hi all,
I'm pretty new to the Sage world and was thinking about using it for one of my university projects. The problem is that for that I would have to be able to read videos, analyze pixels in frames, etc.
So my question is: can Sage be used in such a way?
If a certain format or codec or whatever is necessary, that could be arranged, but I would like to know if it is at all possible before deciding whether or not to use Sage for this specific project. I have searched google, the Sage documentation and this forum, but found nothing even close to what I need :(
Any help is appreciated, thanks in advance.vinivendraThu, 31 Oct 2013 12:04:23 +0100https://ask.sagemath.org/question/10670/Compatible data file formatshttps://ask.sagemath.org/question/10300/compatible-data-file-formats/What are the compatible file formats if I want to load a data set into Sage? I know that I can load .*csv* files using Python's csv module or *open()* method.
Is there any **other file format** that I can use in Sage?
ThanksTharindu RusiraSun, 30 Jun 2013 16:20:45 +0200https://ask.sagemath.org/question/10300/Read sparse matrix in Harwell-Boeing Exchange Formathttps://ask.sagemath.org/question/9879/read-sparse-matrix-in-harwell-boeing-exchange-format/I'm currently creating some really large matrices, and hope they will end up reasonably sparse. I would like to toy with them in sage some day. Looking for a suitable standardized storage format, I just learned about the [Harwell-Boeing Exchange Format](http://math.nist.gov/MatrixMarket/formats.html#hb). **Is there some functionality provided by sage to read such files?**
If not, should I rather read the file and construct a matrix from it using a standard matrix constructor, or should I create my own matrix subclass whith an internal format that closely resembles the file format?MvGWed, 06 Mar 2013 17:06:33 +0100https://ask.sagemath.org/question/9879/