defaultPlotColors() to get or draw the 7 default colors used by plot() function

버전 1.1.0.0 (138 KB) 작성자: Kouichi C. Nakamura
defaultPlotColors() allows you to get or draw the 7 default colors of plot() function since R2014b
다운로드 수: 189
업데이트 날짜: 2016/7/11

라이선스 보기

getDefaultPlotColors returns default colors for plot function.
Every run of plot() function proceed by one row in the color array.
colors = defaultPlotColors()
colors = defaultPlotColors(k)
colors = defaultPlotColors('plot')

INPUT ARGUMENTS
k If k is a scalar positive integer, you can get k th color of
default colors. If k is a vector of such integers,
defaultPlotColors returs n by 3 array of default colors, where
n is the length of vector k and colors are ordered in rows by
the vector k.

'plot' You can see all the seven default colors

OUTPUT ARGUMENTS
out 1 by 3 vector represents a MATLAB color, or n by 3 array of
n colors

EXAMPLES
defaultPlotColors_script.mlx illustrate how defaultPlotColors.m can be used.
http://www.mathworks.com/matlabcentral/fileexchange/58168-defaultplotcolors---to-get-or-draw-the-7-default-colors-used-by-plot---function/content/defaultPlotColors_script.mlx

defaultPlotColors()

defaultPlotColors(3)

defaultPlotColors(1:14)

defaultPlotColors('plot')

See also
plotColors

ColorOrderIndex (Axes property)
http://uk.mathworks.com/help/matlab/graphics_transition/why-are-plot-lines-different-colors.html

Written by Kouichi C. Nakamura Ph.D.
MRC Brain Network Dynamics Unit
University of Oxford
kouichi.c.nakamura@gmail.com
10-Jul-2016 07:09:15

인용 양식

Kouichi C. Nakamura (2025). defaultPlotColors() to get or draw the 7 default colors used by plot() function (https://www.mathworks.com/matlabcentral/fileexchange/58168-defaultplotcolors-to-get-or-draw-the-7-default-colors-used-by-plot-function), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Labels and Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

link

1.0.0.0

zip