teratail header banner
teratail header banner
質問するログイン新規登録

回答編集履歴

1

Update

2021/12/08 21:50

投稿

melian
melian

スコア21265

answer CHANGED
@@ -9,9 +9,9 @@
9
9
  gnuplot> rgb(r, g, b) = 65536*int(r) + 256*int(g) + int(b)
10
10
  gnuplot> hex2rgb(c) = rgb(hex2dec(c[2:3]), hex2dec(c[4:5]), hex2dec(c[6:7]))
11
11
 
12
+ gnuplot> red = hex2rgb("#FF0000")
12
- gnuplot> lc_6 = hex2rgb("#0072b2")
13
+ gnuplot> blue = hex2rgb("#0000FF")
13
- gnuplot> lc_7 = hex2rgb("#e51e10")
14
- gnuplot> color(x) = x <= -1.22478 ? lc_7 : lc_6
14
+ gnuplot> color(x) = x <= -1.22478 ? blue : red
15
15
  gnuplot> plot "result1.txt" using 1:2:(color($1)) pt 2 lc rgb variable
16
16
  ```
17
- ![plot](fd82d1b3e338d8352d5b627f44f8b0a8.png)
17
+ ![plot](bf76e0862988bbf46b1bc74727e9cde9.png)