Plot¶
The plot module aims to provide a consistent interface to various plotting backends. At this point matplotlib and vtk are supported.
- class nutils.plot.PyPlot(name, imgtype=None, ndigits=3, index=None, **kwargs)[source]¶
matplotlib figure
- mesh(points, colors=None, edgecolors='k', edgewidth=None, triangulate='delaunay', setxylim=True, **kwargs)[source]¶
plot elemtwise mesh
- slope_triangle(x, y, fillcolor='0.9', edgecolor='k', xoffset=0, yoffset=0.1, slopefmt='{0:.1f}')[source]¶
Draw slope triangle for supplied y(x) - x, y: coordinates - xoffset, yoffset: distance graph & triangle (points) - fillcolor, edgecolor: triangle style - slopefmt: format string for slope number
- nutils.plot.writevtu(name, topo, coords, pointdata={}, celldata={}, ascii=False, superelements=False, maxrefine=3, ndigits=0, ischeme='gauss1', **kwargs)[source]¶
write vtu from coords function
- class nutils.plot.PylabAxis(ax, title)[source]¶
matplotlib axis augmented with nutils-specific functions
- add_mesh(coords, topology, deform=0, color=None, edgecolors='none', linewidth=1, xmargin=0, ymargin=0, aspect='equal', cbar='vertical', title=None, ischeme='gauss2', cscheme='contour3', clim=None, frame=True, colormap=None)[source]¶
plot mesh