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

Update plot.jl to account for line style #176

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

etiennedeg
Copy link
Member

This is a rebase of #131, after I messed it up.
I added some documentation

davide-f and others added 14 commits October 5, 2020 17:56
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.
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.
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #176 (f108307) into master (2ce59f9) will decrease coverage by 0.23%.
The diff coverage is 6.06%.

@@            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     
Impacted Files Coverage Δ
src/GraphPlot.jl 100.00% <ø> (ø)
src/collapse_plot.jl 0.00% <0.00%> (ø)
src/deprecations.jl 0.00% <0.00%> (ø)
src/layout.jl 48.42% <0.00%> (+1.75%) ⬆️
src/plot.jl 63.04% <100.00%> (+0.97%) ⬆️
src/lines.jl 52.22% <0.00%> (-0.12%) ⬇️
src/stress.jl 0.00% <0.00%> (ø)
src/pienode.jl 0.00% <0.00%> (ø)
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

@hdavid16
Copy link
Contributor

@etiennedeg, thanks for moving things with this old PR. what is the status of this PR?

@etiennedeg
Copy link
Member Author

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

@hdavid16 hdavid16 Aug 5, 2022

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

Copy link
Member Author

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], []])
Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

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

The default here is []

@hdavid16
Copy link
Contributor

hdavid16 commented Aug 5, 2022

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.

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

Successfully merging this pull request may close these issues.

3 participants