# 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 Kroll

edit retag close merge delete

That's because nobody has written the tikz method for hyperplane arrangement. Open source means that you can do it yourself to provide that for everybody else.

( 2021-02-06 13:30:39 +0200 )edit

Sort by » oldest newest most voted

A.plot() is inherently a 3D object. Its save method can save to various 2D image formats (but not .pgf), HTML or various specialized 3D formats. Its save_image method does not include .pgf as a valid output format.

Your best bet seems to start from one of these formats (or HTML) and convert it via the targe tool(s) for the choosen format. It might be possible to het three.js to output a Tikz picture...

It might also be possible to add Tikz output to the relevant save_image (or possibly save) method. Care to file a ticket for this ?

more