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

add DotHighlightedDigraph method #169

Merged
merged 1 commit into from
Feb 20, 2019

Conversation

flsmith
Copy link
Collaborator

@flsmith flsmith commented Feb 19, 2019

This PR adds a method for producing a dot string where a subdigraph is highlighted.

I'm open to comments if people would like this to work differently - I wrote it this way for a specific application, and it might not be the best generic solution.

@james-d-mitchell
Copy link
Member

This PR is very welcome. I wonder if it might not be a more consistent approach to simply allow a colouring of the vertices of a digraph be the second argument to DotDigraph? This would be quite natural, and also serve your purpose, example usage:

DotDigraph(D, [1, 2, 3], ["blue", "red", "pink"]);

Since there is built in functonality for checking if a coloring is valid, this might be one way to go. What do you think @wilfwilson and @flsmith ?

@james-d-mitchell james-d-mitchell added the new-feature A label for new features. label Feb 20, 2019
Copy link
Collaborator

@wilfwilson wilfwilson left a comment

Choose a reason for hiding this comment

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

I like what you've done @flsmith

@james-d-mitchell I think your suggestion serves a different purpose. @flsmith's code has nothing to do with graph colouring, it's about emphasising a particular induced subdigraph in a digraph: the special vertices and the edges between them get a special colour. To bring graph colouring into it is something quite different, and I don't see how it is compatible with what @flsmith has done.

@flsmith
Copy link
Collaborator Author

flsmith commented Feb 20, 2019

I've discussed this with @james-d-mitchell and he's happy with this as it is.

I'll create a new issue for giving arbitrary colours to vertices/edges, which might be useful too.

@wilfwilson wilfwilson merged commit 87cc6c3 into digraphs:master Feb 20, 2019
@flsmith flsmith deleted the highlight-splash branch February 27, 2019 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature A label for new features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants