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.Fri, 05 Feb 2021 22:27:03 +0100Export a Plot as Tikz to Latexhttps://ask.sagemath.org/question/55592/export-a-plot-as-tikz-to-latex/Hello,
a couple of days ago I drew a Polyhedra in sage cell Server and exported it as a Tikz file.
like this:
P1 = Polyhedron(vertices = [[0,0,0], [1,2,1], [-4,-3,-2],[3,3,-2],[1,-4,3],[-2,2,1]])
P1.tikz([-0.0946,-0.4796,-0.8724],160.47, axis=true, opacity=0.25)
Now I got an Arrangement of Hyperplanes like:
H3.<x,y,z> = HyperplaneArrangements(QQ)
A = H3([(1,2,1), 0], [(-4,-3,-2), 0],[(3,3,-2), 0], [(1,-4,3), 0],[(-2,2,1), 0])
that I want to export as a Tikz file but it seems that this is not possible. Or am I just doesnt find it?
Anyone there that can maybe help me?
Best regards
Lars KrollLarsFri, 05 Feb 2021 22:27:03 +0100https://ask.sagemath.org/question/55592/Saving notebooks with 3dplotshttps://ask.sagemath.org/question/48061/saving-notebooks-with-3dplots/ Hi I tried both html and .pdf, but the 3dplots seem to have disappeared. Is there a trick to get a copy of your session,
includimg the 3dplots?florinWed, 25 Sep 2019 19:28:27 +0200https://ask.sagemath.org/question/48061/Import error with pydotplushttps://ask.sagemath.org/question/41078/import-error-with-pydotplus/ Hello,
I am running Sagemath 7.3 on Linux. I would like to export a graph using the export function of the graph, but I get the error
`
ImportError: No module named pydotplus`
The python module pydotplus was already installed with `pip install pydotplus`
I cannot find any help regarding this issue. Any suggestion?
Thank you in advance for your helpluno_TMon, 12 Feb 2018 14:55:11 +0100https://ask.sagemath.org/question/41078/ParametrizedSurface3D to epshttps://ask.sagemath.org/question/40420/parametrizedsurface3d-to-eps/Can I convert a ParametrizedSurface3D plot to an eps file? I understand it's not a Graphics object, does this mean there's no hope?jdtj2Mon, 01 Jan 2018 15:55:35 +0100https://ask.sagemath.org/question/40420/How to save table output in an exportable mannerhttps://ask.sagemath.org/question/38252/how-to-save-table-output-in-an-exportable-manner/Hello! I am a sage novice trying to export a table output to some image format (so that it might be shared). I tried using the .save() function as so:
my_table1 = table(my inputs)
result = my_table1.transpose()
result.save('here')
My table outputs properly after I run the program (not featured), but for some reason I receive the following error when I try and save the table:
"Error! /home/sage/Documents/here.sobj is not UTF-8 encoded
Saving disabled.
See Console for more details."
Any help in exporting this table is greatly appreciated. Additionally, if you require any more information please do not hesitate to ask!
EDIT: I am working in Jupyter for Sage on a browser via localhost/8000; not sure if that matters.ethanzellFri, 14 Jul 2017 06:53:29 +0200https://ask.sagemath.org/question/38252/how to (automatically) convert many .sws to .ipynb?https://ask.sagemath.org/question/35873/how-to-automatically-convert-many-sws-to-ipynb/Thanks to Volker Braun, there is a great tool to convert sagenb work sheets to jupyter ones, e.g.:
sage --notebook=export --ipynb=newname.ipynb admin:383
However, I got a folder full of exported worksheets as .sws files that are not in my .sagenb folder. Do I have to import them one by one, then find out their numbers and export using a command equivalent to the above? Surely there must be a way to automate this from the command line or convert directly. Or is there a way to pass an .sws-file to sage --notebook=export? https://github.com/vbraun/ExportSageNB does not mention such a possibility. Thanks already for your help!stanFri, 02 Dec 2016 16:38:24 +0100https://ask.sagemath.org/question/35873/Sagemath in virtual box and latexhttps://ask.sagemath.org/question/38056/sagemath-in-virtual-box-and-latex/When running sagemath 2.7 in virtual box and export a notebook (using jupyter) to pdf I get an error message that pdflatex could not be found. By installing texlive, pdflatex was found but not all the latex packages.
How can I use the latex install on my window machine when export the notebook (in jupyter) to pdf?JohanThu, 22 Jun 2017 15:57:07 +0200https://ask.sagemath.org/question/38056/Export to C codehttps://ask.sagemath.org/question/7922/export-to-c-code/Is it possible to export the result of a calculation to C source code? To be more specific, I have a very long equation emerging from a Sage calculation which I need to feed into a C simulation program, but C doesn't understand the x^2, x^3, ... syntax. I ended up using the re module to manually replace the terms with the proper pow function calls, but I thought maybe there is a more elegant solution to this.
hennesMon, 07 Feb 2011 08:26:21 +0100https://ask.sagemath.org/question/7922/Make ipython notebook world-viewable?https://ask.sagemath.org/question/24995/make-ipython-notebook-world-viewable/ Is there a way to make a cloud.sagemath.org iPython notebook viewable (read-only) by anyone who has a link to it? I'd like an easy way to share notebook contents with people who have not yet signed up for SageMath Cloud accounts. Clearly I can download as HTML and put a static copy on my own web server, but perhaps there is a more direct way?
ashmanskasTue, 25 Nov 2014 16:07:06 +0100https://ask.sagemath.org/question/24995/How to export a 3D plot to a jpg/png file (OSX)https://ask.sagemath.org/question/34559/how-to-export-a-3d-plot-to-a-jpgpng-file-osx/ Hi everybody, I've got some problems with saving/exporting images. This is my code:
var ('x y z')
#Define a 3d curve as the intersection of 2 surfaces
#(but not explicit in z so we must use implicit plots)
# Let's plot
xmin=-3; xmax=3; ymin=-1; ymax=5; zmin=-3; zmax=3;
# Axes
Ax=line3d(([xmin,0,0],[xmax,0,0]), thickness=2, color='red')
Ay=line3d(([0,ymin,0],[0,ymax,0]), thickness=2, color='blue')
Az=line3d(([0,0,zmin],[0,0,zmax]), thickness=2, color='green')
# Surfaces
S1=implicit_plot3d(y==x^2+z^2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='yellow')
S2=implicit_plot3d(z==y/2,(x,xmin,xmax),(y,ymin,ymax),(z,zmin,zmax), opacity=0.4, color='purple')
show(S1+S2+Ax+Ay+Az, aspect_ratio=[1,1,1])
I just wanted to execute the code, rotate the plot right from the graphics and export the image as a png file. This should by done by right-clicking on the plot and chosing export to png from the menu... Unfortunately, the output is a blank screen with just the string "Invalid JSmol request: saveFile"
Any suggestion, please?
I'm working with the OS X version, and I'm a total newbie...
Thanks in advice,
MauromaurosiriguMon, 22 Aug 2016 13:29:09 +0200https://ask.sagemath.org/question/34559/I keep losing my node labels on graph exporthttps://ask.sagemath.org/question/32221/i-keep-losing-my-node-labels-on-graph-export/Hello! I often export Sage graphs by using networkx. This is a typical example:
import networkx
g = graphs.HerschelGraph()
h = g.networkx_graph()
networkx.write_graphml(h,'HerschelGraph.graphml')
However, when I open the graphml-file in the *YEd Graph Editor* (which is my favorite software for displaying graphs) I find that the node labels (that are clearly existent in the Sage version of the graph) have disappeared forever. Everything else works fine. Assuming that this is Sage's fault rather than the graph editor's fault: What can I do to export the node labels as well?
Thank you very much for your help.
MalteMalteSat, 16 Jan 2016 03:21:55 +0100https://ask.sagemath.org/question/32221/export data and labels in cvs filehttps://ask.sagemath.org/question/23407/export-data-and-labels-in-cvs-file/Hi experts!
I have the Numpy arrays `AAA=[a1,a2,...]` and `BBB=[b1,b2,...]`. I know that I can export these arrays doing:
np.savetxt('array AAA.csv', AAA, delimiter=',')
np.savetxt('array BBB.csv', BBB, delimiter=',')
I wanna export one csv file that include both arrays + labels, in this way:
AAA | BBB
----------
a1 | b1
a2 | b2
. | .
. | .
. | .
How can I do that?
Waiting for your answers.
Thanks a lot.
Best regardsmresimulatorMon, 14 Jul 2014 01:08:16 +0200https://ask.sagemath.org/question/23407/how to export vector variables and other data structures into R as variables?https://ask.sagemath.org/question/10380/how-to-export-vector-variables-and-other-data-structures-into-r-as-variables/All the examples I kind find here and in the documentation pass data from sage to R to be used once. I'd like to pass data that's in a sage (python) variable and turn it into an R variable that I can subsequntly use in %r codeblocks.
simple stuff like r.set('x', [1,2,3]) doesn't work because set expects a string. I could turn vectors into strings before passing them to set, but that's kind of klugy (and could be a pain for more complicated things.kjd45Tue, 23 Jul 2013 20:17:43 +0200https://ask.sagemath.org/question/10380/Database Connectionhttps://ask.sagemath.org/question/8747/database-connection/I have an Oracle database that contains my data. I would like Sage to connect to it and read from there and when done I would like Sage to write back to the database. Is there a way to do that?zjah-2Tue, 19 Feb 2013 08:45:11 +0100https://ask.sagemath.org/question/8747/LaTeX table from an HTML tablehttps://ask.sagemath.org/question/9514/latex-table-from-an-html-table/Dear all:
I've made an html.table in my SAGE session, and I'd like to "export" it as LaTeX code.
Is it possible?
Thank you.DoxThu, 08 Nov 2012 13:28:33 +0100https://ask.sagemath.org/question/9514/Save data to text file - List_plot(...).save(Path, Name..)?https://ask.sagemath.org/question/9108/save-data-to-text-file-list_plotsavepath-name/Hey,
Is there a way to save data in list plot as a text file in stead/ in addition to showing it with .show() ?
In this way - I want to export the data from my list, say to Excel or Matlab in order to plot it using their tools. I wish the data would be arrange in the text file in a list of values that I could then copy (for example) to the Excel table.
Thanking u on advance! ErezMon, 25 Jun 2012 04:42:16 +0200https://ask.sagemath.org/question/9108/Export sage plot to pgfplots or to tkz-fcthttps://ask.sagemath.org/question/9052/export-sage-plot-to-pgfplots-or-to-tkz-fct/Is it possible to export a sage plot of a function to [pgfplots](http://pgfplots.sourceforge.net/) or (in my case even better) to [tkz-fct](http://www.ctan.org/pkg/tkz-fct)?sagefanSat, 09 Jun 2012 04:08:14 +0200https://ask.sagemath.org/question/9052/