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

Graph Plotting updates #38823

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Conversation

thecaligarmo
Copy link
Contributor

This pull request is handling a few different things all in one.

  1. Adding new options in graph plotting. In particular, we added: edge_styles, edge_thicknesses, label_fontsize, and vertex_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 is circular.
  2. Graph plotting doc, planar layout #28465 - A doc was added to show a planar layout
  3. Graph plotting: allow setting edge thickness in looped digraphs #21540 - This was already completed at some point and so it can be closed. I noticed that arrows were not updating with edge_thickness and so I have fixed that instead.
  4. Change size arrow head in directed graphs #22288 - Fixed it so that arrowsize can be passed through. I double checked and the HTML docs do build (this was the reason it needed work)

📝 Checklist

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

#28465
#21540
#22288

Copy link

github-actions bot commented Oct 17, 2024

Documentation preview for this PR (built with commit 929afc8; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@tscrim tscrim requested a review from dcoudert October 22, 2024 00:06
Copy link
Contributor

@dcoudert dcoudert left a 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.


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'])):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please improve the alignment.

Copy link
Contributor Author

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?

Copy link
Contributor

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.


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'])):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

improve alignment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants