Using 'colordef' in my code (some rather old) gives "Warning: colordef will be removed in a future release." I can't find any clear guidance on a replacement. Probably something like set(0, ..?

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 2 Feb. 2025

0 Stimmen

As of R2025a (currently in pre-release) there are new facilities for controlling desktop color schemes that overlap with colordef functionality; see https://www.mathworks.com/help/releases/R2025a/matlab/matlab_env/change-desktop-colors-and-select-dark-theme.html

4 Kommentare

James
James am 2 Feb. 2025
Bearbeitet: James am 2 Feb. 2025
Thanks, could be I'm after changing the axis line/surface (etc.) colours e.g. from Parula to HSV, I can't immediately see anything about that here, I'll play a bit.
set(groot, 'DefaultAxesColormap', hgv(256));
This is not something that would have been previously handled by colordef
James
James am 2 Feb. 2025
ah, OK thanks that makes sense, groot is root of all handles hence 0 I guess.
Walter Roberson
Walter Roberson am 2 Feb. 2025
set(groot) and set(0) are almost equivalent. I have noticed a few small differences between them, but I cannot recall what they are at the moment.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Color and Styling finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2024b

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by