问题
I have another problem with gnuplot, maybe someone has a good idea, what to do:
I wanted to plot some simple lines with points in black and white. Each line should get its own symbols for point but same style. Black border and white or grey on the inside, but then different shapes like circle or triangle. So far I am just able to produce the border, but inside is either completely empty/blank or I get just rounded interruptions. For my understanding this is due to the pi (pointinterval) command, but shape is always just a circle and not matching when using triangles.
My used linestyle is
set style line 1 lt -1 lw 2 pi -4 pt 17 ps 1
plot f(x) w lp ls 1
So my questions is, how can I produce a line with points, which have a border with line color and a filled inside of any wished color?
Thought this is not too difficult, but up for now I am full-blown stuck, so thank you for any advice!
回答1:
Thank you Christoph and John,
looking at your suggestions, the best I can imagine so far would be something like discussed in this follow up of the Johns link: http://gnuplot-tricks.blogspot.ru/2010/03/defining-new-symbols.html For my purpose I chose a simpler version with the following
plot f(x) with lines lt -1 lw 2,\
f(x) with points notitle lt -1 pt 5 pi 4 ps 0.8,\
f(x) with points notitle lt 3 pt 5 pi 4 ps 0.6
So points are plotted 3 times, first just a the line, second as bigger points same color as line and third with smaller point and different color.
In general this is working, but still it remains how to get a proper key/legend. Here I prefer to have the correct line and one symbol with the circumference. As it is now legend would contain three entries or as in the example just the line without symbol.
Thinking of placing a symbol by hand as described in aboves link, but an automated version depending on different number of key entries or key position would be the better solution.
来源:https://stackoverflow.com/questions/31865780/how-to-do-linepoints-with-filled-points-in-gnuplot