RunMat
  • Pricing
RunMat
GitHub
GitHub
DownloadSign InTry in Browser
DesktopRuntimeServer
RunMat

Run math blazing fast

GitHubX (Twitter)LinkedIn

Company

  • About
  • Pricing
  • Contact

Explore

  • RunMat for academia
  • RunMat vs MATLAB Online
  • Benchmarks

Get product updates and release notes from the RunMat team.

© 2026 Dystr · Made withfor the scientific community.

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.

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

colororder — Set or query the plotting color order in MATLAB and RunMat.

colororder controls the implicit series colors used by line-style plotting commands. Public numeric RGB inputs are single or double matrices in [0,1]. RunMat additionally supports a gated host-only integer RGB extension.

Syntax

C = colororder()
C = colororder(target)
colororder(colors)
colororder(palettename)
colororder(target, colors)

Inputs

NameTypeRequiredDefaultDescription
targetAnyYes—Target figure or axes handle.
colorsAnyYes—m-by-3 RGB matrix, color name array, color cellstr, palette name, or default.

Returns

NameTypeDescription
CNumericArrayCurrent color order as an m-by-3 RGB triplet matrix.

Errors

IdentifierWhenMessage
RunMat:colororder:InvalidArgumentTarget handle, color array, palette name, or color specification is invalid.colororder: invalid argument
RunMat:colororder:InternalInternal plotting state update fails.colororder: internal operation failed

How colororder works

  • colororder() returns the current figure color order as an m-by-3 RGB triplet matrix.
  • colororder(colors) sets the color order for the current figure and applies it to existing axes.
  • colororder(ax, colors) sets the color order for the specified axes without changing the current axes.
  • colororder(fig, colors) sets the color order for every axes in the specified figure.
  • Numeric color arrays must be m-by-3 RGB triplet matrices with finite values in [0,1]. Public numeric classes are single and double; a single RGB triplet vector is accepted as one color.
  • All eight integer classes are accepted only in RunMat mode and only when every native channel is exactly 0 or 1. Strict compatibility mode rejects integer RGB setters before conversion.
  • Integer channels cross an explicit host f32 graphics-state boundary. Query output is always an m-by-3 host double matrix; setter forms expose no output.
  • Resident numeric color arrays are rejected without provider access.
  • String and cell string color arrays accept MATLAB color names, short color tokens, and #RGB or #RRGGBB hex strings.
  • Palette names include default, gem, gem12, glow, glow12, sail, reef, meadow, dye, and earth.
  • Changing the color order recolors existing line/scatter/bar-family series cyclically and controls future implicit plot colors.

Examples

Set a custom RGB color order

x = 0:0.1:1;
plot(x, x, x, x.^2, x, x.^3);
colororder([1 0 0; 0 0.5 0; 0 0 1]);

Expected output:

% Existing and future implicit series use red, green, and blue cyclically.

Use color names and hex strings

colororder({'red', '#00AAFF', 'black'});
plot(1:5, rand(5,3));

Set an axes-specific color order

ax1 = subplot(1,2,1);
plot(rand(5,3));
ax2 = subplot(1,2,2);
plot(rand(5,3));
colororder(ax2, 'gem');

Using colororder with coding agents

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

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

FAQ

How is colororder different from colormap?⌄

colororder controls the discrete sequence of implicit colors for plot series such as lines and scatter groups. colormap controls continuous color mapping for image, surface, heatmap, and contour data.

Does colororder gather gpuArray plot data?⌄

No. The builtin only updates axes and figure style metadata plus existing plot object colors. It does not read or materialize plotted numeric data.

Does setting colororder change the current axes?⌄

No. Targeted forms such as colororder(ax, colors) update that axes without selecting it as the current axes.

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 · view · zlabel

Appearance

colorbar · colormap · legend · shading

Handle Access

gca · gcf · get · set

Other

addpoints · ancestor · animatedline · axes · barh · caxis · cla · clf · clim · colorcube · copyobj · daspect · datacursormode · dataTipTextRow · fcontour · figure · fill · fill3 · findobj · fsurf · gobjects · groot · hgload · hgsave · hidden · histogram2 · hold · line · linkaxes · openfig · opengl · pan · parula · patch · plotmatrix · plotyy · polarhistogram · polarplot · polarscatter · print · quiver3 · ribbon · saveas · savefig · sphere · stackedplot · subtitle · suptitle · text · textscatter · textscatter3 · triplot · waitbar · wordcloud · xlabel · xlim · xline · xscale · xtickangle · xtickformat · xticklabels · xticks · ylabel · ylim · yline · yscale · ytickangle · ytickformat · yticklabels · yticks · zlim · zoom

More plotting resources

  • Styling plots and axes

Open-source implementation

Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how colororder is executed, line by line, in Rust.

  • View the source for colororder in Rust on GitHub
  • Learn how the RunMat runtime works
  • Found a bug? Open an issue with a minimal reproduction.

About RunMat

RunMat is an open-source runtime that executes MATLAB-syntax code blazing on any GPU. It is licensed under the Apache 2.0 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
  • How colororder works
  • Examples
  • Set a custom RGB color order
  • Use color names and hex strings
  • Set an axes-specific color order
  • Using colororder with coding agents
  • FAQ
  • Related Plotting functions
  • 2D Charts
  • 3D & Surface
  • Images
  • Axes & Layout
  • Appearance
  • Handle Access
  • Other
  • More plotting resources
  • Open-source implementation
  • About RunMat