-
-
Notifications
You must be signed in to change notification settings - Fork 472
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
adding method tikz to class Graph #38798
base: develop
Are you sure you want to change the base?
Conversation
Documentation preview for this PR (built with commit 2a5b4d7; changes) is ready! 🎉 |
ac7cb63
to
24c4e9c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and it is a nice addition.
…in set_options method already
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is much better and the examples are very nice (on my laptop).
- ``rankdir`` -- string (default: ``'down'``), direction of graph layout | ||
when prog is ``'dot'``, possible values are ``'down'``, | ||
``'up'``, ``'right'`` and ``'left'``. | ||
- ``subgraph_clusters`` -- (default: ``[]``) a list of lists of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default is None
, not []
. The same for other parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None gets replaced by []
. This is why I write that the default is []
. I don't set the default argument to the empty list due to the gotcha related to doing this (https://docs.python-guide.org/writing/gotchas/).
If you insist that I replace []
by None
and that I add a sentence after saying that None
gets replaced by []
, then I can.
the linter is not happy, please fix the offending line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Si j'ai ajouté Xavier comme reviewer, c'était pas pour mettre de la pression. C'est que j'étais dans son bureau et qu'il était curieux de tester aussi. Dans tous les cas, merci pour la relecture! |
Pas de souci, et il ne faut pas qu'il hésite à revenir en arrière si il trouve qu'un truc ne va pas. |
Non, tout va bien, c'est parfait. |
Currently, we can create a TikzPicture from a graph as follows, but is raises an experimental feature warning:
It was declared experimental during the review of #20343 because it should rather be a method of the class Graph.
This is what we do in this PR: we add a tikz method to the class Graph.
📝 Checklist
⌛ Dependencies
None
Screenshots
As a consequence, the following now works in Jupyter. By default, it uses the dot2tex format if dot2tex is available: