contour_plot

WebJar for contour_plot

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

contour_plot
Последняя версия

Последняя версия

0.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

contour_plot
WebJar for contour_plot
Ссылка на сайт

Ссылка на сайт

https://www.webjars.org
Система контроля версий

Система контроля версий

https://github.com/benfred/contour_plot

Скачать contour_plot

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/contour_plot/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>contour_plot</artifactId>
    <version>0.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/contour_plot/
implementation 'org.webjars.npm:contour_plot:0.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/contour_plot/
implementation ("org.webjars.npm:contour_plot:0.0.1")
'org.webjars.npm:contour_plot:jar:0.0.1'
<dependency org="org.webjars.npm" name="contour_plot" rev="0.0.1">
  <artifact name="contour_plot" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='contour_plot', version='0.0.1')
)
libraryDependencies += "org.webjars.npm" % "contour_plot" % "0.0.1"
[org.webjars.npm/contour_plot "0.0.1"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

contour_plot

A D3 plugin to draw contour plots of 2D functions.

Uses the marching squares algorithm from d3.geom.contour to generate contour lines.

This project is a work in progress, and not ready for public consumption. Notably this doesn't generate

Installing

If you use NPM, npm install contour_plot. Otherwise, download the latest release.

Example

Draw the Goldstein Price function:

function goldsteinPrice(x, y) {
    return (1. + Math.pow(x + y + 1, 2) *
    (19 - 14*x + 3*x*x - 14 * y + 6 * x * x + 3 * y * y))
    * (30 + Math.pow(2*x-3*y, 2)*(18 - 32*x + 12 * x * x + 48*y - 36 * x * y + 27 * y* y));
}

var plot = contour_plot.ContourPlot()
    .f(goldsteinPrice)
    .drawAxis(true)
    .xDomain([-2, 2])
    .yDomain([1, -2])
    .colourRange(["white", "green"]);

var elements = plot(d3.select("#contour_graph"));

Should produce something like:

Example

Версии библиотеки

Версия
0.0.1