-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Graph Plotting updates #38823
base: develop
Are you sure you want to change the base?
Graph Plotting updates #38823
Conversation
…plots. In addition added label font sizes and allowed for shifting vertex labels when printing in a circular manner
Documentation preview for this PR (built with commit 929afc8; changes) is ready! 🎉 |
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.
some doctests are failing.
src/sage/graphs/graph_plot.py
Outdated
|
||
estyle = self._options['edge_style'] | ||
ethickness = self._options['edge_thickness'] | ||
if style_key_edges is not None and ((style_key_edges and (x, y) in self._options['edge_styles']) or (not style_key_edges and lab in self._options['edge_styles'])): |
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.
please improve the alignment.
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.
What do you mean by the alignment? Do you mean for the if
statement? Should I break it down so it's something like:
if (style_key_edges is not None
and ((style_key_edges and (x, y) in self._options['edge_styles'])
or (not style_key_edges and lab in self._options['edge_styles']))):
Or are you thinking something else?
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.
yes, this is much easier to read this way.
src/sage/graphs/graph_plot.py
Outdated
|
||
estyle = self._options['edge_style'] | ||
ethickness = self._options['edge_thickness'] | ||
if style_key_edges is not None and ((style_key_edges and e in self._options['edge_styles']) or (not style_key_edges and elabel in self._options['edge_styles'])): |
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.
improve alignment
This pull request is handling a few different things all in one.
edge_styles
,edge_thicknesses
,label_fontsize
, andvertex_label_shift
. The first two options allow for users to specify individual styles/thicknesses for particular edges rather than a global one. The third one alters all font sizes. The final one shifts the vertex label when the layout iscircular
.edge_thickness
and so I have fixed that instead.arrowsize
can be passed through. I double checked and the HTML docs do build (this was the reason it needed work)📝 Checklist
⌛ Dependencies
#28465
#21540
#22288