Giter VIP home page Giter VIP logo

heatmapnode's Introduction

HeatMapNode

This project is a libavg plugin. HeatMapNode is derived from RasterNode and can render a Heatmap based on single Points or a whole matrix. We have tested it under Linux and Mac. Also, there are no OS-specific features that we know of, so it should not be hard to get to run under windows.

HeatMapNode was originally written by Lucas Recknagel. Thanks!

Install Instructions

Dependencies:

  • cmake

Build & Install:

cd HeatMapNode/plugin
mkdir build && cd build
cmake ..
make -j9
make install # run as sudo if you´re not using virtualenv
cd ../..
python setup.py install # run as sudo if you´re not using virtualenv

Usage

You can use the pythonwrapper class or the plugin directly.

Wrapper

from HeatMapNode import HeatMapNode
...

heatmap_node = HeatMapNode(
    id="test",
    size=self.size,
    parent=self,
    colormap=cm,
    valuerangemin=1,
    valuerangemax=16,
    overlay_src="world.png"
    blur_level=1
)

Your can set those attributes on you needs and then call:

heatmap_node.set_data(data)

The data attribute must be a single avg.Point2D or a list of lists (2D Array or Matrix like) You find a example in heatmapnode_test.py.

Directly

player.loadPlugin('heatmap')
...
heatmap_node = heatmap.HeatMapNode(
    parent=parent,
    size=size,
    viewportrangemin=(0,0),
    viewportrangemax=(1,1),
    mapsize=(10,10),
    valuerangemin=valuerangemin,
    valuerangemax=valuerangemax,
    colormap=colormap
)

You can then call:

heatmap_node.setMatrix(data)
OR
heatmap_node.setPosns(data)

If you are using the plugin directly, blurring does not work out of the box!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.