linux - 如何使用 gnuplot 绘制抖动图?

标签 linux gnuplot jitter

我正在尝试使用 gnuplot 在绘图中绘制 100x11 数组的数据。我创建了一个 .gnu 文件来生成图,但无法获取抖动图。

我正在使用下面的代码

set terminal pngcairo size 1280,800 enhanced font 'Helvetica,24'
set output "coin_flip.png"

# Title, axis label, range and ticks
set title "Jitter plot of data from coin flip experiment"
set xlabel "Fairness (p)"
set ylabel "# of heads in 10 tosses"
set xrange [-0.1:1.1]
set yrange [-1:11]

# Line styles
set style line 1 lt -1 lw 4 pt 5 lc rgb "red"
set style line 2 lt -1 lw 4 pt 7 lc rgb "blue"
set style line 4 lt -1 lw 4 pt 7 lc rgb "green"
set style line 5 lt -1 lw 4 pt 13 lc rgb "purple"
set style line 6 lt -1 lw 8 pt 13 lc rgb "black"

# Function definitions and curve fits
set fit logfile 'coin_flip.log'

#Fit
plot "coin_flip.dat" using 1:2 ti "Fairness(p) vs # of Heads" ls 1

我得到低于结果

enter image description here

但我想得到如下图

enter image description here

下面是我使用后得到的图

set jitter

enter image description here

你能帮我策划一下吗?

最佳答案

您需要在 gnuplot 上使用 set jitter 选项。以下代码:

set terminal png
set out "tmp.png" 

set multiplot layout 1,2
unset key

set title "no jitter"
plot x w p

set jitter
set title "jitter"
plot x w p

产生这个:

gnuplot jitterg

您可以在 gnuplot 控制台上键入 help jitter 来了解抖动模式和其他选项。也看看这些 examples .希望对您有所帮助!

关于linux - 如何使用 gnuplot 绘制抖动图?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49084340/

相关文章:

linux - 输入 dirs 命令后,我会进入哪个目录?

ubuntu - 为什么 gnuplot 4.6 绘图窗口没有 Gnuplot 4.4 的功能?

r - 如何修复 R 中 ggplot2 的 geom_jitter() 不稳定的 y 位置?

r - 如何在ggplot中确定抖动?

linux - 每个驱动器的最大文件数

linux - 每周为 root 用户脚本更改密码

C++,Gnuplot : Create temporary file in RAM and use it in Gnuplot

bash - Gnuplot 频率

Bokeh 抖动不起作用

linux - 如何在redhat 6上安装nodejs