Visualizing Meshes

As part of the EarthSim project, extensive support for visualizing triangular meshes was added to HoloViews and Datashader; see the websites for those projects for details of how to use this functionality. Here, we will show how to use the small utilities provided in earthsim itself, which allow you to read 3DM and mesh2d files with mesh data, and we'll then visualize the resulting structures.

In [1]:
import numpy as np
import holoviews as hv
import geoviews as gv
import as ccrs

from holoviews import opts
from holoviews.operation.datashader import datashade, rasterize
import datashader as ds
from colorcet import cm_n
from import read_3dm_mesh, read_mesh2d

datashade.precompute = True


size = dict(width=800, height=600)
    opts.Image(**size), opts.RGB(**size), opts.VectorField(**size))