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

PR addressing Issue #233 #234

Merged
merged 10 commits into from
Dec 13, 2022
Merged

PR addressing Issue #233 #234

merged 10 commits into from
Dec 13, 2022

Conversation

Max-Bladen
Copy link
Collaborator

This PR contains numerous changes to the network() function. Users noted that a lack of control over vertex size and distances made for difficulty in plotting. Vertices frequently overlapped, covering the edges completely - essentially nullifying the purpose of the figure. The following changes were made:

  • Added graph.scale parameter: influences the scale of the entire network. Increasing this value essentially "zooms out" from the plot, decreasing vertex size and proximity.
    • Range: 0-1,
    • Default: 0.5 (network() functions the same as prior to PR)
  • Added size.node parameter: influences the size of the vertices. Works independently from graph.scale.
    • Range: 0-1,
    • Default: 0.5 (network() functions the same as prior to PR)
  • If user sets shape.node == "none", then the vertex labels will be coloured in the same fashion as the vertices would be.
  • Cleaned up some of the checks for various parameter and ensured minmal chance of warnings/errors occuring when using network() on different objects
  • Added tests to maintain coverage
  • Updated documentation and SemVer

@Max-Bladen Max-Bladen added the enhancement-request New feature or request label Aug 30, 2022
@Max-Bladen Max-Bladen self-assigned this Aug 30, 2022
@Max-Bladen Max-Bladen linked an issue Aug 30, 2022 that may be closed by this pull request
@Max-Bladen Max-Bladen added ready-to-review for all PRs that are ready to be reviewed. including complex, larger commits documentation related to documentation labels Aug 30, 2022
@Max-Bladen Max-Bladen added enhancement-implementation for PR's that address an Issue with 'enhancement' label and removed enhancement-request New feature or request labels Nov 28, 2022
@Max-Bladen Max-Bladen changed the title Enhancement for Issue #233 Enhancement Implementation, Issue #233 Nov 28, 2022
@Max-Bladen Max-Bladen changed the title Enhancement Implementation, Issue #233 PR addressing Issue #233 Nov 28, 2022
feat: added `size.node` parameter to `network()`. allows users to adjust the size of the vertices. also slightly adjusts how `cex.node.name` is used, provides greater user input to label size.
refactor: bounds `size.node` between 0 - 1.
refactor: changed default value of `size.node`
feat: added `graph.scale` parameter to `network()`. Allows for the general scaling up or down of the entire plot.

More specifically, changes the upper bounds of the plotting space to increase/decrease distance and size of vertices
feat: when `shape.node == "none"` in `network()`, a color is now applied
refactor: adjusted the default colours used when applying `network()` in NON-multiblock contexts
tests: added tests for the new parameters and functionality of `network()`
fix: removed part of checks which was causing consistent warnings/errors
fix: added extra check for `shape.node` to avoid error and adjusted scaling of node size
docs: updated documentation for `network()` with new parameters
@Max-Bladen
Copy link
Collaborator Author

Second set of commits on 13/12/2022 reflect initial set of commits, but replicated after the branch was rebased to master following PR #281.

@Max-Bladen Max-Bladen merged commit 6ea2b80 into master Dec 13, 2022
@Max-Bladen Max-Bladen deleted the issue-233 branch December 13, 2022 21:50
@Max-Bladen Max-Bladen removed the ready-to-review for all PRs that are ready to be reviewed. including complex, larger commits label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation related to documentation enhancement-implementation for PR's that address an Issue with 'enhancement' label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

greater control over vertex size and placement in network
1 participant