runmat-runtime 0.4.5

Core runtime for RunMat with builtins, BLAS/LAPACK integration, and execution APIs
Documentation
{
  "title": "meshc",
  "category": "plotting",
  "keywords": [
    "meshc",
    "mesh with contour",
    "wireframe contour plot",
    "composite mesh plot",
    "matlab meshc"
  ],
  "summary": "Create composite wireframe-and-contour plots for scalar fields with MATLAB `meshc` semantics and contour overlays.",
  "gpu_support": {
    "elementwise": false,
    "reduction": false,
    "precisions": [
      "single",
      "double"
    ],
    "broadcasting": "none",
    "notes": "`meshc` combines the shared wireframe surface path with the modern contour path instead of using a parallel legacy composite implementation."
  },
  "fusion": {
    "elementwise": false,
    "reduction": false,
    "max_inputs": 3,
    "constants": "inline"
  },
  "requires_feature": null,
  "tested": {
    "unit": "builtins::plotting::meshc::tests"
  },
  "description": "`meshc` combines a `mesh`-style wireframe surface with contour lines projected onto the base plane. In RunMat the returned handle is the primary surface handle for the wireframe component, while the contour overlay is attached as the secondary composite plot content.",
  "behaviors": [
    "`meshc` shares the same wireframe surface semantics as `mesh` for the primary surface object.",
    "The returned handle is the surface handle for the wireframe component of the composite.",
    "Contour overlays are produced through the shared contour path.",
    "View state, colormaps, and subplot-local metadata all flow through the shared axes model.",
    "GPU-aware execution applies where supported to both the surface and contour sides of the composite."
  ],
  "examples": [
    {
      "description": "Create a wireframe surface with contour overlays",
      "input": "[X, Y] = meshgrid(linspace(-2, 2, 50), linspace(-2, 2, 50));\nZ = sin(X.^2 + Y.^2);\nmeshc(X, Y, Z);"
    },
    {
      "description": "Compare wireframe/composite behavior with camera controls",
      "input": "[X, Y] = meshgrid(linspace(-3, 3, 60), linspace(-3, 3, 60));\nZ = cos(X) .* sin(Y);\nh = meshc(X, Y, Z);\nview(3);\ncolormap('parula');"
    },
    {
      "description": "Inspect the returned primary surface handle",
      "input": "[X, Y] = meshgrid(1:20, 1:20);\nZ = X - Y;\nh = meshc(X, Y, Z);\nget(h, 'Type')",
      "output": "ans =\n    'surface'"
    }
  ],
  "faqs": [
    {
      "question": "Where does the contour overlay appear in a meshc plot?",
      "answer": "The contour lines are projected onto the base plane beneath the wireframe, at the z-minimum of the axes. This gives you a top-down height map below the 3-D wireframe so you can read both the grid structure and the level sets at the same time."
    },
    {
      "question": "What's the difference between meshc and mesh?",
      "answer": "`mesh` draws only the wireframe surface. `meshc` draws the same wireframe plus contour lines projected onto the base plane underneath. If you don't need the contour overlay, use `mesh` — it's the same surface rendering with less visual clutter."
    },
    {
      "question": "Should I use meshc or surfc?",
      "answer": "Both add contour projections to the base plane. The difference is the surface itself: `meshc` uses a wireframe (transparent faces, grid lines only), while `surfc` uses a shaded, filled surface. Pick `meshc` when you want to see through the geometry, and `surfc` when you want a solid surface on top."
    }
  ],
  "links": [
    {
      "label": "mesh",
      "url": "./mesh"
    },
    {
      "label": "surfc",
      "url": "./surfc"
    },
    {
      "label": "contour",
      "url": "./contour"
    },
    {
      "label": "contourf",
      "url": "./contourf"
    },
    {
      "label": "view",
      "url": "./view"
    },
    {
      "label": "Choosing the right plot type",
      "url": "/docs/plotting/choosing-the-right-plot-type"
    },
    {
      "label": "Styling plots and axes",
      "url": "/docs/plotting/styling-plots-and-axes"
    },
    {
      "label": "Plot replay and export",
      "url": "/docs/plotting/plot-replay-and-export"
    },
    {
      "label": "Complete plotting guide",
      "url": "/blog/matlab-plotting-guide"
    }
  ],
  "source": {
    "label": "`crates/runmat-runtime/src/builtins/plotting/ops/meshc.rs`",
    "url": "https://github.com/runmat-org/runmat/blob/main/crates/runmat-runtime/src/builtins/plotting/ops/meshc.rs"
  }
}