First time here? Check out the FAQ!

Ask Your Question
1

Export a Plot as Tikz to Latex

asked 4 years ago

Lars gravatar image

updated 4 years ago

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

Preview: (hide)

Comments

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.

FrédéricC gravatar imageFrédéricC ( 4 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 4 years ago

Emmanuel Charpentier gravatar image

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 ?

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

1 follower

Stats

Asked: 4 years ago

Seen: 764 times

Last updated: Feb 06 '21