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

Is it possible to make arcplot directional? #634

Open
Xiaojieqiu opened this issue Nov 1, 2020 · 2 comments
Open

Is it possible to make arcplot directional? #634

Xiaojieqiu opened this issue Nov 1, 2020 · 2 comments

Comments

@Xiaojieqiu
Copy link

Thanks for this cool project, I just wonder is it possible to draw arrows when plotting a directional graph with arcplot?
Passing edgeprops={"arrowstyle": "->", "arrowsize": 100000,} to nv.ArcPlot doesn't seem to work.

Looks like the edges are drawn wit the following code (

def draw_edges(self):
):

path = Path(verts, codes)
            patch = patches.PathPatch(
                path, lw=lw, edgecolor=color, zorder=1, **self.edgeprops
            )
            self.ax.add_patch(patch)

If you have any thoughts, please let me know any suggestions. Very much appreciated!

@Xiaojieqiu
Copy link
Author

there are two possible solutions for me:

  1. add an arrow to represent the direction
  2. if make the edges above the node as interaction from left to right and edges below it interactions from right to left.

@ericmjl
Copy link
Owner

ericmjl commented Nov 2, 2020

@Xiaojieqiu thanks for chiming in! Given how densely populated edges and arrows might become, I think your second suggestion, that is to make edges above the Arc line represent edges going from left to right, and edges below the Arc line represent edges going from right to left, makes the most sense!

Are you interested in putting together a PR for this feature? If so, please let me know. I'm going to be going offline for a few weeks, as my first kid is arriving and the company I work for is entering year-end review season, so producing code is going to be difficult, but I'll be happy to review code if you're game for it!

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

No branches or pull requests

2 participants