gnuplot颜色设置及背景色设置
gnuplot作图时默认颜色7种, 命令show colorname显示预定义颜色有112种, 但去除重复后, 实际预定义的不同颜色只有97种. 在自定义设置线的颜色、更改gunuplot图的背景色时都会用到该表。
一、颜色色系
彩色系
1# Language: bash
2set k t c; plot [][-6:-1]
30 lw 20 lc rgb "white" t"white #ffffff = 255 255 255",
40 lw 20 lc rgb "black" t"black #000000 = 0 0 0",
50 lw 20 lc rgb "red" t"1 red #ff0000 = 255 0 0",
60 lw 20 lc rgb "light-red" t"light-red #f03232 = 240 50 50",
70 lw 20 lc rgb "dark-red" t"dark-red #8b0000 = 139 0 0",
80 lw 20 lc rgb "green" t"2 green #00ff00 = 0 255 0",
90 lw 20 lc rgb "light-green" t"light-green #90ee90 = 144 238 144",
100 lw 20 lc rgb "dark-green" t"dark-green #006400 = 0 100 0",
110 lw 20 lc rgb "seagreen" t"seagreen #c1ffc1 = 193 255 193",
120 lw 20 lc rgb "web-green" t"web-green #00c000 = 0 192 0",
130 lw 20 lc rgb "sea-green" t"sea-green #2e8b57 = 46 139 87",
140 lw 20 lc rgb "spring-green" t"spring-green #00ff7f = 0 255 127",
150 lw 20 lc rgb "dark-spring-green" t"dark-spring-green #008040 = 0 128 64",
160 lw 20 lc rgb "forest-green" t"forest-green #228b22 = 34 139 34",
170 lw 20 lc rgb "dark-olivegreen" t"dark-olivegreen #556b2f = 85 107 47",
180 lw 20 lc rgb "greenyellow" t"greenyellow #a0ff20 = 160 255 32",
190 lw 20 lc rgb "chartreuse" t"chartreuse #7cff40 = 124 255 64",
200 lw 20 lc rgb "dark-chartreuse" t"dark-chartreuse #408000 = 64 128 0",
210 lw 20 lc rgb "blue" t"3 blue #0000ff = 0 0 255",
220 lw 20 lc rgb "light-blue" t"light-blue #add8e6 = 173 216 230",
230 lw 20 lc rgb "medium-blue" t"medium-blue #0000cd = 0 0 205",
240 lw 20 lc rgb "dark-blue" t"dark-blue #00008b = 0 0 139",
250 lw 20 lc rgb "midnight-blue" t"midnight-blue #191970 = 25 25 112",
260 lw 20 lc rgb "skyblue" t"skyblue #87ceeb = 135 206 235",
270 lw 20 lc rgb "web-blue" t"web-blue #0080ff = 0 128 255",
280 lw 20 lc rgb "royalblue" t"royalblue #4169e1 = 65 105 225",
290 lw 20 lc rgb "steelblue" t"steelblue #306080 = 48 96 128",
300 lw 20 lc rgb "slateblue1" t"slateblue1 #8060ff = 128 96 255",
310 lw 20 lc rgb "cyan" t"4 cyan #00ffff = 0 255 255",
320 lw 20 lc rgb "light-cyan" t"light-cyan #e0ffff = 224 255 255",
330 lw 20 lc rgb "dark-cyan" t"dark-cyan #00eeee = 0 238 238",
340 lw 20 lc rgb "magenta" t"5 magenta #ff00ff = 255 0 255",
350 lw 20 lc rgb "light-magenta" t"light-magenta #f055f0 = 240 85 240",
360 lw 20 lc rgb "dark-magenta" t"dark-magenta #c000ff = 192 0 255",
370 lw 20 lc rgb "yellow" t"6 yellow #ffff00 = 255 255 0",
380 lw 20 lc rgb "dark-yellow" t"dark-yellow #c8c800 = 200 200 0",
390 lw 20 lc rgb "yellow4" t"yellow4 #808000 = 128 128 0",
400 lw 20 lc rgb "gold" t"gold #ffd700 = 255 215 0",
410 lw 20 lc rgb "goldenrod" t"goldenrod #ffc020 = 255 192 32",
420 lw 20 lc rgb "light-goldenrod" t"light-goldenrod #eedd82 = 238 221 130",
430 lw 20 lc rgb "dark-goldenrod" t"dark-goldenrod #b8860b = 184 134 11",
440 lw 20 lc rgb "navy" t"7 navy #000080 = 0 0 128",
450 lw 20 lc rgb "purple" t"8 purple #c080ff = 192 128 255",
460 lw 20 lc rgb "mediumpurple3" t"mediumpurple3 #8060c0 = 128 96 192",
470 lw 20 lc rgb "orange" t"orange #ffa500 = 255 165 0",
480 lw 20 lc rgb "dark-orange" t"dark-orange #c04000 = 192 64 0",
490 lw 20 lc rgb "orange-red" t"orange-red #ff4500 = 255 69 0",
500 lw 20 lc rgb "orangered4" t"orangered4 #801400 = 128 20 0",
510 lw 20 lc rgb "brown" t"brown #a52a2a = 165 42 42",
520 lw 20 lc rgb "brown4" t"brown4 #801414 = 128 20 20",
530 lw 20 lc rgb "sandybrown" t"sandybrown #ffa060 = 255 160 96",
540 lw 20 lc rgb "pink" t"pink #ffc0c0 = 255 192 192",
550 lw 20 lc rgb "light-pink" t"light-pink #ffb6c1 = 255 182 193",
560 lw 20 lc rgb "dark-pink" t"dark-pink #ff1493 = 255 20 147",
570 lw 20 lc rgb "aquamarine" t"aquamarine #7fffd4 = 127 255 212",
580 lw 20 lc rgb "turquoise" t"turquoise #40e0d0 = 64 224 208",
590 lw 20 lc rgb "light-turquoise" t"light-turquoise #afeeee = 175 238 238",
600 lw 20 lc rgb "dark-turquoise" t"dark-turquoise #00ced1 = 0 206 209",
610 lw 20 lc rgb "beige" t"beige #f5f5dc = 245 245 220",
620 lw 20 lc rgb "lemonchiffon" t"lemonchiffon #ffffc0 = 255 255 192",
630 lw 20 lc rgb "khaki" t"khaki #f0e68c = 240 230 140",
640 lw 20 lc rgb "khaki1" t"khaki1 #ffff80 = 255 255 128",
650 lw 20 lc rgb "dark-khaki" t"dark-khaki #bdb76b = 189 183 107",
660 lw 20 lc rgb "olive" t"olive #a08020 = 160 128 32",
670 lw 20 lc rgb "honeydew" t"honeydew #f0fff0 = 240 255 240",
680 lw 20 lc rgb "bisque" t"bisque #cdb79e = 205 183 158",
690 lw 20 lc rgb "antiquewhite" t"antiquewhite #cdc0b0 = 205 192 176",
700 lw 20 lc rgb "tan1" t"tan1 #ffa040 = 255 160 64",
710 lw 20 lc rgb "sienna1" t"sienna1 #ff8040 = 255 128 64",
720 lw 20 lc rgb "sienna4" t"sienna4 #804014 = 128 64 20",
730 lw 20 lc rgb "salmon" t"salmon #fa8072 = 250 128 114",
740 lw 20 lc rgb "light-salmon" t"light-salmon #ffa070 = 255 160 112",
750 lw 20 lc rgb "dark-salmon" t"dark-salmon #e9967a = 233 150 122",
760 lw 20 lc rgb "coral" t"coral #ff7f50 = 255 127 80",
770 lw 20 lc rgb "light-coral" t"light-coral #f08080 = 240 128 128",
780 lw 20 lc rgb "orchid" t"orchid #ff80ff = 255 128 255",
790 lw 20 lc rgb "orchid4" t"orchid4 #804080 = 128 64 128",
800 lw 20 lc rgb "violet" t"violet #ee82ee = 238 130 238",
810 lw 20 lc rgb "dark-violet" t"dark-violet #9400d3 = 148 0 211",
820 lw 20 lc rgb "plum" t"plum #dda0dd = 221 160 221",
830 lw 20 lc rgb "dark-plum" t"dark-plum #905040 = 144 80 64"
灰色系
1set k t c; plot [][-6:-1]
20 lw 20 lc rgb "gray" t"gray #bebebe = 190 190 190",
30 lw 20 lc rgb "grey" t"grey #c0c0c0 = 192 192 192",
40 lw 20 lc rgb "light-gray" t"light-gray grey #d3d3d3 = 211 211 211",
50 lw 20 lc rgb "dark-gray" t"dark-gray grey #a0a0a0 = 160 160 160",
60 lw 20 lc rgb "slategray" t"slategray grey #a0b6cd = 160 182 205",
70 lw 20 lc rgb "gray0" t"gray0 grey0 #000000 = 0 0 0",
80 lw 20 lc rgb "gray10" t"gray10 grey10 #1a1a1a = 26 26 26",
90 lw 20 lc rgb "gray20" t"gray20 grey20 #333333 = 51 51 51",
100 lw 20 lc rgb "gray30" t"gray30 grey30 #4d4d4d = 77 77 77",
110 lw 20 lc rgb "gray40" t"gray40 grey40 #666666 = 102 102 102",
120 lw 20 lc rgb "gray50" t"gray50 grey50 #7f7f7f = 127 127 127",
130 lw 20 lc rgb "gray60" t"gray60 grey60 #999999 = 153 153 153",
140 lw 20 lc rgb "gray70" t"gray70 grey70 #b3b3b3 = 179 179 179",
150 lw 20 lc rgb "gray80" t"gray80 grey80 #cccccc = 204 204 204",
160 lw 20 lc rgb "gray90" t"gray90 grey90 #e5e5e5 = 229 229 229",
170 lw 20 lc rgb "gray100" t"gray100 grey100 #ffffff = 255 255 255"
纯色系
默认的7种颜色有时候不够用, 可以利用lc rgb进行自定义, 更方便的是利用set style line命令.下面定义了与Origin默认一致的颜色.
1set style line 1 lc rgb "black"
2set style line 2 lc rgb "red"
3set style line 3 lc rgb "green"
4set style line 4 lc rgb "blue"
5set style line 5 lc rgb "cyan"
6set style line 6 lc rgb "magenta"
7set style line 7 lc rgb "yellow"
8set style line 8 lc rgb "dark-yellow"
9set style line 9 lc rgb "navy"
二、更换背景色
默认背景色是白色,如这里我将默认背景色换掉,只需要设置:set terminal png x00ffff 。输出网卡的流量情况如下图:
捐赠本站(Donate)
如您感觉文章有用,可扫码捐赠本站!(If the article useful, you can scan the QR code to donate))
- Author: shisekong
- Link: https://blog.361way.com/gnuplot-color/4886.html
- License: This work is under a 知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议. Kindly fulfill the requirements of the aforementioned License when adapting or creating a derivative of this work.