Plotly Overview - ExeVirus/boxgen GitHub Wiki

What is plotly?

From https://github.com/plotly/plotly.js :

Plotly.js is a standalone Javascript data visualization library, and it also powers the Python and R modules named plotly in those respective ecosystems (referred to as Plotly.py and Plotly.R).

Plotly.js can be used to produce dozens of chart types and visualizations, including statistical charts, 3D graphs, scientific charts, SVG and tile maps, financial charts and more.

It's pretty fast and allows me to export 3d data to the browser, which allows me to support visualization on all platforms.

It's under the MIT license, so feel free to use it for commercial products if you want. :moneybag:

Navigation in plotly

Below is an interactive plotly chart for you to play with from a boxes.html

Curse you github wiki, I worked hard to make that 😠

Anyways, here's a link to the boxes.html page to interact with. Just open it in a new tab: [boxes.html]

Wow, not even that works. Okay, please do at least through PART 3 of Simple Walkthrough before coming back here.



Okay, this assumes you have run boxgen at least once and have a boxes.html handy. Please open your boxes.html. It should look something like this:

  1. This is the plotly toolbar, in order from left to right:

    • Download screenshot as png
    • Zoom mode for left-click draging the mouse (also use middle mouse wheel in any mode)
    • Pan for left-click drag (holding cntl and left-dragging in any mode also works)
    • Orbital Rotation: view from any angle, left-click drag to rotate, hard to control
    • Turntable rotation: view from restricted angles, left click drag, easy to control
    • Reset (it's a home button)
    • Not used
    • Toggle the ability to mouse over data points
  2. The legend

    • obj is the original mesh file you boxgenerated
    • grid is the voxels used according to your spacing setting
    • Set#box# are the boxes. The set# refers to a set of boxes that will be stored in one node. Therefore this object requires two nodes to represent, as there are two sets.

    You can toggle display of any of the legend items by left clicking them. Double click to display only that item. If your legend goes off the bottom of the screen simply place your mouse over it and use the middle mouse wheel to scroll thhrough it.

  3. The grid axis - Accurate to actual minetest sizes

Okay that's all there is to it!

Using Plotly for other projects

After using this library I can say that it's slow to load for large datasets (expected), but fast to render (if you have a good gpu) so it's written well, basically. I therefore recommend it for other projects you might have in mind that require viewing 3D or even 2D data. If you need examples,plotly.com/javascript is a great resource, and you can also use my viewer.lua & plotly_header.lua code to see how I generate the html page.

It's released under MIT license, so sky's the limit for what projects its used with. Enjoy:)