Ask Your Question

Holosmos's profile - activity

2017-04-11 13:11:53 +0100 received badge  Notable Question (source)
2015-10-22 09:31:57 +0100 received badge  Popular Question (source)
2013-08-28 15:32:36 +0100 marked best answer SageTex and graphs

This seems to be a bug in pdf exports. It has been reported as ticket http://trac.sagemath.org/ticket/15116.

As a temporary fix, you can

\begin{sageblock}
  from sage.graphs.graph_coloring import edge_coloring
  g = graphs.CompleteGraph(10)  
  p = g.graphplot(edge_colors=edge_coloring(g, hex_colors=True)).plot()
  p.save('graph.eps')
\end{sageblock}

\includegraphics{graph.eps}

Note that LaTeX will complain it cannot find graph.eps on first compilation, just ignore the error.

2013-08-28 15:32:36 +0100 received badge  Scholar (source)
2013-08-28 10:52:45 +0100 received badge  Supporter (source)
2013-08-28 10:52:38 +0100 answered a question SageTex and graphs

It works Thank you !

2013-08-27 12:27:20 +0100 asked a question SageTex and graphs

Hey guys, Today i was looking for some graph plotting and i didn't arrived to use that piece of code in my .tex :

from sage.graphs.graph_coloring import edge_coloring
g = graphs.CompleteGraph(10)
g.graphplot(edge_colors=edge_coloring(g, hex_colors=True)).plot()

I can insert the first part in a block, but to plot I don't have the answer. I tried : \sageplot{g.graphplot(edge_colors=edge_coloring(g, hex_colors=True)).plot()} and \sage{g.graphplot(edge_colors=edge_coloring(g, hex_colors=True))} but nothing works :/

Of course \sage{g} works but i'd like to have the graphical options !

Help plz :)

Ty