-
Notifications
You must be signed in to change notification settings - Fork 62
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
Update plot.jl to account for line style #176
base: master
Are you sure you want to change the base?
Conversation
Proposal to: 1) add a custom line dash style of the edges 2) specify whether to resize the box as a unit square or preserve the proportions (x and y axes) among the different stations
This reverts commit 921d54d.
This reverts commit 40f1010.
Proposal to: 1) add a custom line dash style of the edges 2) specify whether to resize the box as a unit square or preserve the proportions (x and y axes) among the different stations
This reverts commit 921d54d.
This reverts commit 40f1010.
Codecov Report
@@ Coverage Diff @@
## master #176 +/- ##
==========================================
- Coverage 33.26% 33.03% -0.24%
==========================================
Files 9 9
Lines 526 566 +40
==========================================
+ Hits 175 187 +12
- Misses 351 379 +28
Help us with your feedback. Take ten seconds to tell us how you rate us. |
@etiennedeg, thanks for moving things with this old PR. what is the status of this PR? |
I don't know what is the policy on this package for testing, maybe we need some kind of tests, but I don't see many tests here. Otherwise, I think we are good. @simonschoelly, a quick review maybe ? |
## Add dash style to edges | ||
```julia | ||
using Measures | ||
gplot(g, edgedashstyle=[5mm, 2mm]) |
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.
The use of this kwarg should be properly documented. In this case, one edge will have 5mm dashes and the next will have 2mm dashes
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.
No, all edges will have the same style, that is alternating 5mm solid line and 2mm blank line.
gplot(g, edgedashstyle=[5mm, 2mm]) | ||
# vary edge styles | ||
using Compose | ||
gplot(g, EDGELINEWIDTH=0.7, edgedashstyle=[[10px, 5px], [10px, 5px, 3px, 5px], [4px, 4px], []]) |
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.
The use of this kwarg should be properly documented. When vectors are passed for each edge, the values define the sequence of dashes and spaces. For example, the first edge will have 10px solid dash with 5px spacing in between; the second edge will have the following alternating sequence: 10px solid - 5 px space - 3px solid - 5 px space - etc...
@@ -77,6 +77,9 @@ Optional. Relative line width for the edges, can be a Vector. Default: `1.0` | |||
`edgestrokec` | |||
Optional. Color for the edge strokes, can be a Vector. Default: `colorant"lightgray"` | |||
|
|||
`edgedashstyle` | |||
Optional. Dash style for the edge, can be a Vector. Default: no dashed line. |
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.
The default here is []
If it helps, I can add this to #186 so that it is consistent with straight and curved lines with the new fixes that enable curved self-loops. And we can have one PR with all these feature additions. |
This is a rebase of #131, after I messed it up.
I added some documentation