RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
See all docs
Builtin Reference
    • addpoints
    • ancestor
    • animatedline
    • area
    • autumn
    • axes
    • axis
    • bar
    • barh
    • bone
    • box
    • caxis
    • cla
    • clf
    • clim
    • colorbar
    • colorcube
    • colormap
    • colororder
    • contour
    • contour3
    • contourf
    • cool
    • copper
    • copyobj
    • cylinder
    • daspect
    • datacursormode
    • dataTipTextRow
    • drawnow
    • errorbar
    • fcontour
    • figure
    • fill
    • fill3
    • findobj
    • fsurf
    • gca
    • gcf
    • get
    • gobjects
    • gray
    • grid
    • groot
    • heatmap
    • hgload
    • hgsave
    • hidden
    • hist
    • histogram
    • histogram2
    • hold
    • hot
    • image
    • imagesc
    • imshow
    • inferno
    • isgraphics
    • ishandle
    • jet
    • legend
    • line
    • lines
    • linkaxes
    • loglog
    • magma
    • mesh
    • meshc
    • openfig
    • opengl
    • pan
    • parula
    • patch
    • pie
    • pink
    • plasma
    • plot
    • plot3
    • plotmatrix
    • plotyy
    • polarhistogram
    • polarplot
    • polarscatter
    • print
    • quiver
    • quiver3
    • ribbon
    • saveas
    • savefig
    • scatter
    • scatter3
    • semilogx
    • semilogy
    • set
    • sgtitle
    • shading
    • sphere
    • spring
    • stackedplot
    • stairs
    • stem
    • subplot
    • subtitle
    • summer
    • suptitle
    • surf
    • surfc
    • text
    • textscatter
    • textscatter3
    • title
    • triplot
    • turbo
    • view
    • viridis
    • waitbar
    • winter
    • wordcloud
    • xlabel
    • xlim
    • xline
    • xscale
    • xtickangle
    • xtickformat
    • xticklabels
    • xticks
    • ylabel
    • ylim
    • yline
    • yscale
    • ytickangle
    • ytickformat
    • yticklabels
    • yticks
    • zlabel
    • zlim
    • zoom

view — Set or query 3-D camera view angles with MATLAB-compatible view call forms.

view reads or updates azimuth/elevation camera orientation for current or specified axes. It supports MATLAB-compatible forms such as view(2), view(3), view([az el]), and view(az, el).

Syntax

[az, el] = view(...)
angles = view()
angles = view(ax)
angles = view([az el] | preset)
angles = view(az, el)
angles = view(ax, [az el] | preset)
angles = view(ax, az, el)

Inputs

angles
Type
NumericArray
Required
Yes
Description
Two-element [az el] vector or preset value 2/3.
ax
Type
AxesHandle
Required
Yes
Description
Axes handle to query.
az
Type
NumericScalar
Required
Yes
Description
Azimuth in degrees.
el
Type
NumericScalar
Required
Yes
Description
Elevation in degrees.
ax
Type
AxesHandle
Required
Yes
Description
Axes handle to set.
NameTypeRequiredDefaultDescription
anglesNumericArrayYes—Two-element [az el] vector or preset value 2/3.
axAxesHandleYes—Axes handle to query.
azNumericScalarYes—Azimuth in degrees.
elNumericScalarYes—Elevation in degrees.
axAxesHandleYes—Axes handle to set.

Returns

az
Type
NumericScalar
Description
Azimuth angle in degrees.
el
Type
NumericScalar
Description
Elevation angle in degrees.
angles
Type
NumericArray
Description
Current or assigned view angles as [az el].
NameTypeDescription
azNumericScalarAzimuth angle in degrees.
elNumericScalarElevation angle in degrees.
anglesNumericArrayCurrent or assigned view angles as [az el].

Returned values from view depend on how many outputs the caller requests.

Errors

RunMat:view:InvalidArgument
When
Arguments are malformed, wrong arity, wrong shape, or unsupported preset.
Message
view: invalid argument
RunMat:view:InvalidAxes
When
Axes target is invalid or no longer exists.
Message
view: invalid axes target
RunMat:view:Internal
When
Internal plotting state operation fails.
Message
view: internal operation failed
RunMat:view:TooManyOutputs
When
More than two outputs are requested.
Message
view: too many output arguments
IdentifierWhenMessage
RunMat:view:InvalidArgumentArguments are malformed, wrong arity, wrong shape, or unsupported preset.view: invalid argument
RunMat:view:InvalidAxesAxes target is invalid or no longer exists.view: invalid axes target
RunMat:view:InternalInternal plotting state operation fails.view: internal operation failed
RunMat:view:TooManyOutputsMore than two outputs are requested.view: too many output arguments

Behavior and execution

view with no angle arguments queries the current [az el] pair.

view(2) selects the standard top-down 2-D camera and view(3) restores the standard 3-D camera preset.

Explicit azimuth/elevation values can be passed as two scalars or as a two-element vector.

View state is subplot-local and does not leak across different axes in a subplot grid.

Axes handles can be passed explicitly so camera changes target a specific subplot rather than whichever axes happens to be current.

