Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_latex_ method of generic graphs does not support all advertised options (vertex_color, vertex_shape, ...) #38282

Open
2 tasks done
cyrilbouvier opened this issue Jun 26, 2024 · 0 comments
Labels

Comments

@cyrilbouvier
Copy link
Contributor

Steps To Reproduce

G = graphs.PathGraph(2)
G.set_latex_options(vertex_shape='rectangle',vertex_color='red')
view(G)

Expected Behavior

A graph with vertices represented as red rectangle should be displayed.

Actual Behavior

A graph with vertices represented as black circle (the default) is displayed.

Additional Information

If one looks at the latex code generated, one can see the option shape=rectangle for the \Vertex but it does not seem to have any effect. The same is true for the color: draw=cv0 is present, where cv0 is defined as the color red (via \definecolor{cv0}{rgb}{1.0,0.0,0.0}), but it does not seem to have any effect.

sage: latex(G)
\begin{tikzpicture}
\definecolor{cv0}{rgb}{1.0,0.0,0.0}
\definecolor{cfv0}{rgb}{1.0,1.0,1.0}
\definecolor{clv0}{rgb}{0.0,0.0,0.0}
\definecolor{cv1}{rgb}{1.0,0.0,0.0}
\definecolor{cfv1}{rgb}{1.0,1.0,1.0}
\definecolor{clv1}{rgb}{0.0,0.0,0.0}
\definecolor{cv0v1}{rgb}{0.0,0.0,0.0}
%
\Vertex[style={minimum size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=rectangle},LabelOut=false,L=\hbox{$0$},x=0.0cm,y=2.5cm]{v0}
\Vertex[style={minimum size=1.0cm,draw=cv1,fill=cfv1,text=clv1,shape=rectangle},LabelOut=false,L=\hbox{$1$},x=5.0cm,y=2.5cm]{v1}
%
\Edge[lw=0.1cm,style={color=cv0v1,},](v0)(v1)
%
\end{tikzpicture}

Environment

- **OS**: Debian 11
- **Sage Version**: 9.8, 10.0, 10.3, 10.4rc0

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant