PLOT3D(3plplot)

✨ PLOT3D β€” plot3d(3plplot) ✨

okay bestie, so this one is from the PLplot API and it's literally the 3-D surface plot function, and it's lowkey iconic. πŸ’…


🌈 NAME 🌈

plot3d β€” plot a 3-d surface plot. no cap, that's the whole vibe check. πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

plot3d(x, y, z, nx, ny, opt, side)

πŸ’– DESCRIPTION πŸ’–

So here's the tea: plot3d plots a three-dimensional surface plot within the environment set up by plw3d(3plplot). ✨ Like, plw3d builds the stage and then plot3d is the main character up there performing.

The surface is defined by the matrix z[nx][ny], where the point z[i][j] is the value of the function at (x[i],y[j]). Obsessed with that indexing honestly. 🫢

Note β€” and this is important bestie β€” the points in vectors x and y do not need to be equally spaced, but they must be stored in ascending order. That's not a suggestion, that's the rule, periodt. πŸ’€

The parameter opt controls the way in which the surface is displayed. For further details see the PLplot documentation. πŸ“š

And here's the sibling situation you need to know about: the only difference between plmesh(3plplot) and plot3d(3plplot) is that plmesh(3plplot) draws the bottom side of the surface, while plot3d(3plplot) only draws the surface as viewed from the top. So one is giving underneath energy and the other is giving top-down, and it's literally just that. πŸ™ˆ

Redacted form: plot3d(x, y, z, opt, side)

This function is used in examples 11 and 21. πŸ”₯


⭐ ARGUMENTS ⭐

  • x (PLFLT_VECTOR(3plplot), input) β€” A vector containing the x coordinates at which the function is evaluated. πŸ“
  • y (PLFLT_VECTOR(3plplot), input) β€” A vector containing the y coordinates at which the function is evaluated. πŸ“
  • z (PLFLT_MATRIX(3plplot), input) β€” A matrix containing function values to plot. Should have dimensions of nx by ny. ✨
  • nx (PLINT(3plplot), input) β€” Number of x values at which function is evaluated. πŸ”’
  • ny (PLINT(3plplot), input) β€” Number of y values at which function is evaluated. πŸ”’
  • opt (PLINT(3plplot), input) β€” Determines the way in which the surface is represented, and honestly the options are a whole menu of aesthetics:
    • opt=DRAW_LINEX : Lines are drawn showing z as a function of x for each value of y[j]. 🌸
    • opt=DRAW_LINEY : Lines are drawn showing z as a function of y for each value of x[i]. 🌸
    • opt=DRAW_LINEXY : Network of lines is drawn connecting points at which function is defined. πŸ‘‘
  • side (PLBOOL(3plplot), input) β€” Flag to indicate whether or not ``sides'' should be draw on the figure. If side is true sides are drawn, otherwise no sides are drawn. πŸŽ€

πŸ‘‘ AUTHORS πŸ‘‘

Many developers (who are credited at http://plplot.sourceforge.net/credits.php) have contributed to PLplot over its long history. 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

PLplot documentation at http://plplot.sourceforge.net/documentation.php. πŸ“–


okay bestie real talk: plot3d only gives you the top view of the surface, so if you were hoping for the underside moment you gotta go find plmesh(3plplot). iykyk πŸ’…

that's the whole page, and it's sourced and versioned as of August, 2026 β€” mwah, slay, go make some gorgeous 3-d surfaces. πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from