Typed-integer angles and numeric axes aliases are independently gated RunMat extensions. Integer angles must be exactly representable in the renderer's single-precision camera state before any plot mutation.

Three-element line-of-sight vectors and arrays of axes handles are not implemented. The documented two-output angle query is supported.

With two explicitly requested outputs, [az,el] = view(...) returns scalar doubles for the current or assigned camera angles. With one explicitly requested output, the RunMat-only vector-output extension returns [az el]; strict MATLAB mode rejects this extension rather than claiming a MATLAB view-matrix result. Zero outputs still query or update the selected axes.

The existing shared camera state stores angles in single precision. Floating inputs must remain finite across that renderer boundary; typed integers must round-trip exactly. Query outputs are double representations of the stored values.

These graphics metadata controls require host numeric values: no implicit device download or numeric acceleration is declared. Handles refer to local axes state, not transferable worker/foreign graphics ownership. Output admission and numeric parsing precede default-axes creation.

Figure observers are notified through the shared axes-state owner.

Examples

Set an explicit 3-D camera angle

[X, Y] = meshgrid(linspace(-2, 2, 60), linspace(-2, 2, 60));
Z = sin(X.^2 + Y.^2);
surf(X, Y, Z);
view(45, 30);

Use MATLAB-style view presets

[X, Y] = meshgrid(linspace(-3, 3, 40), linspace(-3, 3, 40));
Z = sin(X) .* cos(Y);
surf(X, Y, Z);
view(2);
view(3);

Query a subplot-local camera

ax = subplot(1, 2, 2);
plot3(cos(0:0.1:5), sin(0:0.1:5), 0:0.1:5);
view(ax, [60 20]);
get(ax, 'View')

Expected output:

% Returns a 1x2 vector [60 20]

Using view with coding agents

Open a RunMat example with live inputs, then ask the agent to explain how view changes the result.

Run a small view example, explain the result, then change one input and compare the output.

FAQ

What do azimuth and elevation mean in view(az, el)?⌄

Azimuth is the horizontal rotation around the z-axis (0° looks along the y-axis toward the origin). Elevation is the angle above the x-y plane (0° is level, 90° is directly overhead). view(45, 30) gives the classic isometric-ish perspective for 3-D surfaces.

How do I reset to the default 2-D or 3-D view?⌄

view(2) sets the camera to top-down (azimuth 0, elevation 90) — useful for looking at a surface as a heatmap. view(3) restores the default 3-D camera at [-37.5, 30], which is the standard MATLAB 3-D preset.

Can I set different view angles per subplot?⌄

Yes. View state is subplot-local. Pass the axes handle explicitly to target a specific panel.

ax1 = subplot(1, 2, 1); surf(X, Y, Z); view(ax1, 0, 90);
ax2 = subplot(1, 2, 2); surf(X, Y, Z); view(ax2, 45, 30);

Related Plotting functions

2D Charts

area · bar · errorbar · heatmap · hist · histogram · loglog · pie · plot · scatter · semilogx · semilogy · stairs · stem

3D & Surface

contour · contour3 · contourf · mesh · meshc · plot3 · quiver · scatter3 · surf · surfc

Images

image · imagesc · imshow

Axes & Layout

axis · box · grid · sgtitle · subplot · title · zlabel

Appearance

colorbar · colormap · legend · shading

Handle Access

gca · gcf · get · set

Other

addpoints · ancestor · animatedline · autumn · axes · barh · bone · caxis · cla · clf · clim · colorcube · colororder · cool · copper · copyobj · cylinder · daspect · datacursormode · dataTipTextRow · drawnow · fcontour · figure · fill · fill3 · findobj · fsurf · gobjects · gray · groot · hgload · hgsave · hidden · histogram2 · hold · hot · inferno · isgraphics · ishandle · jet · line · lines · linkaxes · magma · openfig · opengl · pan · parula · patch · pink · plasma · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · spring · stackedplot · subtitle · summer · suptitle · text · textscatter · textscatter3 · triplot · turbo · viridis · waitbar · winter · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom

More plotting resources

  • Choosing the right plot type
  • Styling plots and axes
  • Plot replay and export
  • Complete plotting guide

About RunMat

RunMat is a runtime that executes MATLAB-syntax code fast on any GPU. The runtime is free for individuals, including freelancers; students and faculty at an academic institution, for teaching or research there; contributors to an open-source project, for work on that project; organizations with 250 or fewer people and US$10M or less in annual revenue; and anyone, for non-production use. See runmat.com/license.

  • RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed. Simulations that took hours now take minutes.
  • Start running code in seconds. RunMat runs in the browser, on the desktop, or from the CLI. No license server, no IT ticket.

Getting started · Benchmarks · Pricing

Download RunMat

Download RunMat for full performance, or use RunMat in your browser for zero setup.

Download RunMatOpen Sandbox
On this page
  • Syntax
  • Inputs
  • Returns
  • Errors
  • Behavior and execution
  • Examples
  • Set an explicit 3-D camera angle
  • Use MATLAB-style view presets
  • Query a subplot-local camera
  • Using view with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • About RunMat