如何在gnuplot中填充点的线点? [英] How to do linepoints with filled points in gnuplot?

查看:104
本文介绍了如何在gnuplot中填充点的线点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对gnuplot有另一个问题,也许有人对如何做有一个好主意:

I have another problem with gnuplot, maybe someone has a good idea, what to do:

我想用黑白点画一些简单的线.每条线应具有自己的点符号,但样式相同.黑色边框,内部为白色或灰色,但形状不同,例如圆形或三角形. 到目前为止,我只能制作边框,但是内部要么完全是空白/空白,要么是四舍五入.据我了解,这是由于pi(pointinterval)命令引起的,但是形状始终只是一个圆形,在使用三角形时不匹配.

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.

我使用的线型是

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!

推荐答案

谢谢克里斯托夫和约翰,

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

因此,点绘制了3次,第一个只是一条线,第二个是与线颜色相同的较大点,第三个是较小的点和不同的颜色.

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.

这篇关于如何在gnuplot中填充点的线点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