如何用透明点制作散点图 [英] How to make scatter plots with transparent points

查看:142
本文介绍了如何用透明点制作散点图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何像使用gnuplot的图片一样绘制具有部分透明散射点的图像?问题是我不知道如何将点设置为透明.

How can I plot an image with partial transparent scatter points just like in this picture with gnuplot? The problem is I don't know how to set the points to be transparent.

推荐答案

尝试一下:

set style fill  transparent solid 0.35 noborder
set style circle radius 0.02
plot 'test' u 1:2 with circles lc rgb "blue", \
     '' u 1:2 every 100 w circles lc rgb "red" fs solid 1.0 border lt -1

输出

如您所见,您可以为每个数据集指定是否使用透明度和使用哪种颜色.
如果数据由两个值(圆的x和y位置)组成,则必须通过set style circle ...指定圆的半径.如果数据有三行,则可以使用第三个值为每个数据点指定圆的半径.
您可以使用透明度级别,范围从0(完全透明)到1(不透明).

As you can see, you can specify for each data set whether to use transparency and which color to use.
If your data consist of two values (x and y position of the circle) you have to specify the circle's radius via set style circle .... If your data has three rows, you can use the third value to specify the circle's radius for each data point.
You can play with the transparency level, which ranges from 0 (full transparency) to 1 (no transparency).

这篇关于如何用透明点制作散点图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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