0

Various plotting libraries have "surface plot" and "tri-surface plot" functions. (Are all of the following actually analogous to each other?) These seem to have similar arguments and the demos I've found do similar things.

  • matplotlib has mplot3d.plot_surface and mplot3d.plot_trisurf
  • ipyvolume has ipyvolume.pylab.plot_surface and ipyvolume.pylab.plot_trisurf
  • Matlab has surf and trisurf.

What is the difference between a surface and a tri-surface plot? What can you do with one but not the other?

dkv
  • 6,602
  • 10
  • 34
  • 54
  • 4
    Surface needs meshgrids (uniform square grids) while trisurf needs triangular grids. – Ander Biguri Aug 07 '18 at 16:03
  • 2
    The docs seem to make this obvious: [`surf`](https://www.mathworks.com/help/matlab/ref/surf.html) takes as input rectilinear grids and plots surfaces as rectilinear facets, while [`trisurf`](https://www.mathworks.com/help/matlab/ref/trisurf.html) takes as input triangular representations and plots surfaces as triangular facets. – gnovice Aug 07 '18 at 16:07
  • 1
    In general you use `surf` to plot modelised data, and you use `trisurf`to plot experimental data. (because your experimental data are not necessarily distributed on a nice regular grids) – obchardon Aug 07 '18 at 16:23
  • 1
    In general, surface plots would need a rectilinear grid, while trisurface plots can plot arbitrary point clouds by performing a triangulation (hence the name). [This question](https://stackoverflow.com/questions/42597026/python-3d-plots-over-non-rectangular-domain) might be of interest. Or [this one](https://stackoverflow.com/questions/42379211/how-to-do-4d-plot-in-matplotlib-without-np-meshgrid/42387568#42387568) or [this one](https://stackoverflow.com/questions/44355270/plot-3d-in-python-using-three-lists/44355400#44355400). – ImportanceOfBeingErnest Aug 07 '18 at 23:33

0 Answers0