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

Half lines direction confusion #3

Open
forstem6 opened this issue Aug 26, 2021 · 1 comment
Open

Half lines direction confusion #3

forstem6 opened this issue Aug 26, 2021 · 1 comment

Comments

@forstem6
Copy link

Hi,

I recently tried to pick up the project of adapting the donutmaps to my needs. I ran into an issue that (to me) is a bit confusing. When plotting (half)lines between to points (i.e. cities) the half line does not go from the origin halfway to the destination, but from halfway to the destination. I hope you can follow (see also the [example with the lockdown maps in France] (https://inseefrlab.github.io/lockdown-maps-R/inflows_EN.html).
In my understanding it would be more intuitive to have the line from say Paris to Alps start at Paris and go halfway to Alps (now it starts halfway to Alps and ends at Alps). Also the color is currently the one of the destination rather than the origin.

I managed to switch the lines (by switching the points in line 135 and 138 in the code), but I fail to figure out how I can change the color of the line to represent the origin instead of the destionation.

Best,
Michael

@mtennekes
Copy link
Owner

Hi Michael,

There is an argument edge_incoming that should decide whether the edge is [begin, mid] or [mid, end].
For the coloring, I probably don't have an option yet.

If you want both the edges to be in the other 'direction' and you want to color the origins, then it is worth considering to transpose to OD matrix (so let origins be destinations and vice versa). This is a bit hacky, but should work.

Best,
Martijn

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