Latest Threat Research:Malicious dYdX Packages Published to npm and PyPI After Maintainer Compromise.Details
Socket
Book a DemoInstallSign in
Socket

planar-graph-to-svg

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

planar-graph-to-svg

Draw a planar graph to an svg file

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

planar-graph-to-svg

Converts a planar graph to an SVG string

Example

var toSVG = require('planar-graph-to-svg')
var ch = require('convex-hull')
var points = []
for(var i=0; i<100; ++i) {
  points.push([Math.random(), Math.random()])
}
console.log(toSVG(ch(points), points))

Output:

Install

npm i planar-graph-to-svg

API

var svg = require('planar-graph-to-svg')(edges,positions[,options])

  • edges is an array of oriented edges for the planar graph
  • positions is an array of vertex positions
  • options is an array of options for the planar graph

Returns An SVG string encoding the planar graph

License

(c) 2015 Mikola Lysenko. MIT License

Keywords

planar

FAQs

Package last updated on 09 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts