Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
erdogant committed Jun 14, 2022
1 parent eedc2b9 commit 4b5b05a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion d3graph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

__author__ = 'Erdogan Tasksen'
__email__ = '[email protected]'
__version__ = '2.1.0'
__version__ = '2.1.1'

import jinja2
if version.parse(jinja2.__version__) > version.parse("2.11.3"):
Expand Down
2 changes: 1 addition & 1 deletion d3graph/d3graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def adjmat2dict(adjmat, min_weight=0, edge_distance_minmax=[1, 10]):
if len(np.unique(df['weight'].values.reshape(-1, 1)))>2:
df['weight_scaled'] = _normalize_size(df['weight'].values.reshape(-1, 1), edge_distance_minmax[0], edge_distance_minmax[1])
else:
df['weight_scaled'] = np.ones(df.shape[0]) * 5
df['weight_scaled'] = np.ones(df.shape[0]) * 1

# Creation dictionary
source_target = list(zip(df['source'], df['target']))
Expand Down
17 changes: 17 additions & 0 deletions docs/source/Core Functionalities.rst
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,23 @@ Lets change the **node colors** from the *karate* example using the label inform

<iframe src="https://erdogant.github.io/docs/d3graph/d3graph/karate_label_color.html" height="700px" width="850px", frameBorder="0"></iframe>

Node color on clustering
--------------------------

We can also change the node color on the clustering.

.. code:: python
# Set node properties
d3.set_node_properties(label=df['label'].values, color='cluster')
# Plot
d3.show()
.. raw:: html

<iframe src="https://erdogant.github.io/docs/d3graph/d3graph/karate_label_color.html" height="700px" width="850px", frameBorder="0"></iframe>


Node size
-----------------------
Expand Down

0 comments on commit 4b5b05a

Please sign in to comment.