Comparing version 0.1.8 to 0.1.11
{ | ||
"name": "igraph", | ||
"version": "0.1.8", | ||
"version": "0.1.11", | ||
"description": "An embeddable webGL graph visualization library.", | ||
@@ -14,3 +14,3 @@ "main": "js/igraph.js", | ||
"type": "git", | ||
"url": "https://github.com/patrickfuller/igraph.git" | ||
"url": "https://github.com/patrickfuller/jgraph.git" | ||
}, | ||
@@ -20,5 +20,5 @@ "author": "Patrick Fuller", | ||
"bugs": { | ||
"url": "https://github.com/patrickfuller/igraph/issues" | ||
"url": "https://github.com/patrickfuller/jgraph/issues" | ||
}, | ||
"homepage": "https://github.com/patrickfuller/igraph", | ||
"homepage": "https://github.com/patrickfuller/jgraph", | ||
"dependencies": { | ||
@@ -25,0 +25,0 @@ "jquery": "^2.1.4", |
108
README.md
@@ -5,106 +5,6 @@ igraph | ||
An embeddable webGL graph visualization library. | ||
http://patrickfuller.github.io/igraph/ | ||
http://patrickfuller.github.io/jgraph/ | ||
Examples | ||
======== | ||
* [IPython notebook](http://patrickfuller.github.io/igraph/examples/ipython.html) | ||
* [les misérables](http://patrickfuller.github.io/igraph/examples/miserables.html) | ||
* [github connections](http://patrickfuller.github.io/igraph/examples/github.html) | ||
IPython | ||
======= | ||
The IPython notebook is an open-source tool poised to replace MATLAB in many | ||
applications. As a scientist of sorts, I'm all about it. Therefore, I made | ||
handles to use igraph with the notebook. Install through pip: | ||
``` | ||
pip install igraph | ||
``` | ||
Open a new notebook and test the setup by typing: | ||
```python | ||
import igraph | ||
igraph.draw([(1, 2), (2, 3), (3, 4), (4, 1), (4, 5), (5, 2)]) | ||
``` | ||
into a notebook cell. You should get a paddlewheel graph as an output. You can | ||
use this in conjunction with other code for educational purposes (try generating | ||
a red-black tree!). There are three commands and some optional parameters to | ||
check out. Read the docstrings and check out the [associated | ||
example](http://patrickfuller.github.io/igraph/examples/ipython.html) for more. | ||
Javascript | ||
========== | ||
You can install through [npm](https://www.npmjs.com/): | ||
``` | ||
npm install igraph | ||
``` | ||
Once installed, you can use with: | ||
```javascript | ||
igraph.create('my-selector'); | ||
igraph.draw(myGraph); | ||
``` | ||
where `'my-selector'` is where you want to place igraph, and `myGraph` is a | ||
javascript object. See below for more on the object structure, or just check out | ||
the included example. The `igraph.create()` method takes a few optional | ||
parameters, specifying the sizes and colors of nodes, as well as force-directed | ||
optimization. | ||
```javascript | ||
options = { | ||
directed: true, // Toggles edge arrows | ||
nodeSize: 2.0, // Default node size | ||
edgeSize: 0.25, // Edge connection diameter | ||
arrowSize: 1.0, // If drawn, edge arrow size | ||
defaultNodeColor: 0xaaaaaa, // Color for nodes without a "color" property | ||
defaultEdgeColor: 0x777777, // Color for edges without a "color" property | ||
shader: "toon", // three.js shader to use, can be "toon", "basic", "phong", or "lambert" | ||
runOptimization: true // Runs a force-directed-layout algorithm on the graph | ||
}; | ||
``` | ||
Graph Data Format | ||
================= | ||
igraph takes input graph data structures as plain objects. Here's the most | ||
boring graph in the world: | ||
```javascript | ||
{ | ||
nodes: { | ||
jane: { }, | ||
bob: { }, | ||
mike: { }, | ||
sally: { } | ||
}, | ||
edges: [ | ||
{ source: "jane", target: "bob" }, | ||
{ source: "bob", target: "mike" }, | ||
{ source: "mike", target: "sally" } | ||
] | ||
} | ||
``` | ||
Nodes require no information outside of their keys. However, there are useful | ||
optional parameters that can be specified. | ||
```javascript | ||
{ | ||
color: 0xffffff, // Color for this node | ||
size: 1.0, // Scaling factor for this node's size | ||
location: [0.0, 0.0, 0.0] // Starting location of node. Useful for pre-rendering. | ||
} | ||
``` | ||
By default, the algorithm runs a force-directed layout on the graph. When | ||
enabled, the "location" field is optional. However, for larger graphs, you will | ||
want to disable this feature and pre-render the locations. Use the associated | ||
Python library (`igraph.generate`) to do so. | ||
To avoid name collision with the [igraph](http://igraph.org/redirect.html) | ||
project, this visualization library has been renamed to ‘jgraph’. | ||
Please upgrade when convenient. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
1646161
9318
0
18
3
10
11