Skip to content

Commit

Permalink
some default setting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
benmaier committed May 23, 2019
1 parent 99c9d7b commit e3826ea
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Changed
- some default settings

## [v0.1.0] -2019-05-23
### Changed
Expand Down
27 changes: 14 additions & 13 deletions netwulf/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,27 @@ def log_message(self, format, *args):

default_config = {
# Input/output
'zoom': 1.5,
'zoom': 1,
# Physics
'node_charge': -30,
'node_charge': -45,
'node_gravity': 0.1,
'link_distance': 10,
'link_distance': 15,
'link_distance_variation': 0,
'node_collision': False,
'node_collision': True,
'wiggle_nodes': False,
'freeze_nodes': False,
# Nodes
'node_fill_color': '#16a085',
'node_stroke_color': '#000000',
'node_fill_color': '#79aaa0',
'node_stroke_color': '#555555',
'node_label_color': '#000000',
'display_node_labels': False,
'scale_node_size_by_strength': False,
'node_size': 10,
'node_stroke_width': 0.5,
'node_size': 5,
'node_stroke_width': 1,
'node_size_variation': 0.5,
# Links
'link_color': '#7c7c7c',
'link_width': 5,
'link_width': 2,
'link_alpha': 0.5,
'link_width_variation': 0.5,
# Thresholding
Expand Down Expand Up @@ -335,7 +335,8 @@ def visualize(network,

if __name__ == "__main__":
# download_d3()
G = nx.fast_gnp_random_graph(5,0.3)
posted_data = visualize(G,config={'node_size':5,'collision':True,'link_color':'#3b9'},verbose=True)
if posted_data is not None:
print("received posted data:", posted_data)
G = nx.fast_gnp_random_graph(100,2/100.)
#G = nx.barabasi_albert_graph(100,1)
posted_data = visualize(G,config={'collision':True},verbose=True)
#if posted_data is not None:
# print("received posted data:", posted_data)
6 changes: 3 additions & 3 deletions netwulf/tests/test_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def _get_test_network():
return G

def _get_test_config():
return {'node_size':2,'link_width':2}
return {'node_size':2,'link_width':2,'zoom':3}

def _drastically_round_positions(props,nprec=-1):

Expand Down Expand Up @@ -188,5 +188,5 @@ def test_config_adaption(self):

T = Test()

#T.test_matplotlib()
T.test_config_adaption()
T.test_matplotlib()
#T.test_config_adaption()

0 comments on commit e3826ea

Please sign in to comment.