{"_id":"contour_plot","_rev":"376781","name":"contour_plot","description":"Contour Plots of Mathematical Functions","dist-tags":{"latest":"0.0.1"},"maintainers":[{"name":"benfrederickson","email":"ben@benfrederickson.com"}],"time":{"modified":"2021-07-30T05:41:54.000Z","created":"2016-10-30T03:07:59.261Z","0.0.1":"2016-10-30T03:07:59.261Z"},"users":{},"author":{"name":"Ben Frederickson","email":"ben@benfrederickson.com","url":"http:/www.benfrederickson.com"},"repository":{"type":"git","url":"git+https://github.com/benfred/contour_plot.git"},"versions":{"0.0.1":{"name":"contour_plot","version":"0.0.1","author":{"name":"Ben Frederickson","email":"ben@benfrederickson.com","url":"http:/www.benfrederickson.com"},"url":"https://github.com/benfred/contour_plot/issues","devDependencies":{"rollup":"0.21.2","uglify-js":"2","jshint":"^2.8.0"},"description":"Contour Plots of Mathematical Functions","main":"build/contour_plot.js","jsnext:main":"index","files":["build","src","example.html","*.js"],"repository":{"type":"git","url":"git+https://github.com/benfred/contour_plot.git"},"keywords":["Contour Plot"],"license":"MIT","bugs":{"url":"https://github.com/benfred/contour_plot/issues"},"homepage":"https://github.com/benfred/contour_plot","jshintConfig":{"esnext":true},"scripts":{"pretest":"mkdir -p build && node -e 'process.stdout.write(\"var version = \\\"\" + require(\"./package.json\").version + \"\\\"; export * from \\\"../index\\\"; export {version};\");' > build/bundle.js && rollup -f umd -u contour_plot -n contour_plot -o build/contour_plot.js -- build/bundle.js && cp build/contour_plot.js .","test":"jshint src/*.js","prepublish":"npm run test && uglifyjs build/contour_plot.js -c -m -o build/contour_plot.min.js && rm -f build/contour_plot.zip && zip -j build/contour_plot.zip -- LICENSE README.md build/contour_plot.js build/contour_plot.min.js"},"gitHead":"af29ca2bd83fd620d13f83ca9ca1a3a2ba85a34c","_id":"contour_plot@0.0.1","_shasum":"475870f032b8e338412aa5fc507880f0bf495c77","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"benfrederickson","email":"ben@benfrederickson.com"},"dist":{"shasum":"475870f032b8e338412aa5fc507880f0bf495c77","size":20887,"noattachment":false,"key":"/contour_plot/-/contour_plot-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/contour_plot/download/contour_plot-0.0.1.tgz"},"maintainers":[{"name":"benfrederickson","email":"ben@benfrederickson.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/contour_plot-0.0.1.tgz_1477796879043_0.13023589923977852"},"directories":{},"publish_time":1477796879261,"_cnpm_publish_time":1477796879261,"_hasShrinkwrap":false}},"readme":"# contour_plot\n\nA D3 plugin to draw contour plots of 2D functions.\n\nUses the marching squares algorithm from d3.geom.contour to generate contour lines.\n\nThis project is a work in progress, and not ready for public consumption. Notably this doesn't\ngenerate \n\n## Installing\n\nIf you use NPM, `npm install contour_plot`. Otherwise, download the [latest\nrelease](https://github.com/benfred/contour_plot/releases/latest).\n\n## Example\n\nDraw the [Goldstein Price](https://en.wikipedia.org/wiki/File:Goldstein_Price_function.pdf) function:\n\n```javascript\nfunction goldsteinPrice(x, y) {\n    return (1. + Math.pow(x + y + 1, 2) *\n    (19 - 14*x + 3*x*x - 14 * y + 6 * x * x + 3 * y * y))\n    * (30 + Math.pow(2*x-3*y, 2)*(18 - 32*x + 12 * x * x + 48*y - 36 * x * y + 27 * y* y));\n}\n\nvar plot = contour_plot.ContourPlot()\n    .f(goldsteinPrice)\n    .drawAxis(true)\n    .xDomain([-2, 2])\n    .yDomain([1, -2])\n    .colourRange([\"white\", \"green\"]);\n\nvar elements = plot(d3.select(\"#contour_graph\"));\n```\n\nShould produce something like:\n\n![Example](https://github.com/benfred/contour_plot/raw/master/image.png)\n\n","_attachments":{},"homepage":"https://github.com/benfred/contour_plot","bugs":{"url":"https://github.com/benfred/contour_plot/issues"},"license":"MIT"}