Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

how to set label and line the same color in gnuplot

Very simple stuff. I want a function, say function f, to be plotted with a particular color. I also want a piece of label saying "function f color" which is also displayed in that color.

I am trying this so far:

set style line 1 lw 3 lc 1
set label "AC" at 0, 70 textcolor 1

but apparently the "lc" and "textcolor" follows different specs, and it complains:

"trolo4.pl", line 8: colorspec option not recognized

any help would be great!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Try this instead:

set label "AC" at 0, 70 textcolor linetype 1

or

set label "AC" at 0, 70 textcolor linespec 1

Read the manual in gnuplot> help label to learn more.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...