Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 其它 > 资料存档 > MATLAB技术文章
MATLAB技术文章 MATLAB Technical Articles From Mathworks
回复
 
主题工具 显示模式
旧 2025-12-24, 09:02   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,020
声望力: 67
poster 正向着好的方向发展
默认 New York Times Colors - Cleve Moler on Mathematics and Computing

I admire the color scheme in the New York Times Games section and occasionally make it my colororder.



https://www.nytco.com/games

Contents
Colormaps

It is important to distinguish between "color map" and "color order". A colormap defines the colors used by surface, image, and patch objects. MATLAB provides 22 color maps. parula is the default.

disp(colormaps) "parula" "turbo" "hsv" "hot" "cool" "spring" "summer" "autumn" "winter" "gray" "bone" "copper" "pink" "sky" "abyss" "nebula" "jet" "lines" "colorcube" "prism" "flag" "white"

Palettes

The colormap defines the palette of colors used by the plot function for multiple lines. MATLAB provides 10 palettes. gem is the default.

disp(palettes') "gem" "gem12" "glow" "glow12" "sail" "reef" "meadow" "dye" "earth" "default"

Color Order

The colors used by MATLAB for plotting multiple lines need to be well separated. These colors are given by the colororder property of the current axes. By default, MATLAB cycles through the seven colors in the gem palette.

gcaco=get(gca,"ColorOrder");show_rgb(gcaco) closeallclearNew York Times Games

The New York Times Games originated with the newspaper's crossword puzzle in 1942. NYT Games was established in 2014, with the addition of the Mini Crossword. Wordle was added in 2022 and I have been playing Wordle almost daily since its launch.

NYT Games now has over 10 million daily players. According to one member of staff, "the half joke that is repeated internally is that The New York Times is now a gaming company that also happens to offer news."

NYT Color Order

I like the color scheme that the Times uses in the Games section. It provides a subtler color order than the default gem.

nyt_paletteans = 184 228 68 248 211 0 121 160 238 184 113 198 160 82 45 235 235 200nytco=nyt_palette/256ribbon(6)set(gcf,'position',[200200440300])set(gca,'colororder',nytco)drawnownytco = 0.7188 0.8906 0.2656 0.9688 0.8242 0 0.4727 0.6250 0.9297 0.7188 0.4414 0.7734 0.6250 0.3203 0.1758 0.9180 0.9180 0.7812 show_rgb(nytco)drawnow Tangrams

In October, I used NYT colors for the kitty in my blog post about Tangrams.



NYT Qube

The NYT colors give the Rubiks Cube a new look.



Gallery

The MiniGallery with NYT colors.



fftmatrix

The Fast Finite Fourier Matrix with the NYT colors.




Get the MATLAB code (requires JavaScript)

Published with MATLAB® R2025a




More...
poster 当前离线   回复时引用此帖
回复

主题工具
显示模式

发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛启用 HTML 代码



所有时间均为北京时间。现在的时间是 04:49


Powered by vBulletin
版权所有 ©2000 - 2026,Jelsoft Enterprises Ltd.